F Test Intro: Explained with Examples, Concepts and Examples
The F-test compares two variances by looking at their ratio. If two machines or two investment portfolios produce data with very different spreads, the F-test tells you whether that difference is real or just sampling noise. It is also the engine inside ANOVA.
Comparing variability matters as much as comparing averages. A drug that works brilliantly for some patients and terribly for others has the same average effect as one that works moderately for everyone — but the consistent drug is far safer to prescribe.
Key Concepts
- Variance ratio: F = s₁² / s₂². If the two population variances are equal, this ratio hovers near 1; far from 1 suggests a real difference.
- Degrees of freedom (pair): df₁ = n₁ − 1 for the numerator, df₂ = n₂ − 1 for the denominator. The F-distribution is defined by this pair.
- Always non-negative: F ≥ 0 by construction, and the distribution is right-skewed with a long tail of large values.
- Convention for two-sided tests: put the larger sample variance on top so F ≥ 1, then double the one-sided p-value.
- Link to ANOVA: ANOVA's test statistic is an F-ratio of between-group variance to within-group variance — same distribution, cleverer numerator.
Formulas
- Test statistic: F = s₁² / s₂², with df₁ = n₁ − 1 and df₂ = n₂ − 1.
- Decision rule: reject H₀: σ₁² = σ₂² when F exceeds the critical value F*(df₁, df₂) at your α (right tail), or when the p-value < α.
- Order matters: F(9, 11) and F(11, 9) are different distributions — always match df₁ to the numerator sample.
Assumptions: both samples random and independent, and both populations approximately normal — the F-test is notably sensitive to non-normality, so check this first.
Worked Example
Two filling machines are compared. Machine A: n = 10 bottles, s² = 4.2 mL². Machine B: n = 12 bottles, s² = 2.1 mL². Test H₀: σ₁² = σ₂² at α = 0.05 (two-sided).
- Form the ratio (larger on top): F = 4.2 / 2.1 = 2.00.
- Degrees of freedom: df₁ = 9, df₂ = 11.
- Critical value: for a two-sided test at α = 0.05, use the upper 0.025 point: F* ≈ 3.59 for (9, 11). (Tables often give the 0.05 point ≈ 2.90; either way the conclusion below holds.)
- Decision: 2.00 < 2.90, so fail to reject H₀.
- Conclusion: no significant evidence that the machines differ in consistency — the observed ratio of 2 could easily arise by chance with these small samples.
Common Misconceptions
- The F-test compares variances, not means. Its famous use in ANOVA compares means indirectly, through a ratio of variances — but a plain F-test on two samples is strictly about spread.
- Swapping numerator and denominator changes the test. The critical value depends on the ordered pair (df₁, df₂), so keep track of which sample is on top.
- It is fragile under non-normality. Heavy-tailed data inflates F and causes false rejections; for skewed data, Levene's test is the safer choice.
Real-World Applications
- Manufacturing: checking whether a new machine fills packets more consistently than the old one.
- Finance: comparing the volatility (variance of returns) of two stocks or funds before choosing the steadier investment.
- Agriculture: testing whether crop yields vary more across fields under one fertiliser than another.
- Before ANOVA: verifying the equal-variance assumption that ANOVA relies on.
The F-test is beautifully simple — one variance divided by another — yet it underpins ANOVA and any serious comparison of consistency. Remember its normality assumption, keep the degrees of freedom in order, and it will serve you well.
Related blogs
- Population and Sample: Statistics Basics Explained
- Sampling Methods: Random, Stratified & Cluster Guide
- Sampling Distributions: Mean, Proportion & CLT Guide
- Standard Error Explained: Formula, Uses and vs Standard
- Point Estimation: MLE and Method of Moments Explained
- Confidence Intervals: Concepts, Formulas and Examples