By the end of this lesson, you should be able to
- Decompose total variability into between- and within-group sums of squares.
- Calculate a simple one-way ANOVA F statistic.
- State what rejecting a global equality null does and does not establish.
Two means? We can compare them. Three means? We could conduct three pairwise tests, but that invites the multiplicity problem and avoids a more fundamental question.
Do the groups show more separation than we’d expect from the variation within them?
That is the central question in a one-way analysis of variance, or ANOVA.
Separate two kinds of variation
Suppose fictional outcomes are
- Group A:
- Group B:
- Group C:
The group means are 3, 5, and 7. The grand mean is 5.
The between-group sum of squares weights how far each group mean lies from the grand mean:
Here each group has three observations, so .
The within-group sum of squares adds the squared deviations of observations from their own group means:
Each group contributes , giving .
Construct the F ratio
With three groups and nine total observations, the between-group degrees of freedom are and within-group degrees of freedom are .
The mean squares are
Therefore .
Under the classical normal independent-observation model with equal group variances and a null of equal group means, this statistic has an F reference distribution with 2 and 6 degrees of freedom.
What an omnibus rejection means
If the global equality hypothesis is rejected, we have evidence that not all population group means are equal under the model.
It does not automatically tell us exactly which pair differs. Planned contrasts or appropriately adjusted pairwise comparisons answer more specific questions.
Classical ANOVA assumes independent observations, an appropriate within-group error distribution, and equal variances. When spreads differ substantially, Welch’s ANOVA or another design-appropriate method may be preferable.
R demonstration
score <- c(2,3,4,4,5,6,6,7,8)
group <- factor(rep(c("A","B","C"), each=3))
summary(aov(score ~ group))
Then inspect group means and variance. Never use an F statistic as a substitute for understanding which participants entered each group.
Check your understanding
- Why isn’t itself a probability?
- What does rejecting equal means across three groups establish?
- If observations are repeated on the same people, is independent one-way ANOVA automatically appropriate?
Worked responses
-
It is a ratio of mean squares; the p-value is calculated from its reference distribution.
-
Evidence that at least one population mean differs, not identification of every differing pair.
-
No. Repeated measurements introduce dependence that requires a suitable design-aware method.
Prove the decomposition and complete the inference
Write each deviation as . Squaring and summing makes the cross term vanish because within each group. Therefore . In the example, total squared deviation is , partitioned into within-group and between-group .
The completed analysis table is:
| Source | Sum of squares | Degrees of freedom | Mean square | F |
|---|---|---|---|---|
| Between groups | 24 | 2 | 12 | 12 |
| Within groups | 6 | 6 | 1 | |
| Total | 30 | 8 |
The upper-tail probability . Under the stated equal-variance independent normal-error model, a prespecified 5% omnibus test rejects equality of all three population means. The illustrative sample is tiny, so assumption assessment cannot be delegated to a reassuring software label. The observed group means and spreads must accompany the result.
The descriptive effect fraction describes between-group separation in this sample. It is not evidence that group membership caused 80% of individual variation, and it can overestimate a population explained fraction in small samples. Adjusted measures and uncertainty require their own definitions.
A planned contrast asks a more specific question. For independent groups with common variance estimated by , a contrast , with , has estimated standard error . Comparing C with A here gives and . If many contrasts are selected or searched, the family of comparisons must be accounted for. An omnibus rejection does not identify them automatically.
Additional practice
- Show the total degrees of freedom equals the sum of the two component degrees of freedom.
- If every outcome is increased by 10, what happens to ? If every outcome is multiplied by 2?
- Why does a global rejection not establish that every pair differs?
Worked additional solutions
- .
- Adding a constant leaves all centered deviations unchanged. Multiplying by two multiplies both sums of squares and both mean squares by four; their ratio remains the same.
- The null is a conjunction of all group-mean equalities. Its rejection establishes that at least one equality fails under the model, not which ones or how many.
Keep your place
Mark this lesson complete after you've read it, attempted its exercises, and explained its central idea in your own words.
Progress is not saved unless you choose to mark the lesson complete.
Saved only in this browser's local storage. No required account, server transmission, or analytics. You can reset your saved progress on the course page. Clearing browser data also clears the record.