The question
Do four companies (A, B, C, HHC) have the same mean AFT score? Single-factor (one-way) ANOVA tests
- H0: μA = μB = μC = μHHC
- Ha: at least two of the company means differ
The data
Simulated AFT scores for 25 Soldiers in each of four companies (n = 100). The data are made up for teaching; they are not real Soldiers. Each dot is one Soldier. The thick bar in each column is that company's mean, and the dashed line is the grand mean of all 100 scores.
How to use it
- Drag a dot up or down to change one Soldier's score.
- Drag a mean bar to slide the whole company up or down.
- Show between: a bar from each company mean to the grand mean. These make up SSTr.
- Show within: a line from each Soldier to their own company mean. These make up SSE.
- Reset puts the original data back.
What it computes
I = number of groups (4), Ji = Soldiers in group i (25), n = total (100), ȳi· = mean of group i, ȳ·· = grand mean.
| Source | Sum of Squares | df | Mean Square | F |
| Treatments | SSTr = Σ Ji(ȳi· − ȳ··)2 | I − 1 | MSTr = SSTr / (I − 1) | MSTr / MSE |
| Error | SSE = ΣΣ (yij − ȳi·)2 | n − I | MSE = SSE / (n − I) | |
| Total | SST = SSTr + SSE | n − 1 | | |
- SSTr (treatment sum of squares): how far the company means sit from the grand mean. Between groups.
- SSE (error sum of squares): how far each Soldier sits from their own company mean. Within groups.
- F = MSTr / MSE is a distance measure: the differences between groups relative to the differences within groups. F near 1 looks like noise; F much bigger than 1 is evidence the means differ.
- P-value = P(FI−1, n−I ≥ F), always the upper tail. In R:
1 - pf(F, I-1, n-I).
- Decision: reject H0 if the P-value is at or below α = 0.05.
Things to try
- Drag the company means toward the grand mean. Watch SSTr and F shrink until the decision flips.
- Leave the means alone and drag Soldiers far from their company mean. SSE grows and F drops.
- Pull every Soldier close to their company mean. SSE shrinks and even small gaps between means become significant.
- Rejecting H0 says some means differ, not which ones. That takes a multiple comparisons procedure (Tukey).
MA206, Lesson 35: ANOVA I (Devore 10.1).