Kruskal-Wallis: test group rank patterns before claiming a median result

The Kruskal-Wallis test compares k independent groups by replacing their pooled observations with ranks. Under the null hypothesis, group labels are exchangeable with respect to the common distribution, so rank sums should be similar after accounting for group sizes.


It is useful for ordinal outcomes or continuous data when an ordinary one-way ANOVA model is not appropriate, provided observations are independent and groups are sampled independently.


With N pooled observations and rank sum R_j in group j of size n_j, the uncorrected statistic is H = 12/[N(N+1)] times the sum of R_j squared/n_j, minus 3(N+1).


Tied values receive average ranks. Ties reduce rank variability, so use the correction C = 1 - sum(t cubed - t)/(N cubed - N), where each t is a tie-block size.


When C is greater than zero, use H/C. If all pooled observations are tied, C = 0; the corrected statistic is undefined because the data contain no rank variability.


For a moderate sample, H is commonly compared with a chi-square reference distribution with k minus one degrees of freedom.


A small p-value is evidence against identical group distributions; it is not automatically proof that every pair differs, that one named group differs from all others, or that medians differ unless a common-shape/location-shift interpretation is justified. Follow-up comparisons need their own multiplicity-aware procedure.


Do not use Kruskal-Wallis for paired/repeated measurements or for a two-variable association question. Its central logic is a one-factor comparison of independent groups through pooled ranks.

Which study design is most directly suited to a Kruskal-Wallis test?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Six untied observations are pooled into three groups of size two. Their rank sums are RA = 3, RB = 7, and RC = 11. What is the uncorrected Kruskal-Wallis statistic H?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Why is the usual Kruskal-Wallis statistic divided by a tie-correction factor C, where 0 < C ≤ 1, when some but not all pooled observations are tied?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors