In this article I'll walk you step‑by‑step through ANOVA (analysis of variance): what it is, why we use it, the main types, the assumptions you must check, how the F‑test works, and a worked example to make everything concrete.
ANOVA stands for analysis of variance. It was developed by Ronald Fisher and allows us to test whether the means of three or more groups are statistically different. Think of ANOVA as an extension of the t‑test: a t‑test compares two means, while ANOVA compares multiple means in a single test.
When only two groups are involved, a t‑test and one‑way ANOVA give equivalent results. But when you have more than two groups, doing many pairwise t‑tests inflates the Type I error (false positive) rate. ANOVA avoids that by testing all group means together.
The null hypothesis in ANOVA is that all group means are equal:
H0: μ1 = μ2 = μ3 = ... = μk
The alternative hypothesis is that at least one group mean differs from the others:
H1: Not all μi are equal (at least one μi is different)
ANOVA uses the F statistic. Intuitively the F statistic compares the variance of group means (variance between groups) to the variance inside the groups (variance within groups):
F = variance between groups / variance within groups
If the between‑group variance is large relative to the within‑group variance, group means are spread out beyond what we'd expect from random variation alone — yielding a large F and a small p‑value (evidence against H0).
Scenario: 30 students are randomly assigned to three study methods (A, B, C), 10 students per method. Group means are:
Overall (grand) mean = average of the three group means = 8.6.
SSB = Σ n_j (x̄_j − x̄_grand)^2
With n_j = 10 for each group:
SSE = Σ Σ (x_ij − x̄_j)^2 — sum of deviations of each observation from its group mean.
In the example the within‑group sums (for the three groups) were 6.6, 10.9, and 10.5, giving
SSE = 6.6 + 10.9 + 10.5 = 28
F (as used in the simple demonstration) = SSB / SSE = 0.2 / 28 = 0.0071
This F value is much less than 1, suggesting little evidence of between‑group differences relative to within‑group variability.
Degrees of freedom:
From the F table at α = 0.05, F_critical for (2, 27) ≈ 3.35. Because F_stat (0.0071) < F_critical (3.35), we fail to reject H0. In other words, there is no evidence that the study methods produced different mean scores in this sample.
A standard one‑way ANOVA table has rows for Between (Factor), Within (Error), and Total. Columns typically list:
If all group means truly equal each other, MSB and MSE should be similar and F will be near 1. A large F indicates MSB ≫ MSE and suggests group differences.
ANOVA is a powerful and widely used method to test whether multiple group means differ while controlling Type I error. Key takeaways: