Kruskal-Wallis Test

Usage Case

The Kruskal-Wallis Test is the nonparametric alternative to the parametric one-way ANOVA (analysis of variance) procedure, which tests whether multiple population means are equal, or in other words, if the samples come from populations with different means.  However, one-way ANOVA does require a few assumptions from the error terms in the model, namely that they have equal variance across the populations, are normally distributed, and are independent (in addition to the usual assumption of randomly collected data).  In cases where the first two conditions are not met, the Kruskal-Wallis test may be used instead, if its (different) conditions of its own are satisfied.  Being the nonparametric alternative to one-way ANOVA, the Kruskal-Wallis test has similar aims: to test whether samples come from populations of the same or different medians (only difference from one-way ANOVA being medians instead of means).

Hypotheses

HO:  All populations have the same median.

HAAt least one of the populations has a mean/median differing from another population.

Conditions

As with most tests, independence and random selection are both necessary conditions of the Kruskal-Wallis test.  While these assumptions are typical for the proper collection of data, there is one additional condition that the Kruskal-Wallis test requires, and that is assumption that the populations follow the shift model.  Still, this condition is often easier to satisfy than the normal and equal variance conditions, making the Kruskal-Wallis test more versatile than an one-way ANOVA is certain situations.

Example in R

Literature Cited

Cannon, Ann R., et al. STAT2 | Building Models for a World of Data. W. H. Freeman and

Company, 2013, pp. 221-241.

Hollander, Myles, et al. Nonparametric Statistical Methods. 3rd ed., Wiley, 2014, pp. 202-14.

“Kruskal-Wallis Test.” Statistics Solutions, Statistics Solutions,

www.statisticssolutions.com/kruskal-wallis-test/.