Section 2.1

One-Way ANOVA

The t-test compares two groups. But what if you have three diets, four teaching methods, or five doses? Analysis of Variance (ANOVA) compares all the group means at once. The trick is beautiful: instead of comparing means directly, it compares variances.

Why not just run lots of t-tests?

With four groups there are six possible pairwise t-tests. Each carries a 5% false-positive risk, and those risks pile up: run enough and you're almost guaranteed a "significant" result by chance alone. ANOVA sidesteps this with a single omnibus test: one verdict on whether any of the groups differ.

The F-ratio: signal vs. noise, again

ANOVA splits the total variation in the data into two pieces and takes their ratio:

F = (variance between groups) / (variance within groups)

If the groups really differ, their means are spread out (big between-group variance) relative to the scatter inside each group — so F is large. If the groups are all basically the same, the between-group variance is just noise of the same size as the within-group variance, and F sits near 1. The bookkeeping underneath (each MS as SS ÷ df, the two df, and η² from the same table) is laid out on the formula sheet.

🎮 The F-Ratio in Action

Four groups of the same people throughout — pull their means apart (more signal) or crank up the within-group scatter (more noise), and watch F and the p-value respond. The dashed line is the grand mean; “New samples” draws fresh people.

Between-group MS
Within-group MS
F-ratio
p-value
Verdict (α=.05)

Reading the result

The F-ratio comes with two degrees of freedom, one for the between part (number of groups minus 1) and one for the within part (total observations minus number of groups), which together give the p-value. As usual, p < 0.05 means "this much separation would be surprising if all the groups were really identical." If you are still designing the study rather than reading one, the power calculator runs the same numbers backwards: tell it how many groups and how big an effect you care about, and it returns the n per group you need.

ANOVA is an omnibus test. A significant F tells you that the groups aren't all equal — but not which ones differ. Group A might tower over the rest while B, C, and D are identical. To find out where the differences actually are, you follow up with post-hoc tests.

What you're assuming

  • The groups are independent, and observations within each are independent.
  • The outcome is roughly normal within each group (or samples are large).
  • Homogeneity of variance — the groups have similar spread. Checking that properly takes a plot and a test; when it is badly violated, you reach for a robust or non-parametric alternative.

Why it matters: ANOVA is the backbone of experimental statistics. Once you can partition variation into "between" and "within," you can extend the idea to multiple factors at once and to repeated measurements. The printable test-chooser poster lays that whole family out in one grid, from two groups up to two factors.

For a run on real data, study-methods.csv compares three revision techniques across 105 students, with group SDs deliberately unequal so Levene's test has something to say.

Problem 13 of the practice problems builds a complete ANOVA table from fifteen raw scores, and Problem 14 carries the same data into the follow-up comparisons.

Common questions

Why use ANOVA instead of running several t-tests?

With k groups, pairwise t-tests multiply: four groups means six tests, each carrying its own 5% false-positive risk — together far more than 5%. ANOVA asks one omnibus question ("are all the means equal?") at a single controlled α. If it's significant, you then localize the differences with corrected post-hoc comparisons.

What does a significant F-test tell you — and what doesn't it?

It tells you the group means are unlikely to all be equal: at least one differs from at least one other. It does not tell you which groups differ, how many differ, or by how much. For "which," run post-hoc tests; for "how much," report an effect size like η² alongside the F.

My ANOVA is significant but none of the post-hoc comparisons are. What happened?

Uncomfortable, but not a contradiction. The omnibus F gathers every group difference into one test, while each pairwise comparison examines one pair after paying a penalty for the whole family of comparisons. A pattern spread thinly across several groups can be enough for F and not enough for any single corrected pair. What a significant F does guarantee is that some contrast among the means is significant, and that contrast may combine groups rather than pit one against one. Report it as it is: the means differ overall, and the data are too thin to say which pair carries it. Post-hoc tests covers how the penalty works.