Why do we need analysis of variance?
Why must we examine both between-group and within-group variability when comparing three population means?
What is variance? Starting with three students' scores
First, review descriptive statistics: three students scored 60, 70, and 80 points, with a mean score of 70 points. How can we describe the spread of these higher and lower scores with a single number?
"Deviation": subtract the mean from each score
| Student | Score x | Deviation x − 70 | Squared deviation (x − 70)² |
|---|---|---|---|
| A | 60 | -10 | 100 |
| B | 70 | 0 | 0 |
| C | 80 | +10 | 100 |
| Total | 0 | 200 | |
The deviations sum to 0 because positive and negative deviations cancel, so their sum cannot measure spread.
"Square": square each deviation
(−10)² + 0² + (+10)² = 200. This is the sum of squared deviations (SS).
Dividing the sum of squares by the corresponding degrees of freedom gives a variance estimate. Here we calculate the sample variance:
Note: the sum of squares SS is not yet a variance; sample variance requires division by n−1. In the analysis of variance that follows, a mean square MS is a sum of squares divided by its corresponding degrees of freedom.
Teaching methods and within-group variability
Try it
What do differences in mean scores tell us?
Student scores under three teaching methods form three groups of data. Adjust the three group means and within-group variability to see how the gaps between sample means and the spread within groups change.
- Grand mean 70.0
- F statistic
- 8.159
- Right-tail p-value
- 0.004001
- Numerator and denominator degrees of freedom
- 2, 15
Why not repeatedly run t-tests on three groups?
A t-test can usually be used to compare the means of two groups. Making three pairwise comparisons, A–B, A–C, and B–C, at a significance level of 5% each creates a multiple-testing problem.
- Grand mean 70.0
Three sample means: 65.0, 70.0, 75.0; grand mean: 70.0.
Teaching methods and within-group variability
Try it
Examine between-group differences, then within-group differences
Between-group differences: look at how far apart the three horizontal group-mean lines are. Within-group differences: look at how widely the dots in each group are spread around their own group mean.
- Grand mean 70.0
Three sample means: 65.0, 70.0, 75.0; grand mean: 70.0.
From the research question to decomposing variation in the next lesson
| Source of variation | Sum of squares (SS) | Degrees of freedom df | Mean square (MS) | F |
|---|---|---|---|---|
| SSA (between groups) | 300.00 | 2 | 150.00 | 8.159 |
| SSE (within groups) | 275.76 | 15 | 18.38 | — |
| SST (total) | 575.76 | 17 | — | — |
- F statistic
- 8.159
- Right-tail p-value
- 0.004001
- Numerator and denominator degrees of freedom
- 2, 15