Track 10 · Comparing Groups and Categorical Data · Lesson 10 of 11
Kruskal–Wallis test
Compare three or more independent groups with the Kruskal–Wallis test, follow it up with adjusted pairwise rank tests, and interpret the result without over-claiming.
An airport authority compares departure delays across four airlines. Delays are heavily skewed, with many flights leaving early and a few held for hours — and the airlines' spreads differ a lot. One-way ANOVA's assumptions are strained; a rank-based comparison is the robust alternative.
The Kruskal–Wallis test extends the Mann–Whitney test to independent groups. Pool all observations, rank them (average ranks for ties), and compare each group's mean rank with the overall mean rank . If the groups come from the same distribution, every group's mean rank should be close to .
Included with a Formula Quest membership
It has 7 graded exercises with feedback, hints and worked solutions. After it you will be able to:
- Compute mean ranks and the Kruskal–Wallis H with its chi-square p-value
- Follow a significant H with adjusted pairwise rank tests (Holm or Dunn)
- Choose Kruskal–Wallis over ANOVA for skewed, ordinal or outlier-prone data
- Report the result as a tendency with an effect size, not as a difference in medians