Need help from an expert?
The world’s top online tutoring provider trusted by students, parents, and schools globally.
To perform a Kruskal-Wallis test, rank the data from lowest to highest, calculate the sum of ranks for each group, and use the formula to find the test statistic.
The Kruskal-Wallis test is a non-parametric test used to determine if there is a significant difference between three or more independent groups. It is an alternative to the one-way ANOVA test when the data does not meet the assumptions of normality or equal variances.
To perform the Kruskal-Wallis test, first rank the data from lowest to highest across all groups. Then, calculate the sum of ranks for each group. For example, if there are four groups with 10, 8, 12, and 9 observations, respectively, the sum of ranks for each group would be:
Group 1: 1+2+3+4+5+6+7+8+9+10 = 55
Group 2: 11+12+13+14+15+16+17+18 = 116
Group 3: 19+20+21+22+23+24+25+26+27+28+29+30 = 271
Group 4: 31+32+33+34+35+36+37+38+39 = 315
Next, use the formula to calculate the test statistic:
H = [(12 / (N(N+1))) * Σ(Rj - (N+1)/2)^2] - 3(N+1)
Where N is the total number of observations and Rj is the sum of ranks for each group. The test statistic follows a chi-squared distribution with degrees of freedom equal to the number of groups minus one.
Finally, compare the calculated test statistic to the critical value from the chi-squared distribution table to determine if the null hypothesis can be rejected. If the calculated test statistic is greater than the critical value, then there is a significant difference between the groups.
Study and Practice for Free
Trusted by 100,000+ Students Worldwide
Achieve Top Grades in your Exams with our Free Resources.
Practice Questions, Study Notes, and Past Exam Papers for all Subjects!
The world’s top online tutoring provider trusted by students, parents, and schools globally.