What Kruskal - wallis test is
The Kruskal-Wallis test is a non-parametric statistical test used to compare the means of two or more independent samples of data. It is used to assess whether there is a significant difference between the medians of two or more groups. The test is appropriate for data sets that are not normally distributed or have unequal variances.
Steps for the Kruskal-Wallis Test:
- Hypotheses:
The null hypothesis is that there is no difference between the medians of the groups, and the alternative hypothesis is that there is a difference between the medians of the groups.
- Assumptions:
The data must be ordinal or at least ordinal in nature. The data should be independent, with no ties between the observations.
- Calculation:
Calculate the median for each group. Calculate the Chi-Square statistic.
- Interpretation:
Compare the calculated Chi-Square statistic to the critical chi-square value in a Chi-Square distribution table, at a given significance level. If the calculated value is greater than the critical value, reject the null hypothesis and conclude that there is a significant difference between the medians of the groups.
Examples
-
Kruskal-Wallis Test is used to compare the median of multiple independent groups of numerical data. For example, it can be used to determine whether the median income of three different cities is significantly different.
-
Kruskal-Wallis Test can be used to compare the median of multiple groups of ordinal data. For example, it can be used to determine whether the median student rating of three different classes is significantly different.
-
Kruskal-Wallis Test can be used to compare the median of multiple groups of data with a continuous outcome variable. For example, it can be used to determine whether the median days of hospital stay for three different treatments is significantly different.