Kruskal-Wallis Test

The Kruskal–Wallis Non Parametric Hypothesis Test (1952) is a nonparametric analog of the one-way analysis of variance. It is generally used when the measurement variable does not meet the normality assumptions of one-way ANOVA. It is also a popular nonparametric test to compare outcomes among three or more independent (unmatched) groups.  

Consider Mann–Whitney test for just two groups instead of Kruskal–Wallis test. Like Mann-Whitney test, this test may also evaluates the differences of the groups by estimating the differences in ranks among the groups.

Generally in ANOVA test, assumption is that the dependent variable is drawn from a normally distributed population and also assumes that common variance across groups.  But, in Kruskal-Wallis Test, there is no necessity of these assumptions. Therefore, this test is the best option for both continuous as well as ordinal type of data.

Assumptions of the Kruskal-Wallis Test

Uses of Kruskal-Wallis Non Parametric Hypothesis Test Test

Kruskal-Wallis test can be used for any industry to understand the dependent variable where it has three or more independent groups. For example, this test  helps to understand the students performance in exams. While the scores are measured on a scale from 0-100, the scores may be vary based on exam anxiety levels (low, medium, high and severe -in this case four different groups) of the students.

Procedure to conduct Kruskal-Wallis Test

  • First pool all the data across the groups.
  • Rank the data from 1 for the smallest value of the dependent variable and next smallest variable rank 2 and so on… (if any value ties, in that case it is advised to use mid-point), N being the highest variable.
  • Compute the test statistic
  • Determine critical value from Chi-Square distribution table
  • Finally, formulate decision and conclusion

Most of the teams lose track when they exercise the ranks for the original variables. Hence this can make Kruskal–Wallis test a bit less powerful than a one-way ANOVA test.

Calculation of the Kruskal-Wallis Non Parametric Hypothesis Test

The Kruskal–Wallis Non Parametric Hypothesis Test is to compare medians among k groups (k > 2). The null and alternative hypotheses for the Kruskal-Wallis test are as follows:

  • Null Hypothesis H0: Population medians are equal
  • Alternative Hypothesis H1: Population medians are not all equal

As explained above, the procedure for Kruskal-Wallis test pools the observations from the k groups into one combined sample, and then rank from lowest to highest value (1 to N), where N is the total number of values in all the groups.

The test statistic for the Kruskal Wallis test (mostly denoted as H) is defined as follows: 

Kruskal-Wallis Non Parametric Hypothesis Test

Where Ti = rank sum for the ith sample i = 1, 2,…,k

In Kruskal-Wallis test, the H value will not have any impact for any two groups in which the data values have same ranks. Either increasing the largest value or decreasing the smallest value will have zero effect on H.  Hence, the extreme outliers (higher and lower side) will not impact this test.

Example of Kruskal-Wallis Non Parametric Hypothesis Test

In a manufacturing unit, four teams of operators were randomly selected and sent to four different facilities for machining techniques training. After the training, the supervisor conducted the exam and recorded the test scores. At 95% confidence level does the scores are same in all four facilities?

Kruskal–Wallis Non Parametric Hypothesis Test
  • Null Hypothesis H0: The distribution of operator scores are same
  • Alternative Hypothesis H1: The scores may vary in four facilities

Rank the score in all the facilities

N=16

Kruskal-Wallis Non Parametric Hypothesis Test

While for a right tailed chi-square test with 95% confidence level, and df =3, critical χ2 value is 7.81

Critical values of Chi-Square Distribution

Calculated χ2 value is greater than the critical value of χ2for a 0.05 significance level. χ2calculated 2critical hence reject the null hypotheses

So, there is enough evidence to conclude that difference in test scores exists for four teaching methods at different facilities.

Six Sigma Black Belt Certification Kruskal-Wallis Test Questions:

Question 1: In an organization, management conducted a study comparing Purchase, Marketing, Quality and Production groups on a measure of leadership skills. Which of the following test would an organization choose?

(A) Mood’Median test
(B) Kruskal-Wallis test
(C) Mann-Whitney U test
(D) Friedman Rank Test


This section requires you to be logged in to either a Pass Your Six Sigma Exam or a free account. Sign up in seconds with the buttons below!

Login to your account
OR
Enroll in Pass Your Six Sigma Exam
OR
Get a Free Account

Questions, comments, issues, concerns? Please leave a note in the comments below!


This section requires you to be logged in.

Question 2: Which of the following nonparametric test use the rank sum?

(A) Runs test
(B) Mood’Median test
(C) Sign test
(D) Kruskal-Wallis test

This section requires you to be logged in.

Comments (3)

The Kruskal-Wallis test is not about the equality of medians. It’s about the stochastic dominance. If the distributions within groups are IID, then indeed (and ONLY then) such interpretation holds. Otherwise, the difference may be caused either difference in locations or scales. Kindly please correct it, as people then use the KW or MW(W) tests to detect shift in locations and get totally surprised, how that’s possible to have numerically equal medians and H0 rejected. Both tests fail in general (appropriate sources available over the internet).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.