Kruskal-Wallis test

The Kruskal-Wallis test is used to test :

* The null hypothesis H0 according to which k independent samples were drawn from the same population (or identical populations),

* Against the alternative hypothesis H1 according to which these samples were drawn from populations sharing the same shape but with different central tendencies (medians).

The observations must be on a numeric or ordinal scale (not just categorical). The samples do not need to have the same number of observations.

The Kruskal-Wallis test may be perceived as a generalization of the (Wilcoxon)-Mann-Whitney test to more than two samples.

The Kruskal-Wallis test is non parametric, that is, it does not make any assumption on the nature of the underlying distributions (except continuity). As many other non parametric tests, it will not use the values of the observations directly, but will first convert these values into ranks once these observations are merged into a single sample.

The statistic of the Kruskal-Wallis test is built from the means of the ranks of the observations across the samples. This approach is similar to that of one-way ANOVA:

* ANOVA compares the sample means. But it also assumes the populations to be normal with equal variances, so in fact, it tests whether these populations are identical.

* The Kruskal-Wallis test does not assume normality or equal variances, and instead of comparing sample means, it compares sample means of ranks.

This similarity is the reason why the Kruskal-Wallis test is sometimes called "one-way ANOVA on ranks".

The Kruskal-Wallis test should not be confused with the Friedman test. This test also tests the hypothesis according to which several samples originated from the same distribution, but these samples must then be matched, that is be made of identical (or very simular) individuals that were submitted to different conditions. The Friedman test then attempts to detect differences in the effects of these conditions.

________________________

An alternative to the Kruskal-Wallis test is the Chi-square identity test when modified to accommodate continuous distributions.

_______________________________________________________________

 Tutorial 1

In this first Tutorial, we describe the mechanism of the Kruskal-Wallis test for small and for large groups. For large groups, the test statistic is approximately Chi-square distributed, and the test does not then require special tables of critical values.

We give two complete examples of applications :

* The first one for small groups,

* The second one for large groups.

THE KRUSKAL-WALLIS TEST

 The Kruskal-Wallis statistic The data Merging the groups Assigning ranks Averaging the ranks Rationale of the test The two forms of the Kruskal-Wallis statistic The Chi-square approximation An exemple of application (small groups) The data table Value of the Kruskal-Wallis statistic Table of critical values and test An exemple of application (large groups) The data table Value of the Kruskal-Wallis statistic Table of critical values and test TUTORIAL

______________________________________________

 Tutorial 2

In this Tutorial, we first examine the case of data containing tied observations, a common situation when observations are measured on a crude scale. We will see that the Kruskal-Wallis statistic then requires to be modified for taking these ties into account.

-----

We then address the question of identifying those groups that caused the Kruskal-Wallis test to reject the null hypothesis. This problem is quite similar to that encountered in ANOVA : even if the Kruskal-Wallis fails to reject the hypothesis of equality of the medians, a series of pairwise Mann-Whitney tests run at the same significance level will possibly conclude that some pairs of groups are significantly different at this level of significance. Specific a posteriori (or post hoc) tests then have to be designed for a correct treatment of this delicate issue.

TIED OBSERVATIONS IN THE KRUSKAL-WALLIS TEST

POST HOC MULTIPLE COMPARISONS

 Tied observations Sharing non integer ranks The modified Kruskal-Wallis statistic Effect of the correction Example of correction for ties Multiple comparisons between treatments The Kruskal-Wallis test verdict is global Which pairs of groups are different ? An example of identification of the "guilty" pair Comparisons with a control group TUTORIAL

____________________________________________

 ANOVA Friedman test (Wilcoxon)-Mann-Whitney test Matched samples Multiple comparisons