Example of Kruskal-Wallis Test
main topic
     interpreting results     session command     see also 

Measurements in growth were made on samples that were each given one of three treatments. Rather than assuming a data distribution and testing the equality of population means with one-way ANOVA, you decide to select the Kruskal-Wallis procedure to test H0: h1 = h2 = h3, versus H1: not all h's are equal, where the h's are the population medians.

1    Open the worksheet EXH_STAT.MTW.

2    Choose Stat > Nonparametrics > Kruskal-Wallis.

3    In Response, enter Growth.

4    In Factor, enter Treatment. Click OK.

Session window output

Kruskal-Wallis Test: Growth versus Treatment

 

 

Kruskal-Wallis Test on Growth

 

Treatment   N  Median  Ave Rank      Z

1           5   13.20       7.7  -0.45

2           5   12.90       4.3  -2.38

3           6   15.60      12.7   2.71

Overall    16               8.5

 

H = 8.63  DF = 2  P = 0.013

H = 8.64  DF = 2  P = 0.013  (adjusted for ties)

Interpreting the results

The sample medians for the three treatments were calculated 13.2, 12.9, and 15.6. The z-value for level 1 is -0.45, the smallest absolute z-value. This size indicates that the mean rank for treatment 1 differed least from the mean rank for all observations. The mean rank for treatment 2 was lower than the mean rank for all observations, as the z-value is negative (z = -2.38). The mean rank for treatment 3 is higher than the mean rank for all observations, as the z-value is positive (z = 2.71).

The test statistic (H) had a p-value of 0.013, both unadjusted and adjusted for ties, indicating that the null hypothesis can be rejected at a levels higher than 0.013 in favor of the alternative hypothesis of at least one difference among the treatment groups.