Compare several group means with ANOVA and post-hoc tests
8 steps · about 2 h 5 min · Intermediate
- Learn what one-way ANOVA tests (article, Wikipedia, 20 min)
Explains between- and within-group variance and the F ratio.
- Work through ANOVA by hand (video, Khan Academy, 30 min)
Short videos compute sums of squares and the F statistic on a small example.
- Read the engineering view of one-way ANOVA (article, NIST/SEMATECH e-Handbook, 20 min)
NIST handbook explains the model, table and interpretation.
- Check equal variances with Levene's test (reference, SciPy, 10 min)
Tests the equal-variance assumption before trusting the F test.
- Compare two groups when variances differ (article, Wikipedia, 10 min)
Welch's test is the safer default for two unequal-variance groups.
- Run one-way ANOVA in SciPy (reference, SciPy, 10 min)
The function, its assumptions and a worked example.
- Use Kruskal-Wallis when normality fails (reference, SciPy, 10 min)
Rank-based alternative for skewed or ordinal data.
- Find which pairs differ with Tukey's HSD (reference, SciPy, 15 min)
Pairwise comparisons with family-wise error control after ANOVA.