Compare several group means with ANOVA and post-hoc tests

8 steps · about 2 h 5 min · Intermediate

  1. Learn what one-way ANOVA tests (article, Wikipedia, 20 min)

    Explains between- and within-group variance and the F ratio.

  2. Work through ANOVA by hand (video, Khan Academy, 30 min)

    Short videos compute sums of squares and the F statistic on a small example.

  3. Read the engineering view of one-way ANOVA (article, NIST/SEMATECH e-Handbook, 20 min)

    NIST handbook explains the model, table and interpretation.

  4. Check equal variances with Levene's test (reference, SciPy, 10 min)

    Tests the equal-variance assumption before trusting the F test.

  5. Compare two groups when variances differ (article, Wikipedia, 10 min)

    Welch's test is the safer default for two unequal-variance groups.

  6. Run one-way ANOVA in SciPy (reference, SciPy, 10 min)

    The function, its assumptions and a worked example.

  7. Use Kruskal-Wallis when normality fails (reference, SciPy, 10 min)

    Rank-based alternative for skewed or ordinal data.

  8. Find which pairs differ with Tukey's HSD (reference, SciPy, 15 min)

    Pairwise comparisons with family-wise error control after ANOVA.