Statistics Reference

One-Way ANOVA Explained

ANOVA answers “do these groups differ?” by asking a sneakier question: is the spread between the group means too large to be explained by the spread within the groups? This guide runs the entire computation — every sum of squares, degree of freedom, and mean square — on a dataset small enough to check by hand, then reads the verdict from the F-table.

The Idea: Two Estimates of the Same Noise

If all groups share one mean, then group averages scatter around the grand mean only because of sampling noise — and the size of that scatter is predictable from the noise inside the groups. ANOVA builds both estimates: the between-groups mean square (MSB), which grows when means genuinely differ, and the within-groups mean square (MSW), which measures pure noise (it is exactly the pooled variance of the groups). Their ratio is the test statistic:

F = MSB / MSW = (SSB / (k − 1)) / (SSW / (N − k))

SST = SSB + SSW  (the variance partition)

Under equal means, F hovers around 1. The F-table says how far above 1 chance alone can push it.

Worked Example: Three Teaching Methods, Nine Students

Scores by method — A: 4, 5, 6 · B: 6, 7, 8 · C: 8, 9, 10. Group means are 5, 7, 9; the grand mean is 7.

  1. Between-groups sum of squares. Each group contributes its size times the squared gap between its mean and the grand mean: SSB = 3(5−7)² + 3(7−7)² + 3(9−7)² = 12 + 0 + 12 = 24.
  2. Within-groups sum of squares. Deviations inside each group: every group is {x−1, x, x+1}, contributing 1 + 0 + 1 = 2, so SSW = 2 + 2 + 2 = 6.
  3. Degrees of freedom. Between: k − 1 = 2. Within: N − k = 9 − 3 = 6. (Check: they sum to N − 1 = 8, and SST = 24 + 6 = 30.)
  4. Mean squares. MSB = 24/2 = 12; MSW = 6/6 = 1.
  5. F statistic. F = 12/1 = 12.
SourceSSdfMSF
Between groups2421212
Within groups661
Total308

Decision. The α = 0.05 F-table at df₁ = 2, df₂ = 6 reads 5.14. Since 12 > 5.14, reject equal means; the exact p-value is 0.008. Entering the three groups into the ANOVA calculator reproduces every cell of this table.

After a Significant F

  • Effect size. η² = SSB/SST = 24/30 = 0.8 — method explains 80% of score variation in this sample, an unusually strong effect (the same explained-variance reading as ).
  • Which groups differ? The F alone does not say. Pairwise follow-ups (Tukey's HSD, or t-tests with a multiplicity correction) locate the differences.
  • Report the means. 5, 7, and 9 with their spreads tell the practical story that “p < 0.05” cannot.

Assumptions, Briefly and Honestly

  • Independence of observations — the assumption no test can rescue; it comes from the design.
  • Normal-ish residuals within groups — ANOVA is tolerant with balanced groups, thanks to the central limit theorem.
  • Similar group variances — the pooled MSW assumes it. A common informal check: largest SD under twice the smallest. Unequal variances plus unequal group sizes is the combination that misleads; Welch's ANOVA handles it.

The same F machinery — one variance ratio judged against the F-distribution — reappears in regression's overall F-test and in two-variance comparisons, which is why the F-table serves all three.

Try the ANOVA Calculator

Enter your groups to get the full SS/df/MS/F table with the exact p-value — the worked example automated.

Frequently Asked Questions

What does ANOVA actually test?

One-way ANOVA tests whether three or more group means are all equal, against the alternative that at least one differs. It works by comparing two estimates of variability: the spread between the group means and the spread within the groups. If the between-groups spread is large relative to the within-groups noise, the F ratio grows beyond what chance explains and the hypothesis of equal means is rejected.

Why is it called 'analysis of variance' when it compares means?

Because the evidence about the means is extracted from variances. The total variation in the data is partitioned into a between-groups piece (driven by mean differences) and a within-groups piece (pure noise). Comparing those two variance components - their ratio is the F statistic - is what reveals whether the means differ, hence the name.

Why not just run t-tests between every pair of groups?

Multiple pairwise tests inflate the false-alarm rate: with 4 groups there are 6 pairs, and at alpha = 0.05 each, the chance of at least one spurious 'significant' pair is about 26%. ANOVA asks the single question 'are all means equal?' with one test at one alpha. When ANOVA rejects, planned follow-up comparisons (with multiplicity corrections) identify which pairs differ.

What are the degrees of freedom in a one-way ANOVA?

Between groups: k - 1, one less than the number of groups. Within groups: N - k, total observations minus the number of groups (each group spends one degree of freedom on its own mean). They add up to the total N - 1. In the worked example with 3 groups of 3, that is df-between = 2 and df-within = 6.

What does a significant F tell me - and what doesn't it?

It tells you the data are inconsistent with all group means being equal. It does not tell you which groups differ, how large the differences are, or that every group differs from every other. Follow up with the group means themselves, confidence intervals, an effect size (eta-squared = SSB/SST), and pairwise comparisons if needed.

What assumptions does one-way ANOVA make?

Independent observations, approximately normal residuals within groups, and roughly equal group variances (homogeneity - the pooled MSW is a weighted average of group variances, the same pooling as the pooled standard deviation). ANOVA tolerates moderate normality violations with balanced groups; strongly unequal variances with unequal group sizes are the dangerous combination, where Welch's ANOVA is the safer variant.