---
tag: EG4VCBXDKZ
kind: concept
name: Kruskal–Wallis test
msc: [62G10]
specializes: [087P03NEND]
sources:
  - url: https://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_test
same_as:
  wikidata: Q1790302
  wikipedia: Kruskal–Wallis test
---

## Summary

The Kruskal–Wallis test is a [[hypothesis test|087P03NEND]] of whether several independent samples come from the same distribution.
It replaces the data by their ranks in the pooled sample and measures how much the mean ranks of the groups differ.
It is the rank-based counterpart of one-way [[analysis of variance|M9AQ5HKGP4]], and for two groups it is equivalent to the [[Mann–Whitney U test|CKF9KDXBP7]].

## Explanations

### L1 human

Suppose three fertilisers are tried on separate plots and the yields are recorded.
Line up all the yields together and number them from smallest to largest.
If the fertilisers make no difference, each group should get a fair mix of low and high numbers, and the average number in each group should be near the middle.
The test statistic grows when some groups get mostly high numbers and others mostly low ones.
