Kruskal Wallis Test PDF
Kruskal Wallis Test PDF
The Kruskal-Wallis H test (sometimes also called the "one-way ANOVA on ranks") is a rank-
based nonparametric test that can be used to determine if there are statistically significant
differences between two or more groups of an independent variable on a continuous or
ordinal dependent variable. It is considered the nonparametric alternative to the one-way
ANOVA, and an extension of the Mann-Whitney U test to allow the comparison of more than
two independent groups.
The Kruskal-Wallis test is a non-parametric test, which means that it does not assume that
the data come from a distribution that can be completely described by two parameters, mean
and standard deviation (the way a normal distribution can). Like most non-parametric tests,
one can perform it on ranked data, convert the measurement observations to their ranks in
the overall data set: the smallest value gets a rank of 1, the next smallest gets a rank of 2, and
so on. The loos of information when one substitute ranks for the original values, which can
make this a somewhat less powerful test than a one-way anova; this is another reason to
prefer one-way anova.
12 (Tj)2
H= ( ) — 3(N+1)
N(N+1) Nj
where k=the number of comparison groups, N= the total sample size, nj is the sample size in
the jth group and Rj is the sum of the ranks in the jth group.
The critical value can be found in the table of critical values based on sample sizes
The first step is to assign ranks to the smallest through largest values in the total sample. Next, we
sum the ranks in each group.
Step 6. Conclusion.
Decide to accept or reject the null hypothesis. Reject H0 if H > critical value
12 (Tj)2
H= ( ) — 3(N+1)
N(N+1) Nj
where k=the number of comparison groups, N= the total sample size, nj is the sample size in
the jth group and Rj is the sum of the ranks in the jth group.
Decision Rule: Reject H0 if H > critical value