Compare › Robust / variance

F-test for two variances

The F-test compares two variances for equality; it is sensitive to non-normality, so prefer Levene's test when the data have heavy tails.

What is F-test for two variances?

Under H₀: σ₁ = σ₂, the ratio s₁² / s₂² follows F(n₁−1, n₂−1). It's the textbook test for variance equality but inherits a notorious sensitivity to non-normality — heavy-tailed data inflate the type-I rate substantially.

Levene's test (mean-deviation ANOVA) and Brown-Forsythe (median-deviation) are much more robust to non-normality and are the standard pre-tests for choosing classical vs Welch ANOVA. Use the F-test only when normality is solid.

When should I use F-test for two variances?

  • Variance comparison when both samples are clearly normal.
  • Pre-test for choosing Student vs Welch t-test — but better: just always use Welch.

What data does it need?

Two numeric columns; optional null variance ratio.

What does it report?

F statistic + num/denom df + p + CI on the variance ratio.

What does it assume?

  • Independent samples.
  • Normal distribution in each group (strictly required).

How do I interpret the result?

CI on variance ratio not crossing 1 ⇒ variances differ. With non-normal data, Levene or Brown-Forsythe give more reliable p-values.

See also