The method starts off with k variables to be tested. For each variable, the data is ranked from smallest to largest, with the smallest value receiving the rank of 1, and all tied ranks are assigned their average values. Then, sum all the ranks for each variable, yielding a list of summed ranks Then, the H statistic is computed using:
The calculated H is compared to critical H values using a chi-square distribution with df = k-1. Figure 9.36 illustrates the Kruskal–Wallis test. The computed H statistic is over the 10% significance level, so we can reject the null hypothesis at this significance (but not at 5% or 1% significance) and conclude that at least one of the medians is statistically significantly different.
There are two additional nonparametric tests that are equivalent to the parametric ANOVA. For example, the Nonparametric Mood’s Multivariate Median Test is an extension of the Nonparametric Wilcoxon Signed-Rank test for two variables extended to multiple variables. Mood’s test is related to the parametric ANOVA with Multiple Treatments and its Nonparametric Kruskal–Wallis Test equivalence. It uses the same null and alternate hypotheses as in the Kruskal–Wallis test.
In addition, the Nonparametric Cochran’s Q test is for Binary Repeated Measures. It is the nonparametric equivalent of an ANOVA with repeated measures but where the values are binary 0 and 1. The null hypothesis tested is that the proportions of 1s and 0s for all variables are equivalent.
Figure 9.36: Kruskal–Wallis Test