Analysis of Variance Anova Intro: Explained with Examples
Analysis of Variance (ANOVA) tests whether three or more groups have the same mean, in a single test. Instead of running many pairwise t-tests — which inflates the chance of a false discovery — ANOVA asks one clean question: is the variation between the groups larger than the variation within them?
This matters because multi-group comparisons are everywhere: testing four fertilisers, five website designs, or three teaching methods. Running ten t-tests at α = 0.05 gives roughly a 40% chance of at least one false "significant" result. ANOVA holds the overall error rate at 5% with one elegant F-test.
Key Concepts
- Factor and levels: the grouping variable is the factor (for example, fertiliser); its categories are the levels (A, B, C).
- Between-group variation (SSB): how far the group means spread around the grand mean — large when the factor really matters.
- Within-group variation (SSW): the natural noise inside each group, unrelated to the factor.
- Mean squares: MSB = SSB / (k − 1) and MSW = SSW / (N − k), where k = number of groups and N = total observations.
- ANOVA identity: total variation splits exactly: SST = SSB + SSW.
- One-way vs two-way: one-way ANOVA has one factor; two-way adds a second factor (and can detect interactions).
Formulas
- Test statistic: F = MSB / MSW, with df₁ = k − 1 and df₂ = N − k.
- Decision rule: reject H₀ (all group means equal) when F exceeds the critical value F*(k−1, N−k) at your α.
- Mean squares: MSB = SSB/(k − 1); MSW = SSW/(N − k).
Assumptions: independent random samples, approximately normal populations, and equal population variances across groups (homoscedasticity).
Worked Example
Three teaching methods, 5 students each (N = 15). Group means: 70, 75, 80; grand mean = 75. Suppose SSW = 600. Test at α = 0.05.
- Between-group sum of squares: SSB = 5 × [(70−75)² + (75−75)² + (80−75)²] = 5 × (25 + 0 + 25) = 250.
- Mean squares: MSB = 250 / (3 − 1) = 125; MSW = 600 / (15 − 3) = 600 / 12 = 50.
- F statistic: F = 125 / 50 = 2.5, with df (2, 12).
- Critical value: F*(2, 12) at α = 0.05 ≈ 3.89.
- Decision: 2.5 < 3.89, so fail to reject H₀.
- Conclusion: no significant evidence that the teaching methods differ — the gaps between 70, 75, and 80 could be noise.
Common Misconceptions
- A significant F does not say which groups differ. ANOVA only detects that at least one mean differs from the rest; post-hoc tests (like Tukey's) are needed to identify the differing pairs.
- Significant ≠ all means differ. With means 70, 75, 80, perhaps only method 3 beats method 1 — ANOVA alone cannot tell you.
- ANOVA is not robust to unequal variances with unequal sample sizes. Check the equal-variance assumption (for example with Levene's test) before trusting the F.
Real-World Applications
- Agriculture: comparing yields across four fertiliser treatments in field trials — ANOVA's original home.
- Pharma: testing three dosage levels against a placebo in one trial instead of three.
- Marketing: comparing click-through rates of five ad creatives simultaneously.
- Education: evaluating several teaching methods or curricula on standardised test scores.
ANOVA replaces a pile of t-tests with one F-ratio: between-group variance over within-group variance. If the groups truly differ, their means spread wider than noise can explain, and F sounds the alarm — one test, one error rate, one clear answer.
Related blogs
- Scatter Diagrams: Reading Correlation from Plots Guide
- Karl Pearson's correlation coefficient Explained with
- Spearman's rank correlation Explained with Examples
- Lines of Regression: Equations with Examples Guide
- Regression Coefficients: Meaning, Formula & Examples
- Index Numbers: Meaning, Types and Construction Method