Big idea
ANOVA asks whether several population means can reasonably be treated as equal. Instead of doing many two-sample tests, ANOVA compares two sources of variability in one model.
Interpretation
If the group means are equal, the between-group mean square and within-group mean square estimate the same noise level. A large F statistic suggests the group means are separated more than random noise would explain.
Learning goals
- Compute a one-way ANOVA table from raw data.
- Explain SST = SSB + SSW.
- Use the F distribution for the global test.
- Check assumptions: independence, normal errors, equal variance.
- Use planned contrasts and pairwise comparisons carefully.
Notation map
i = 1, …, k
Y_ij, j = 1, …, n_i
Ȳ_i.
Ȳ_..
1. Interactive one-way ANOVA table
Enter one group per line. The default trout-toxin data match the ANOVA treatment example from the course lab.
Hypotheses for one-way ANOVA
H0: μ1 = μ2 = ⋯ = μk. HA: at least one μi differs.
The ANOVA F-test is global. Rejecting H0 tells us that not all means are equal, but it does not by itself identify which means differ.
2. Decomposing variation
The identity behind one-way ANOVA is:
Use the current data and choose a group to visualize deviations from the grand mean, group mean, and observation.
3. Simulate F statistics
When δ = 0, all group means are equal and the rejection rate should be close to α = 0.05. Increase δ to see power rise.
4. Assumption explorer
ANOVA is most reliable when errors are independent, roughly normal within groups, and groups have similar variances. Explore how unequal variance changes group spread.
5. Planned linear contrast
A planned contrast tests a focused comparison, such as one treatment versus the average of two controls.
Test statistic
T = L̂ / sqrt(MSE Σ a_i²/n_i), with df = N − k.
Reject a two-sided contrast test when |T| is larger than the corresponding t critical value.
6. Pairwise comparisons from current data
After a significant global ANOVA, pairwise comparisons help locate differences. This table uses the pooled MSE from the current ANOVA and reports unadjusted and Bonferroni-adjusted p-values.
Teaching warning
As the number of groups grows, the number of pairwise tests grows quickly and the chance of at least one false positive increases. Use planned contrasts or a multiplicity adjustment when needed.
Quick self-checks
1. Global null
What is H0 in one-way ANOVA?
2. Large F
A large F statistic means:
3. After rejection
If ANOVA rejects H0, what do we know?