Hypothesis Testing Variance Analysis Inferential Statistics 22 min read July 17, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

F-Test: How to Compare Two Variances Step-by-Step

A quality engineer at a pharmaceutical plant wants to know whether Machine A and Machine B fill bottles with the same consistency. The means might match, but what if one machine is wildly erratic? That is a question about variance — and the F-Test was built to answer it. By dividing one sample variance by another, you get a single ratio that tells you whether the difference in spread between two groups is larger than chance alone would produce.

This guide covers the complete F-Test procedure — definition, formula, 5-step method, worked examples across manufacturing, medicine, and education, a free interactive calculator, and a side-by-side comparison with Levene's Test, Bartlett's Test, and Brown-Forsythe. Everything you need to compare two variances, correctly and confidently.

What You'll Learn
  • ✓ What an F-Test is and when to use it vs. Levene's or Bartlett's Test
  • ✓ The F-statistic formula and how degrees of freedom work
  • ✓ The 5-step procedure with three fully solved examples
  • ✓ How to read the F-distribution table and find critical values
  • ✓ Assumptions, limitations, and common mistakes
  • ✓ How to run an F-Test in Excel, R, and Python
  • ✓ A complete glossary, cheat sheet, and FAQ

What Is an F-Test? (Definition)

Definition — F-Test (Variance Ratio Test)
An F-Test is a statistical hypothesis test that compares the variances of two populations by computing the ratio of their sample variances. The resulting value — the F-statistic — follows an F-distribution under the null hypothesis that the two population variances are equal. A large F-statistic signals that the variances differ more than chance alone would explain.
F = s₁² / s₂²

Think of variance as a measurement of spread or consistency. Two groups might have identical means but very different levels of variability. A factory testing two production lines, a researcher comparing measurement instruments, or a statistician checking whether ANOVA assumptions hold — all need to answer the same question: are these two groups equally consistent, or is one significantly more variable than the other? The F-Test gives you a formal, probability-based answer.

The test was developed by Sir Ronald A. Fisher in the 1920s. Fisher named the ratio after himself — the "F" stands for Fisher. The F-distribution that governs the test is right-skewed, starts at zero (variances cannot be negative), and changes shape depending on the degrees of freedom in the numerator and denominator. Full background on the F-distribution is covered in the F-distribution guide on Statistics Fundamentals.

📌
Featured Snippet — What Is an F-Test?

An F-Test is a hypothesis test that compares two population variances by computing F = s₁² / s₂². If F is large relative to the F critical value at the chosen significance level, the null hypothesis of equal variances is rejected. It is also used in ANOVA to test whether group means differ and in regression to test the overall model fit.

⚡ Quick Reference — F-Test Key Facts
  • Test statistic: F = s₁² / s₂² (place the larger variance in the numerator so F ≥ 1)
  • H₀ (null hypothesis): σ₁² = σ₂² — the two population variances are equal
  • H₁ (alternative hypothesis): σ₁² ≠ σ₂² (two-tailed) or σ₁² > σ₂² (one-tailed)
  • Degrees of freedom: df₁ = n₁ − 1 (numerator); df₂ = n₂ − 1 (denominator)
  • Distribution: F-distribution with df₁ and df₂
  • Decision rule: Reject H₀ if F > F_critical, or if p-value < α
  • Key assumption: Both populations must follow a normal distribution
  • When to prefer an alternative: Use Levene's Test when normality is uncertain

The F-Test Formula and Degrees of Freedom

The F-statistic for a two-sample variance test is a ratio. The larger of the two sample variances goes in the numerator, which guarantees F ≥ 1 and simplifies the table lookup — you only need the upper-tail critical value.

F-Test Formula — Comparing Two Variances
F = s₁² / s₂²
s₁² = larger sample variance (numerator) s₂² = smaller sample variance (denominator) df₁ = n₁ − 1 (numerator degrees of freedom) df₂ = n₂ − 1 (denominator degrees of freedom)

The sample variance for each group is computed as:

Sample Variance Formula
s² = Σ(xᵢ − x̄)² / (n − 1)
xᵢ = each observation = sample mean n = sample size n − 1 = degrees of freedom (Bessel's correction)

Understanding Degrees of Freedom

Degrees of freedom (df) measure how many independent pieces of information went into each variance estimate. For a sample of n observations, computing the mean uses up one degree of freedom, leaving n − 1 for estimating variance. This matters because the F-distribution's shape — and therefore the critical values — changes with both df₁ and df₂.

Component Formula Example (n₁ = 16, n₂ = 21)
Numerator dfdf₁ = n₁ − 1df₁ = 15
Denominator dfdf₂ = n₂ − 1df₂ = 20
F-critical (α = 0.05, two-tailed)Look up F(df₁, df₂) at α/2F* ≈ 2.57

For a two-tailed test (H₁: σ₁² ≠ σ₂²), you split α equally between both tails. Since you placed the larger variance in the numerator, F ≥ 1, so you only compare to the upper-tail critical value at α/2. Look up F-distribution critical values using df₁ and df₂.

F-Test Assumptions

The F-Test's validity depends on four conditions. Meeting all four is non-negotiable — the test breaks down badly when the normality assumption is violated. This is the main reason Levene's Test is often preferred in practice. Review the full statistical test assumptions guide for a broader perspective.

1

Both populations are normally distributed

This is the most critical assumption. The F-Test is famously sensitive to non-normality — even modest skewness or outliers can distort the p-value substantially. Always check normality with Q-Q plots, the Shapiro-Wilk test, or the Anderson-Darling test before proceeding. See the normality testing guide.

2

The two samples are independent

Observations in Group 1 must be unrelated to observations in Group 2. If the same subjects appear in both groups (before/after measurements, matched pairs), the F-Test is not appropriate. Use the paired samples t-test framework instead.

3

Observations within each sample are independent

No observation should influence another within the same group. Time-series data with autocorrelation or clustered data violates this. Random sampling satisfies it in most cases.

4

Data is continuous and measured on an interval or ratio scale

Variance is meaningful only for continuous measurements. The F-Test cannot be applied to nominal or ordinal data. Weight, temperature, time, and test scores are appropriate; Likert-scale responses typically are not.

⚠️
The Normality Assumption Is Not Optional

Simulation studies show the F-Test can have actual Type I error rates far above the nominal α when populations are not normal — even with reasonably large samples. If you are unsure about normality, use Levene's Test or the Brown-Forsythe Test instead. They are more robust to non-normality and almost always preferred for applied research.

How to Perform an F-Test: 5-Step Method

📋
The F-Test Framework: Calculate → Compare → Conclude

Step 1: State H₀ and H₁. Step 2: Check assumptions and calculate both sample variances. Step 3: Compute F = s₁²/s₂² (larger/smaller). Step 4: Find F_critical from the F-table using df₁ and df₂. Step 5: If F > F_critical (or p < α), reject H₀ and conclude the variances differ significantly.

1

State the Null and Alternative Hypotheses

H₀: σ₁² = σ₂² (the two population variances are equal). For a two-tailed test, H₁: σ₁² ≠ σ₂². For a one-tailed test, H₁: σ₁² > σ₂² (or <). Two-tailed tests are far more common in practice — use one-tailed only when you have a strong prior reason to expect one group to be more variable.

2

Check Assumptions and Set the Significance Level

Verify normality (Shapiro-Wilk, Q-Q plots), confirm independence, and set α. The conventional choice is α = 0.05. For applications with serious consequences (clinical trials, safety testing), use α = 0.01 for a stricter threshold. The significance level guide covers these tradeoffs in detail.

3

Calculate the F-Statistic

Compute both sample variances: s₁² = Σ(x − x̄)²/(n₁−1) and s₂² = Σ(x − x̄)²/(n₂−1). Place the larger variance in the numerator. Compute F = s₁²/s₂². This ensures F ≥ 1 and means you only need to compare against the upper-tail critical value.

4

Find the Critical Value and p-value

Compute df₁ = n₁ − 1 and df₂ = n₂ − 1. Look up F_critical in the F-distribution table at the appropriate α (use α/2 for two-tailed tests, since you placed the larger variance on top). Software will give you the exact p-value directly.

5

Make a Decision and State the Conclusion

If F > F_critical or p < α: "Reject H₀. At the α = 0.05 level, there is sufficient evidence that σ₁² ≠ σ₂² — the two populations have significantly different variances." If F ≤ F_critical: "Fail to reject H₀. The data does not provide sufficient evidence that the variances differ." Never write "accept H₀" — failing to reject is not proof of equality.

F-Test Worked Examples — 3 Fully Solved

Each example follows the same 5-step structure. All arithmetic is shown in full. Formula definitions follow the NIST Engineering Statistics Handbook standards for F-test notation.

Example 1 — Manufacturing Quality Control

Worked Example 1 — Manufacturing

Problem: A factory tests two filling machines. Machine A fills 16 bottles and records a sample variance of s₁² = 0.036 mL². Machine B fills 21 bottles with s₂² = 0.014 mL². At α = 0.05, do the machines differ significantly in filling consistency?

F-Test Formula — Variance Ratio
F = s₁² / s₂² = 0.036 / 0.014
df₁ = 16 − 1 = 15 df₂ = 21 − 1 = 20 F_critical at α/2 = 0.025
1

Hypotheses: H₀: σ_A² = σ_B²  |  H₁: σ_A² ≠ σ_B² (two-tailed — testing for any difference in variance)

2

Assumptions and significance level: Both samples drawn independently; normality verified via Q-Q plots. α = 0.05, two-tailed, so look up F at α/2 = 0.025.

3

Calculate F-statistic:
Place larger variance in numerator: s₁² = 0.036 (Machine A) and s₂² = 0.014 (Machine B).
F = 0.036 / 0.014 = 2.571

4

Critical value:
df₁ = 16 − 1 = 15; df₂ = 21 − 1 = 20.
From the F-table at α/2 = 0.025: F_critical(15, 20) ≈ 2.57

5

Decision: F = 2.571 ≈ F_critical = 2.57. The test statistic sits right at the boundary. The p-value ≈ 0.050. At α = 0.05, we are at the edge — the decision depends on the exact F-table precision. With p ≈ 0.05, most researchers report this as borderline significant and would investigate further.

⚠️ Conclusion: The F-statistic (2.57) equals the critical value at the 5% level, placing this result exactly at the boundary of statistical significance. In practice, the quality team should collect more data or use Levene's Test to confirm whether Machine A is genuinely less consistent than Machine B.

Example 2 — Comparing Student Score Variability

Worked Example 2 — Education Research

Problem: A researcher compares exam score variability between two teaching methods. Class A (n = 25 students, s₁² = 144) vs. Class B (n = 31 students, s₂² = 49). Test whether Class A has significantly greater variance at α = 0.05 (one-tailed).

F-Test Formula — One-Tailed (Right)
F = 144 / 49 = 2.939
df₁ = 24 (Class A) df₂ = 30 (Class B) One-tailed: compare F to F_critical at α = 0.05
1

Hypotheses: H₀: σ_A² = σ_B²  |  H₁: σ_A² > σ_B² (one-tailed — the researcher predicts Class A is more variable)

2

α = 0.05, one-tailed. The direction is specified in advance: Class A is hypothesized to be more variable. So σ_A² goes in the numerator regardless of which is larger (here it is larger). Critical value comes from the α = 0.05 column (not α/2) of the F-table.

3

F-statistic:
F = s_A² / s_B² = 144 / 49 = 2.939

4

Critical value:
df₁ = 24; df₂ = 30.
From the F-table at α = 0.05: F_critical(24, 30) ≈ 1.89

5

Decision: F = 2.939 > F_critical = 1.89 → Reject H₀. The p-value ≈ 0.007, which is well below α = 0.05.

✅ Conclusion: At the 5% level, there is sufficient evidence that Class A exhibits significantly greater score variability than Class B (F(24,30) = 2.94, p ≈ 0.007). The teaching method associated with Class A produces less consistent outcomes, a finding with practical implications for instructional design.

Example 3 — Clinical Trial Measurement Consistency

Worked Example 3 — Healthcare / Clinical Research

Problem: A clinical trial compares two blood pressure measurement devices. Device X is tested on 11 patients (s₁² = 9.6 mmHg²); Device Y on 11 patients (s₂² = 3.2 mmHg²). Do the devices differ in measurement consistency? Test at α = 0.05, two-tailed.

F-Test — Clinical Measurement Variance
F = 9.6 / 3.2 = 3.000
df₁ = 11 − 1 = 10 df₂ = 11 − 1 = 10 F_critical at α/2 = 0.025
1

Hypotheses: H₀: σ_X² = σ_Y²  |  H₁: σ_X² ≠ σ_Y² (two-tailed — no prior expectation about direction)

2

α = 0.05, two-tailed. Normality checked for both groups (n = 11 each — small samples, so normality is especially important here). Critical value uses α/2 = 0.025.

3

F-statistic:
Larger variance: Device X, s₁² = 9.6.
F = 9.6 / 3.2 = 3.000

4

Critical value:
df₁ = df₂ = 10.
From the F-table at α/2 = 0.025: F_critical(10, 10) = 3.717

5

Decision: F = 3.000 < F_critical = 3.717 → Fail to Reject H₀. The p-value ≈ 0.125, which exceeds α = 0.05.

❌ Conclusion: The data does not provide sufficient evidence (p ≈ 0.125) to conclude that the two devices differ in measurement consistency. However, with only 11 patients per group, the test has limited statistical power. A larger study would be needed to detect smaller but potentially clinically meaningful differences in variance.

F-test methodology follows the framework in Snedecor, G.W. and Cochran, W.G. (1989). Statistical Methods, 8th ed. Iowa State University Press. Critical values verified against the NIST F-Distribution Critical Values Table.

Free F-Test Calculator

Enter the sample variances and sizes for your two groups. The calculator computes the F-statistic, degrees of freedom, and approximate p-value, then displays a plain-English decision. For the critical value, consult the F-distribution table.

F-Test Calculator — Compare Two Variances

F-Distribution Curve (interactive result visualized above)

The shaded region represents the rejection area at α = 0.05 for F(10,10). Run the calculator to see your result plotted.

F-Test vs. Levene's Test vs. Bartlett's Test vs. Brown-Forsythe

Four tests can compare variances across groups, but they differ in when to use them and how sensitive they are to assumption violations. Choosing the right one depends on your sample size, data distribution, and tolerance for false positives.

Feature F-Test Levene's Test Bartlett's Test
Groups compared 2 groups only 2 or more groups 2 or more groups
Normality required? Yes — strictly No — robust Yes — strictly
Sensitive to outliers? Very sensitive Moderately sensitive Very sensitive
Recommended when? Data is clearly normal, 2 groups Normality uncertain, any groups Data is clearly normal, multiple groups
Software default? Excel (F-Test option) SPSS, R (car package) R, SAS
ANOVA prerequisite? Commonly used Most common choice Also used
Practical Recommendation

For most applied research, Levene's Test is the safer default when checking the equal-variance assumption before a t-test or ANOVA. Reserve the F-Test for situations where you have strong evidence of normality and are comparing exactly two groups. The Brown-Forsythe Test (a variant of Levene's using medians instead of means) is the most robust choice when outliers are a concern.

F-Test and ANOVA: What's the Connection?

ANOVA (Analysis of Variance) uses the same F-statistic to test whether group means differ — but for a different purpose. In ANOVA, the F-ratio compares variance between groups to variance within groups. In the two-sample variance test, the F-ratio compares the spread of two populations directly. The mathematics share the same distribution; the hypotheses differ.

When you run a one-way ANOVA, the F-test for variance equality (homogeneity of variance) is a prerequisite check — you verify equal variances first so that ANOVA's pooled error term is valid. If variances are unequal, Welch's ANOVA is the appropriate alternative. The full procedure is covered in the ANOVA guide.

How to Run an F-Test in Excel, R, and Python

F-Test in Excel

Excel has a built-in F-Test Two-Sample for Variances tool. Go to Data → Data Analysis → F-Test Two-Sample for Variances. Enter the two data ranges, the significance level, and choose an output location. Excel returns the F-statistic, p-value (one-tailed), and critical value. Note: Excel returns the one-tailed p-value, so multiply by 2 for a two-tailed test.

You can also use the F.TEST(array1, array2) function, which returns the two-tailed probability directly, or F.DIST(F, df1, df2, TRUE) for the cumulative distribution function.

F-Test in R

The var.test() function performs the F-Test in base R. The call is:

R Code — F-Test for Two Variances
# Two-tailed F-test
var.test(group1, group2, alternative = "two.sided")

# One-tailed (group1 has greater variance)
var.test(group1, group2, alternative = "greater")

# With raw variances and sample sizes
var.test(x = c(var1 = s1sq), df1 = n1-1, df2 = n2-1)

The output includes F, df, p-value, confidence interval for the variance ratio, and the alternative hypothesis. For Levene's Test in R, use leveneTest() from the car package.

F-Test in Python

Python Code — F-Test for Two Variances
import numpy as np
from scipy import stats

# F-statistic (manual)
f_stat = np.var(group1, ddof=1) / np.var(group2, ddof=1)
df1 = len(group1) - 1
df2 = len(group2) - 1

# Two-tailed p-value
p_value = 2 * min(stats.f.cdf(f_stat, df1, df2),
                1 - stats.f.cdf(f_stat, df1, df2))

# Levene's Test (preferred in practice)
stats.levene(group1, group2)

Python's scipy.stats library does not have a direct f_test function, but the F-statistic and p-value are straightforward to compute manually, as shown above. The SciPy statistics documentation covers stats.levene() and stats.bartlett() as alternatives.

Real-World Applications of the F-Test

The F-Test appears across manufacturing, healthcare, agriculture, and education wherever consistency and variability matter as much as average performance. Here are the most common applied contexts.

🏭

Manufacturing QC

Comparing the consistency of two machines, production lines, or suppliers. A machine producing consistent output is preferable even if both meet the mean specification.

💊

Pharmaceutical Research

Testing whether two drug formulations produce equal variability in blood concentration levels. Consistency in dosage response is a regulatory requirement.

📊

ANOVA Prerequisites

Checking homogeneity of variance before running one-way or two-way ANOVA. If variances are unequal across groups, Welch's ANOVA should be used instead.

🌾

Agricultural Experiments

Comparing yield variability across plots treated with different fertilizers or irrigation methods to assess process stability, not just average output.

📚

Educational Assessment

Testing whether two classrooms, teaching methods, or schools produce equally consistent test score distributions — a measure of outcome equity.

💹

Finance and Risk

Comparing the volatility (variance of returns) of two investment portfolios or financial instruments during different market periods.

🔬

Laboratory Testing

Evaluating whether two analytical instruments produce measurements with equivalent precision before selecting one for routine use in a diagnostic lab.

⚙️

Process Improvement

In Six Sigma and lean manufacturing, comparing process variability before and after an improvement intervention to verify that the change reduced variance.

Case Study — Process Improvement

Did Six Sigma Training Reduce Assembly Line Variability?

A production manager at an electronics plant ran a Six Sigma improvement project targeting the time taken to assemble circuit boards. Before the project: n₁ = 20 assemblies, s₁² = 28.6 min². After: n₂ = 20 assemblies, s₂² = 11.4 min². F = 28.6/11.4 = 2.51. With df₁ = df₂ = 19 and α = 0.05 (one-tailed, since the project was designed to reduce variance), F_critical(19,19) = 2.17. Because F = 2.51 > 2.17, the manager rejects H₀ and concludes the Six Sigma project significantly reduced assembly time variability — a meaningful improvement in process control beyond the reduction in average time.

When to Use the F-Test: Decision Guide

F-Test Decision Framework

Do you want to compare the variances of two groups?
Yes — consider the F-Test or its alternatives
Are both populations normally distributed (verified)?
Yes: F-Test is valid. No: Use Levene's or Brown-Forsythe
Do you have more than 2 groups to compare?
Yes: Use Bartlett's (normal) or Levene's (non-normal) instead
Are there extreme outliers in your data?
Yes: Avoid the F-Test — use Brown-Forsythe (median-based)
Are you checking variance equality before a t-test?
F-Test or Levene's. If unequal: use Welch's t-test

Common Mistakes When Using the F-Test

Common Mistake Wrong Approach Correct Approach
Ignoring the normality assumption Running F-Test on skewed or heavy-tailed data Check Q-Q plots and Shapiro-Wilk first; use Levene's if normality fails
Placing smaller variance in numerator F = s₂²/s₁² giving F < 1, then comparing to wrong tail Always put the larger variance in the numerator so F ≥ 1
Wrong α for two-tailed test Using α = 0.05 column for a two-tailed F-test Use α/2 = 0.025 column in the F-table for two-tailed tests
Wrong degrees of freedom Using n₁ and n₂ directly as df df₁ = n₁ − 1, df₂ = n₂ − 1 (always subtract 1)
"Accepting" H₀ "The F-test proves the variances are equal" "Fail to reject H₀ — insufficient evidence of a difference"
Using paired data Comparing before/after variances with the standard F-Test Paired variance tests require a different approach (e.g., Morgan-Pitman test)

F-Test Glossary: Key Terms Defined

Term Symbol Definition
F-StatisticFThe ratio of two sample variances: F = s₁²/s₂². Values much greater than 1 suggest unequal population variances.
F-DistributionF(df₁, df₂)A right-skewed probability distribution defined by two degrees-of-freedom parameters. The F-statistic follows this distribution under H₀.
Variances² or σ²The average squared deviation from the mean. Measures spread/dispersion. Sample variance uses n−1 (Bessel's correction); population variance uses N.
Variance Ratios₁²/s₂²The F-statistic for comparing two variances. Equal to 1 when both samples have identical variance.
Homogeneity of VarianceThe condition that two or more populations have equal variances. A prerequisite for standard t-tests and ANOVA.
Degrees of FreedomdfThe number of independent values used to estimate a parameter. For variance: df = n − 1. For F: two df values (numerator and denominator).
Critical ValueF_criticalThe F-value from the F-table at which you reject H₀. Depends on α, df₁, and df₂.
p-valuepThe probability of observing an F-statistic as extreme as yours (or more extreme) if H₀ is true. Reject H₀ when p < α.
Significance LevelαThe pre-set probability threshold for rejecting H₀. Common values: 0.05, 0.01, 0.10.
Null HypothesisH₀For the F-Test: H₀: σ₁² = σ₂². The default assumption that the two population variances are equal.
Alternative HypothesisH₁The claim under test. Two-tailed: H₁: σ₁² ≠ σ₂². One-tailed: H₁: σ₁² > σ₂².
Type I ErrorαRejecting H₀ when it is actually true (false positive). The probability of a Type I error equals α.
Statistical SignificanceThe result is unlikely under H₀ at the chosen α level. Statistical significance does not imply practical importance.

Frequently Asked Questions About the F-Test

The F-Test for two variances determines whether two populations have equal variances. It is commonly used to check the equal-variance assumption before performing a pooled two-sample t-test or ANOVA. The F-statistic is also used in regression analysis to evaluate whether the overall model explains a significant amount of variation in the response variable.
The F-Test compares the variances of two groups, whereas the t-test compares their means. In practice, an F-Test is often performed first to determine whether equal variances can be assumed. If the variances are equal, a pooled t-test is appropriate. If they are unequal, Welch's t-test is usually the better choice.
An F-value of exactly 1 means the two sample variances are identical because their ratio equals one. Although this is uncommon with real data, values close to 1 generally suggest that the population variances are similar. A formal conclusion still requires comparing the F-statistic with the critical value or examining the p-value.
Both versions are available. A two-tailed F-Test is the most common because it tests whether the two variances differ in either direction. A one-tailed F-Test is appropriate only when there is a specific hypothesis that one population variance is greater than the other.
A significant F-Test indicates that the assumption of equal variances has been violated. In this situation, standard one-way ANOVA may not be appropriate. Welch's ANOVA is generally recommended because it does not require equal variances and provides more reliable results when group variances differ.
There is no fixed minimum sample size, but the F-Test performs better with moderate to large samples. Very small samples have limited power to detect differences in variances and make it more difficult to verify the normality assumption. Many researchers recommend at least 15 to 20 observations per group whenever possible.
No. The standard F-Test for variances compares only two groups. When you need to compare the variances of three or more groups, Bartlett's Test or Levene's Test should be used instead. Levene's Test is generally preferred because it is more robust when the normality assumption is not satisfied.
The chi-square test evaluates whether a single population variance equals a specified value, while the F-Test compares the variances of two populations. Mathematically, the F-distribution is formed from the ratio of two independent chi-square distributions divided by their respective degrees of freedom, making the chi-square distribution the foundation of the F-Test.

F-Test Cheat Sheet

Item Detail
Test statisticF = s₁² / s₂² (larger variance in numerator)
Null hypothesisH₀: σ₁² = σ₂²
Alternative (two-tailed)H₁: σ₁² ≠ σ₂²
Alternative (one-tailed)H₁: σ₁² > σ₂²
Numerator dfdf₁ = n₁ − 1
Denominator dfdf₂ = n₂ − 1
Two-tailed critical valueLook up F(df₁, df₂) at α/2 in F-table
One-tailed critical valueLook up F(df₁, df₂) at α in F-table
Reject H₀ whenF > F_critical, or p < α
Fail to reject H₀ whenF ≤ F_critical, or p ≥ α
Excel functionF.TEST(array1, array2) or Data Analysis → F-Test
R functionvar.test(x, y, alternative = "two.sided")
Python (SciPy)scipy.stats.levene(x, y) or manual F = var(x)/var(y)
Key assumptionBoth populations normally distributed
Robust alternativeLevene's Test or Brown-Forsythe Test
F = s₁²/s₂²
Core Formula
n − 1
Degrees of Freedom (each group)
α/2
Table column for two-tailed test
F ≥ 1
Always (larger variance in numerator)