The Kruskal-Wallis Test was developed by Kruskal and Wallis jointly and is named after them. The Kruskal-Wallis test is a nonparametric (distribution free) test, which is used to compare three or more groups of sample data. This test is used when the assumptions of ANOVA are not met. ANOVA is a statistical data analysis technique that is used when the independent variable groups are more than two. In ANOVA, we assume that distribution of each group should be normally distributed. In the Kruskal-Wallis Test, we do not have any assumptions about the distribution, therefore the Kruskal-Wallis Test is a distribution free test. If normality assumptions are met, then the Kruskal-Wallis Test is not as powerful as the ANOVA. It is also an improvement over the Sign test and Wilcoxon’s sign rank test, which ignores the actual magnitude of the paired magnitude.
Null hypothesis: Null hypothesis assumes that the samples are from identical populations.
Alternative hypothesis: Alternative hypothesis assumes that the samples come from different populations.
1. Arrange the data of both samples in a single series in ascending order.
2. Assign rank to them in ascending order. In the case of a repeated value, assign ranks to them by averaging their rank position.
3. Once this is complete, ranks or the different samples are separated and summed up as R1 R2 R3, etc.
4. To calculate the value, apply the following formula:
H = Kruskal-Wallis Test
n = total number of observations in all samples
Ri = Rank of the sample
The Kruskal-Wallis test statistic is approximately a chi-square distribution, with k-1 degrees of freedom where ni should be greater than 5. If the calculated value of the Kruskal-Wallis test is less than the chi-square table value, then the null hypothesis will be accepted. If the calculated value of Kruskal-Wallis test is greater than the chi-square table value, then we will reject the null hypothesis and say that the sample comes from a different population.
1. We assume that the samples drawn from the population are random.
2. We also assume that the cases of each group are independent.
3. The measurement scale for should be at least ordinal.