F-Test for Equality of Two Variances Calculator
Determine whether two population variances are equal using the F-test. Get the F-statistic, p-value, degrees of freedom, and a clear statistical decision.
Input the sample variance and sample size for each group, set the significance level, and instantly see whether the two variances are statistically equal.
F-Test for Equality of Two Variances
Test whether two independent samples have equal population variances
Group 1
Group 2
About the F-Test for Equality of Two Variances
The F-test for equality of two variances is a classical statistical procedure used to determine whether two independent populations have the same variance. Named after Sir Ronald A. Fisher, the test is widely used as a diagnostic check before applying a two-sample t-test, which assumes that the two groups have equal population variances. If the F-test rejects that assumption, the Welch t-test — which does not require equal variances — should be used instead.
The test statistic is the ratio of the two sample variances: F = s₁² / s₂². By convention, the larger sample variance is placed in the numerator so that F ≥ 1, which restricts all critical mass to the upper tail of the F-distribution and simplifies interpretation. The null hypothesis H₀ states that the population variances are equal (σ₁² = σ₂²), while the alternative hypothesis H₁ states that they differ (σ₁² ≠ σ₂²). The degrees of freedom are df₁ = n₁ − 1 (numerator) and df₂ = n₂ − 1 (denominator), where n₁ and n₂ are the respective sample sizes.
To evaluate significance, the calculated F-value is compared to the F-distribution with (df₁, df₂) degrees of freedom. For a two-tailed test, the p-value equals 2 × P(F > F_obs). If the p-value is less than or equal to the chosen significance level α (typically 0.05 or 0.01), H₀ is rejected and the variances are declared significantly different. The critical F-value at the chosen α provides an equivalent decision boundary: if F_obs > F_crit, reject H₀.
The F-test has broad practical applications. In manufacturing, it verifies whether two production lines produce parts with equal dimensional variability — a prerequisite for quality-control procedures that assume uniform processes. In clinical research, it checks whether two treatment groups have similar response variability, which affects both study design and interpretation. In finance, it compares the volatility of two assets or portfolios, informing risk assessment and diversification strategies. In agriculture, it evaluates whether two fertilisers produce crops with equal yield consistency.
Despite its power, the F-test has an important limitation: it is highly sensitive to departures from normality. Both samples must come from normally distributed populations for the test to be valid. When normality is uncertain, analysts often prefer the more robust Levene's test or the Brown–Forsythe test, which replace raw deviations from the mean with absolute deviations or median deviations. This calculator uses the exact F-distribution CDF via the regularised incomplete beta function, producing p-values consistent with R (var.test), Python (scipy.stats.levene), and SPSS.
F-Test for Equality of Variances — Examples
Three worked examples from manufacturing, education, and finance.
| Input | Result | Context |
|---|---|---|
| s₁² = 0.34, n₁ = 25; s₂² = 0.29, n₂ = 25; α = 0.05 | F = 1.1724, p ≈ 0.6767 — fail to reject H₀ | Two machines produce bolts. Bolt-diameter variances are not significantly different; both machines are equally consistent. |
| s₁² = 110, n₁ = 41; s₂² = 125, n₂ = 31; α = 0.05 | F = 1.1364, p ≈ 0.6679 — fail to reject H₀ | Two teaching methods. Test-score variances are statistically equal; both methods produce similar consistency of outcomes. |
| s₁² = 5.2, n₁ = 100; s₂² = 4.8, n₂ = 100; α = 0.01 | F = 1.0833, p ≈ 0.6366 — fail to reject H₀ | Two stocks compared for daily-return volatility. At the 1% level there is no evidence of different risk profiles. |
| s₁² = 18, n₁ = 16; s₂² = 12, n₂ = 16; α = 0.10 | F = 1.5, p ≈ 0.3952 — fail to reject H₀ | Plant height under two fertilisers. Variance in plant growth is not statistically different at the 10% level. |
How to use the F-Test for Equality of Variances Calculator
- Enter the sample variance (s²) for Group 1 — this is the mean squared deviation from the group mean — along with the number of observations (n) in that group.
- Enter the corresponding variance and sample size for Group 2 in the Group 2 fields.
- Choose a significance level α from the dropdown: 0.01 (1%), 0.05 (5%), or 0.10 (10%). The most common choice in published research is 0.05.
- Click 'Calculate'. The calculator automatically places the larger variance in the numerator, computes F = s_max²/s_min², calculates the two-tailed p-value using the F-distribution, and displays the critical F-value.
- Interpret the result: if p-value ≤ α, the variances are significantly different and you should use a Welch t-test instead of a standard equal-variance t-test. Otherwise, equal variances can be assumed.
F-Test for Equality of Variances — FAQ
What does the F-test for equality of variances test?
It tests the null hypothesis H₀: σ₁² = σ₂² against the alternative H₁: σ₁² ≠ σ₂². A significant result (p ≤ α) means the two population variances are statistically different. A non-significant result means the data are consistent with equal variances, but does not prove they are equal.
Why is the F-test used before a two-sample t-test?
The pooled two-sample t-test assumes that both groups have the same population variance. If this assumption is violated, the test can produce incorrect p-values. Running an F-test first checks this assumption: if the F-test is significant, use the Welch t-test instead, which does not assume equal variances.
What are the assumptions of the F-test for equality of variances?
Both samples must be drawn from normally distributed populations, and the samples must be independent of each other. The F-test is quite sensitive to non-normality — even moderate departures can distort the p-value. If normality is doubtful, use Levene's test or the Brown–Forsythe test instead.
Why is the larger variance always placed in the numerator?
Placing the larger variance in the numerator ensures F ≥ 1, which confines the critical region to the upper tail of the F-distribution and avoids the need to consult a lower-tail table. For a two-tailed test, the p-value is then simply 2 × P(F > F_obs), which is straightforward to compute.
How do I interpret the critical F-value?
The critical F-value (F_crit) is the value that cuts off the top α/2 of the F-distribution. If your calculated F exceeds F_crit, you reject H₀ at significance level α. Using the p-value and using the critical value always lead to the same decision — they are two equivalent ways of summarising the same comparison.
When should I use Levene's test instead of the F-test?
Levene's test is preferable when your data may not follow a normal distribution, because it is robust to non-normality. The F-test for equality of variances is the optimal test when normality holds, but its Type I error rate can be severely distorted by skewed or heavy-tailed data. In practice, many statisticians use Levene's test by default to avoid this risk.
Related tools
Coin Toss Streak Calculator - Consecutive Heads & Tails
Coin streak probability: find the chance of consecutive heads or tails in N tosses, or compute the expected tosses needed to achieve any streak length.
Population Variance Calculator - Dispersion Analysis
Calculate population variance, standard deviation, and mean for any data set. Free online statistical dispersion tool — paste numbers and get results instantly.
Tukey's HSD Calculator - Post-Hoc ANOVA Test
Perform Tukey's HSD post-hoc test after ANOVA. Compare all group mean pairs to find statistically significant differences with one free online tool.
Fisher's Exact Test Calculator - 2x2 Contingency Table
Run Fisher's Exact Test on a 2×2 contingency table. Get one-tailed and two-tailed p-values plus the odds ratio — ideal for small sample sizes in research.
Standard Deviation Calculator - Sample & Population SD
Standard deviation calculator: compute sample SD, population SD, mean, variance, and CV from any dataset. Enter numbers and get results instantly.
Dispersion Calculator - Variance, Std Dev & IQR
Dispersion calculator: enter comma-separated numbers to get range, variance, standard deviation, IQR, coefficient of variation, and MAD in one click.
Odds Ratio Calculator - OR, CI & P-Value from 2×2 Table
Odds ratio calculator for 2×2 contingency tables: compute OR, confidence interval, Z-score, and p-value for case-control and epidemiological research studies.
Two Envelopes Paradox Calculator - Decision Theory
Explore the Two Envelopes Paradox interactively. Calculate expected values for switching or keeping, and understand the probability math behind this puzzle.