ANOVA and Kruskal-Wallis
Core summary
To compare THREE or more groups, use one-way ANOVA (parametric) or Kruskal-Wallis (non-parametric). A significant result says 'at least one group differs' — not which one.
Detailed explanation
Detailed explanation
When you have three or more groups, running multiple t-tests inflates the false-positive rate. Instead, one-way ANOVA (analysis of variance) compares the means of all groups at once with a single test, producing an F-statistic and one p-value. Conceptually it asks whether the variation between the group means is larger than the variation within the groups; if the between-group differences dominate, the groups likely differ. Its assumptions mirror the t-test: roughly normal data and similar variances across groups. When those assumptions fail, for skewed data, ordinal outcomes, or unequal variances, the Kruskal-Wallis test is the non-parametric alternative, a rank-based extension of Mann-Whitney to three or more groups. Both ANOVA and Kruskal-Wallis are 'omnibus' tests: a significant result tells you that at least one group differs from another, but not which specific pairs differ. To find which groups differ, you follow up with post-hoc pairwise comparisons (the next lesson), which correct for multiple testing. Report the F (or H) statistic, the p-value, the group descriptives (means and SDs, or medians and IQRs), the post-hoc results, and an effect size such as eta-squared. For repeated measures across three or more time points in the same subjects, use repeated-measures ANOVA, or the Friedman test non-parametrically. Pitfalls: stopping at a significant omnibus p without post-hoc tests (you cannot yet say which groups differ); running many t-tests instead of one ANOVA; and ignoring unequal variances, where Welch's ANOVA helps. Two practical points round this out. Report an effect size such as eta-squared (the proportion of variance explained by the grouping) so the result is interpretable beyond its p-value, and check the assumptions, with Levene's test for equal variances and a look at the residuals for normality. And when you compare groups across two factors at once, for example drug and sex, a two-way ANOVA tests each factor and their interaction in a single, more efficient model.
Clinical example
Comparing mean blood pressure across three drug doses (low, medium, high) uses one-way ANOVA; if it is significant, post-hoc tests reveal which doses actually differ.
Research example
A study compares a skewed inflammatory marker across four disease stages; because the data are skewed, Kruskal-Wallis is used, followed by pairwise comparisons with correction.
Knowledge check
Q1. To compare the means of four groups in a single test, you should use:
Q2. A significant one-way ANOVA tells you that:
Q3. The non-parametric alternative to one-way ANOVA is: