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.

30 minIntermediate7 graded exercisesMembers

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 k≥3k \ge 3 independent groups. Pool all NN observations, rank them (average ranks for ties), and compare each group's mean rank Rˉi\bar R_i with the overall mean rank (N+1)/2(N+1)/2. If the groups come from the same distribution, every group's mean rank should be close to (N+1)/2(N+1)/2.

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