34,723 Pages

In statistics, the Kruskal-Wallis one-way analysis of variance by ranks (named after William Kruskal and Allen Wallis) is a non-parametric method. Intuitively, it is identical to a one-way analysis of variance, with the data replaced by their ranks.

Since it is a non-parametric method, the Kruskal-Wallis test does not assume a normal population, unlike the analogous one-way analysis of variance.

## Method

1. Rank all data from all groups together.
2. The test statistic is given by: , where:
• is the number of observations in group
• is observation from group
• is the total number of observations across all groups
• ,
• is the average of all the , equal to .
Notice that the denominator of the expression for is exactly .
3. Finally, the p-value is approximated by . If some ni's are small the distribution of K can be quite different from this.

## References

• William H. Kruskal and W. Allen Wallis. Use of ranks in one-criterion variance analysis. Journal of the American Statistical Association 47 (260): 583–621, December 1952.