A non-parametric test, introduced in 1952 by Kruskal and Wallis. It is a k-sample extension of the two-sample Mann–Whitney test. It tests the null hypothesis that the k sampled populations have the same distribution function.
With nj observations in the jth sample, denote the total number of observations, by N. Arrange these N observations in order of size and replace their values with the corresponding ranks. Let the total of the ranks in sample j be Rj. The test statistic is H, given byUnder the null hypothesis, for large N, with no nj small, H has an approximate chi-squared distribution with (k−1) degrees of freedom.