A t-test compares two group means. So what do you do with three or more groups? The tempting answer — "just run a t-test on every pair" — is exactly the mistake ANOVA exists to prevent.

The multiple-comparisons problem

Every statistical test carries a false-positive risk. At α = 0.05, each t-test has a 5% chance of declaring a difference that isn't real. Run several and those risks compound:

By the time you have five groups, you're more likely than not to find a "significant" difference by chance alone. This is the family-wise error rate problem.

ANOVA's job: it performs a single test of the null hypothesis "all group means are equal," holding the overall false-positive rate at 5% no matter how many groups you have.

How ANOVA works, briefly

One-way ANOVA (analysis of variance) compares the variation between group means to the variation within groups. If the between-group variation is large relative to within-group noise, the F-statistic is large and the p-value small — evidence that at least one group differs. Critical F-values come from the F-distribution table.

T-TestOne-Way ANOVA
Number of groupsExactly 23 or more
Test statistictF
Controls false positives across groupsYes
Tells you which groups differYes (only 2)No — needs a post-hoc test

ANOVA is significant — now what?

A significant ANOVA tells you at least one group differs, but not which. To find the specific pairs, you run a post-hoc test (Tukey's HSD, Bonferroni) that compares pairs while still controlling the overall error rate. Never go back to plain uncorrected t-tests — that reintroduces the very problem ANOVA solved.

Quick decision

Run a One-Way ANOVA →Compare three or more group means; F-statistic and p-value included.

Related: Choosing a statistical test · Interpreting p-values · F-table.