An F-test for two variances compares variability in two independent populations. Under the equal-variance null, calculate F = s₁²/s₂², with numerator degrees of freedom n₁−1 and denominator degrees of freedom n₂−1. Use the appropriate F-distribution tail to obtain a p-value; reject equality when p is below the chosen significance level, provided the normality and independence assumptions hold.
F-Test Examples at a Glance
The seven problems below cover two-sided, right-sided, and left-sided tests, along with standard deviations, critical cutoffs, and raw data. The calculations use a fixed group order: group 1 is always the numerator.
| Example | F statistic | Tail | p-value | α = .05 decision |
|---|---|---|---|---|
| 1. Two-sided | 3.0625 | Two | 0.0375 | Reject H₀ |
| 2. Right-tailed | 3.0625 | Right | 0.0188 | Reject H₀ |
| 3. Left-tailed | 0.3600 | Left | 0.0183 | Reject H₀ |
| 4. Not significant | 1.3889 | Two | 0.5581 | Fail to reject |
| 5. SDs given | 3.0625 | Two | 0.0375 | Reject H₀ |
| 6. Critical value | 2.5000 | Right | 0.0505 | Fail to reject |
| 7. Raw data | 7.0000 | Two | 0.0199 | Reject H₀ |
What Is an F-Test?
An F-test for two variances compares the variability of two independent populations. Under H₀: σ₁² = σ₂², the ratio of sample variances F = s₁²/s₂² follows an F distribution with df₁ = n₁ − 1 and df₂ = n₂ − 1 if the samples are independent and from normal populations.
The name F-test also describes tests used in ANOVA, regression, and nested-model comparisons. This tutorial concerns only the classical test of two population variances. For a broader explanation, read the F-test guide.
F-Test Formula and Degrees of Freedom
s₁² = sample 1 variances₂² = sample 2 variancedf₁ = n₁ − 1df₂ = n₂ − 1For example, if the sample variances are 49 and 16, F = 49/16 = 3.0625. If they are supplied as standard deviations 7 and 4, square them first. The sample variance formula is s² = Σ(x − x̄)² / (n − 1); see the variance explanation and standard deviation versus variance.
Do not automatically put the larger variance on top. If you reverse the ratio, F becomes 1/F and the numerator and denominator degrees of freedom swap. For the more general null H₀: σ₁²/σ₂² = δ₀, use F = (s₁²/s₂²)/δ₀. In these examples δ₀ = 1.
Assumptions of the Two-Variance F-Test
- The two samples are independent; measurements within each sample are also appropriately independent.
- The observations measure quantitative variables.
- For an exact classical test, each sampled population is normally distributed.
- The data-generating or sampling design supports the intended population inference.
The classical variance-ratio test is particularly sensitive to skewness, heavy tails, and extreme outliers. For nonnormal data, consider Levene’s or Brown–Forsythe’s test rather than relying on an F p-value. See NIST’s F-test reference and OpenStax on variance tests.
How to Solve an F-Test Step by Step
Keep the question and group labels visible while you work. A right-tailed or left-tailed hypothesis changes the relevant probability, not the variance ordering.
F-Test Calculator: Check Each Worked Example
Enter two sample variances (or standard deviations), sample sizes, and your alternative hypothesis. The calculator runs entirely in your browser without an API. The F statistic, degrees of freedom, p-value, critical region, and decision update when you select Calculate F-test.
Understanding the F Distribution and Rejection Tails
The F distribution only takes nonnegative values and is generally right-skewed. It is not symmetric around zero: a two-sided F-test has a distinct lower cutoff and upper cutoff, never ±F. The chart below reflects the calculator’s selected degrees of freedom, tail, and significance level.
To understand why the curve changes as df₁ and df₂ change, see the F distribution guide and degrees of freedom.
Example 1: Two-Tailed F-Test for Equal Variances
Problem
Two manufacturing processes make the same part. Is the variability different between Process A (group 1) and Process B (group 2)?
Given: n₁ = 20; n₂ = 15; s₁² = 49; s₂² = 16; α = 0.05. Two-sided alternative.
F(19, 14) = 49 / 16 = 3.0625- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² = σ₂². H₁: σ₁² ≠ σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. The supplied sample variances are s₁² = 49 and s₂² = 16.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 49/16 = 3.0625.
- Step 6: Calculate degrees of freedom. df₁ = 20 − 1 = 19; df₂ = 15 − 1 = 14.
- Step 7: Obtain p-value / critical cutoff. Two-sided p = 0.037513. Lower cutoff = 0.3778; upper cutoff = 2.8607. Reject outside this interval.
- Step 8: Make the decision. Reject H₀ because p < α
- Step 9: Interpret in context. At the 5% level, the sample provides evidence that the processes have different population variances.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Reject H₀. F(19, 14) = 3.0625, two-sided p = 0.0375.
Example 2: Right-Tailed F-Test
Problem
Using those same process samples, a supervisor specifically asks whether Process A has greater population variance than Process B.
Given: n₁ = 20; n₂ = 15; s₁² = 49; s₂² = 16; α = 0.05. Right-tailed alternative.
F(19, 14) = 49 / 16 = 3.0625- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² ≤ σ₂². H₁: σ₁² > σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. The supplied sample variances are s₁² = 49 and s₂² = 16.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 49/16 = 3.0625.
- Step 6: Calculate degrees of freedom. df₁ = 20 − 1 = 19; df₂ = 15 − 1 = 14.
- Step 7: Obtain p-value / critical cutoff. Right-tailed p = 0.018757. Upper cutoff = 2.4000. Reject if F is greater than this value.
- Step 8: Make the decision. Reject H₀ because p < α
- Step 9: Interpret in context. At the 5% level, there is evidence that Process A has greater population variance than Process B. Greater variability is not automatically worse.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Reject H₀. F(19, 14) = 3.0625, right-tailed p = 0.0188.
Example 3: Left-Tailed F-Test
Problem
An analyst asks whether the first packaging line has lower population variance in fill weight than the second.
Given: n₁ = 18; n₂ = 22; s₁² = 9; s₂² = 25; α = 0.05. Left-tailed alternative.
F(17, 21) = 9 / 25 = 0.3600- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² ≥ σ₂². H₁: σ₁² < σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. The supplied sample variances are s₁² = 9 and s₂² = 25.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 9/25 = 0.3600.
- Step 6: Calculate degrees of freedom. df₁ = 18 − 1 = 17; df₂ = 22 − 1 = 21.
- Step 7: Obtain p-value / critical cutoff. Left-tailed p = 0.018328. Lower cutoff = 0.4507. Reject if F is smaller than this value.
- Step 8: Make the decision. Reject H₀ because p < α
- Step 9: Interpret in context. At the 5% level, there is evidence that Population 1 has a lower variance than Population 2.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Reject H₀. F(17, 21) = 0.3600, left-tailed p = 0.0183.
Example 4: A Result That Fails to Reject H₀
Problem
Two suppliers have sample variances of 25 and 18. Does this sample demonstrate a difference in their population variances?
Given: n₁ = 16; n₂ = 14; s₁² = 25; s₂² = 18; α = 0.05. Two-sided alternative.
F(15, 13) = 25 / 18 = 1.3889- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² = σ₂². H₁: σ₁² ≠ σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. The supplied sample variances are s₁² = 25 and s₂² = 18.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 25/18 = 1.3889.
- Step 6: Calculate degrees of freedom. df₁ = 16 − 1 = 15; df₂ = 14 − 1 = 13.
- Step 7: Obtain p-value / critical cutoff. Two-sided p = 0.558120. Lower cutoff = 0.3419; upper cutoff = 3.0527. Reject outside this interval.
- Step 8: Make the decision. Fail to reject H₀ because p ≥ α
- Step 9: Interpret in context. The data do not provide enough evidence of different population variances at the 5% level; this is not proof of equality.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Fail to reject H₀. F(15, 13) = 1.3889, two-sided p = 0.5581.
Example 5: When Standard Deviations Are Given
Problem
A report provides sample standard deviations of 7 and 4 instead of sample variances. Test whether population variances differ.
Given: n₁ = 20; n₂ = 15; s₁² = 49; s₂² = 16; α = 0.05. Two-sided alternative.
F(19, 14) = 49 / 16 = 3.0625- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² = σ₂². H₁: σ₁² ≠ σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. Sample SDs are s₁ = 7 and s₂ = 4. Square each: s₁² = 7² = 49 and s₂² = 4² = 16. Do not use 7/4 as F.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 49/16 = 3.0625.
- Step 6: Calculate degrees of freedom. df₁ = 20 − 1 = 19; df₂ = 15 − 1 = 14.
- Step 7: Obtain p-value / critical cutoff. Two-sided p = 0.037513. Lower cutoff = 0.3778; upper cutoff = 2.8607. Reject outside this interval.
- Step 8: Make the decision. Reject H₀ because p < α
- Step 9: Interpret in context. After squaring the sample standard deviations, the same data support different population variances at the 5% level.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Reject H₀. F(19, 14) = 3.0625, two-sided p = 0.0375.
Example 6: Using a Critical Value Instead of a p-Value
Problem
With n₁ = 12 and n₂ = 16 and sample variances 25 and 10, a production engineer asks whether group 1 has greater population variance. Work primarily from a critical cutoff.
Given: n₁ = 12; n₂ = 16; s₁² = 25; s₂² = 10; α = 0.05. Right-tailed alternative.
F(11, 15) = 25 / 10 = 2.5000- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² ≤ σ₂². H₁: σ₁² > σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. The supplied sample variances are s₁² = 25 and s₂² = 10.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 25/10 = 2.5000.
- Step 6: Calculate degrees of freedom. df₁ = 12 − 1 = 11; df₂ = 16 − 1 = 15.
- Step 7: Obtain p-value / critical cutoff. Critical-value method: Upper cutoff = 2.5068. Reject if F is greater than this value.
- Step 8: Make the decision. Fail to reject H₀: F = 2.5000 is inside the nonrejection region.
- Step 9: Interpret in context. Because the observed F falls below the upper-tail cutoff, we fail to reject H₀ at the 5% level.
- Step 10: State a limitation. This conclusion depends on independence and normality; unusually skewed or outlier-prone populations can invalidate the exact F reference distribution.
Fail to reject H₀. F(11, 15) = 2.5000, right-tailed p = 0.0505.
Example 7: An F-Test Starting With Raw Data
Problem
Two independent samples of eight quantitative measurements are recorded. Are the population variances different? Group 1: 7, 10, 9, 12, 8, 14, 11, 13. Group 2: 8, 9, 10, 9, 10, 11, 9, 10.
Given: n₁ = 8; n₂ = 8; s₁² = 6; s₂² = 0.857143; α = 0.05. Two-sided alternative.
F(7, 7) = 6 / 0.857143 = 7.0000- Step 1: Identify the parameter. We compare the population variances σ₁² and σ₂², not population means.
- Step 2: Write H₀ and H₁. H₀: σ₁² = σ₂². H₁: σ₁² ≠ σ₂². Set α = 0.05.
- Step 3: Check assumptions. Assume independent random samples from normal populations for the exact classical test.
- Step 4: Calculate sample variances. Group 1: mean = 10.5, Σ(x − x̄)² = 42, s₁² = 42/7 = 6. Group 2: mean = 9.5, Σ(x − x̄)² = 6, s₂² = 6/7 = 0.857143.
- Step 5: Calculate F. Keep group 1 in the numerator: F = 6/0.857143 = 7.0000.
- Step 6: Calculate degrees of freedom. df₁ = 8 − 1 = 7; df₂ = 8 − 1 = 7.
- Step 7: Obtain p-value / critical cutoff. Two-sided p = 0.019942. Lower cutoff = 0.2002; upper cutoff = 4.9949. Reject outside this interval.
- Step 8: Make the decision. Reject H₀ because p < α
- Step 9: Interpret in context. At the 5% level, these small samples yield evidence of unequal population variances, assuming the underlying populations are normal.
- Step 10: State a limitation. There are only eight observations per group. The assumed population normality is not established from these numbers; the example illustrates arithmetic, not an automatic analysis recommendation.
Reject H₀. F(7, 7) = 7.0000, two-sided p = 0.0199.
p-Value Method vs Critical-Value Method
Both methods must give the same decision when they use the same α, df values, and alternative hypothesis. For Example 1, F(19,14) = 3.0625 lies above the two-sided upper critical value 2.8607, and the p-value 0.0375 is below 0.05. Both reject equality.
| Alternative | p-value | Reject at level α when… |
|---|---|---|
| σ₁² ≠ σ₂² | 2 × min(CDF, SF), max 1 | F < Fα/2 or F > F1−α/2 |
| σ₁² > σ₂² | SF(F) | F > F1−α |
| σ₁² < σ₂² | CDF(F) | F < Fα |
Here Fq denotes the lower-tail q quantile. Some printed F tables instead label critical values by upper-tail area. Confirm the table’s convention before using it. How to interpret a p-value and the significance level provide more context.
F-Test vs ANOVA, Levene, and Brown–Forsythe
| Procedure | What it evaluates | Key caveat |
|---|---|---|
| Classical two-variance F-test | Whether two population variances are equal | Highly sensitive to departures from normality |
| ANOVA F-test | Whether the group population means are all equal, using a between/within mean-square ratio | Not the same hypotheses or statistic as this page |
| Levene’s test | Homogeneity of variance, commonly over two or more groups | Often more robust to nonnormality |
| Brown–Forsythe variant | Variance homogeneity using deviations from group medians | Commonly preferable with skew/outliers, still needs appropriate independence |
If your actual question concerns means rather than two variances, follow ANOVA and the worked ANOVA examples, or use the ANOVA calculator. The equal vs unequal variance guide explains why variance assumptions matter. Do not automatically run an F-test as a required preliminary step before every pooled t-test; Welch’s t-test is often a sound default for comparing two means.
Common F-Test Mistakes
| Mistake | Correction |
|---|---|
| Divide standard deviations directly | Square them first: 7²/4² = 49/16. |
| Always put the larger variance on top | Preserve group labels; update tail and df if reversing the ratio. |
| Use ±F critical | F is nonnegative and skewed; compute separate lower and upper cutoffs. |
| Swap df₁ and df₂ | Numerator df belongs to the sample variance actually on top. |
| Ignore skewness and outliers | Inspect histograms/Q–Q plots and consider robust alternatives. |
| Say p is the probability H₀ is true | The p-value describes data extremeness under H₀ and its assumptions. |
| Claim no significant difference proves equality | Failing to reject is not proof of equality or equivalence. |
| Use the ANOVA mean-square ratio here | ANOVA’s F statistic answers a different question. |
F-Test Practice Problems With Solutions
Work each problem before opening its solution. The questions cover tail direction, variance conversion, interpretation, and model choice.
1. Two-sided variance comparison
n₁ = 18, s₁² = 30; n₂ = 14, s₂² = 12. Test equality at α = .05.
Show full solution
2. Right-tailed machine example
Machine A: n₁ = 19, s₁² = 24. Machine B: n₂ = 15, s₂² = 9. Is A more variable at α = .05?
Show full solution
3. Left-tailed example
n₁ = 12, s₁² = 9; n₂ = 17, s₂² = 21. Test whether variance 1 is smaller at α = .05.
Show full solution
4. Given standard deviations
Group 1: n₁ = 15, s₁ = 6. Group 2: n₂ = 19, s₂ = 4. Test unequal variances at α = .05.
Show full solution
5. Interpret a test statistic
A right-tailed F-test reports F(8,12) = 2.10, at α = .05. What does it mean?
Show full solution
6. Interpret a large p-value
A two-sided test returns p = .21 with α = .05. What can be concluded?
Show full solution
7. Select a sensible method
Dataset A contains two roughly normal independent samples. Dataset B contains extremely skewed samples with severe outliers. Which is more suitable for the classical F-test?
Show full solution
8. Recognize the ANOVA F-statistic
A report defines F = MSbetween/MSwithin for three independent groups. Is this the two-variance F-test taught here?
Show full solution
Frequently Asked Questions
What is an example of an F-test?
A factory compares two independent process variances: 49 from 20 observations and 16 from 15. The statistic is F = 49/16 = 3.0625 with df = (19,14). A two-sided p-value of about 0.0375 leads to rejection of equal population variances at α = 0.05, provided the classical assumptions hold.
How do you calculate an F-test for two variances?
Divide the first sample variance by the second; set numerator df to n₁ − 1 and denominator df to n₂ − 1. Use the F distribution with those degrees of freedom to find the relevant tail probability or critical value.
Can an F statistic be less than 1?
Yes. If the variance in the numerator is smaller, F is below 1. For a left-tailed test, such a result may be evidence against the null hypothesis.
How do you find degrees of freedom for an F-test?
For F = s₁²/s₂², numerator degrees of freedom are n₁ − 1 and denominator degrees of freedom are n₂ − 1. Keep the degrees of freedom in the same order as the variances.
What does a two-tailed F-test mean?
It tests whether the two population variances differ in either direction. Compare the observed F statistic with lower and upper F cutoffs, or compute p = 2 × min(lower-tail probability, upper-tail probability), capped at 1.
What assumptions does the classical F-test require?
Two independent samples, independent observations within samples, quantitative measurements, and normally distributed source populations are required for the exact classical variance-ratio test. It is sensitive to nonnormality and outliers.
What is the difference between an F-test and ANOVA?
The two-variance F-test compares two population variances. ANOVA also uses an F statistic, but its mean-square ratio is used to assess differences among group population means.
Does p greater than .05 prove the variances are equal?
No. A nonsignificant result only means the data do not provide enough evidence to reject the null at the chosen threshold. It does not establish equality or practical equivalence.
Key Takeaways
- Use F = s₁²/s₂² with df = (n₁−1, n₂−1) for the standard equal-variance null.
- Keep sample labels, variance order, df order, and the alternative hypothesis consistent.
- A two-sided F-test uses two positive critical cutoffs, not a symmetric ± rule.
- A p-value below α provides evidence against equality; a p-value above α does not prove equality.
- Population normality is particularly important for the classical variance test.
Next: go back to the Hypothesis Testing main category, or browse additional hypothesis testing examples.
References and further reading
- NIST/SEMATECH: F-Test for Equality of Two Variances — hypotheses, critical regions, and example.
- NIST Dataplot: F Test — normality sensitivity and test types.
- OpenStax: Test of Two Variances — student-oriented assumptions and worked methods.