Skip to content

Kruskal Wallis Test

  • A non-parametric alternative to ANOVA that compares median ranks across multiple groups.
  • Works without assuming a specific data distribution and can handle ordinal, interval, or some nominal data.
  • Procedure: rank observations, sum ranks by group, compute the H statistic, and compare it to a critical value; results assume independent observations.

The Kruskal-Wallis test is a non-parametric statistical test used to determine if there are significant differences among the median ranks of several groups.

  • The test does not assume a normal distribution of the data and can be applied to ordinal, interval, or some nominal data.
  • To perform the test, observations across all groups are ranked from lowest to highest. The sum of the ranks for each group is calculated.
  • The Kruskal-Wallis statistic, H, is computed from those rank sums and group sizes using the formula below.
  • If the calculated H exceeds the critical value from a table of critical values, the null hypothesis is rejected, indicating significant differences among the median ranks of the groups.
  • A key assumption is independence of observations; lack of independence can bias the test results.
  • The test compares median ranks only; if comparison of means or other measures is required, a different test such as ANOVA may be more appropriate.

Comparing three exercise groups (weight loss)

Section titled “Comparing three exercise groups (weight loss)”

A researcher randomly assigns participants to one of three exercise groups and measures their weight at the beginning and end of the study. The researcher can use the Kruskal-Wallis test to determine if there are significant differences in the amount of weight loss among the three exercise groups.

Comparing four teaching methods (test scores)

Section titled “Comparing four teaching methods (test scores)”

A study randomly assigns students to one of four teaching methods and measures their test scores at the end of the semester. The Kruskal-Wallis test can be used to determine if there are significant differences in the median test scores among the four teaching methods.

  • Independence among observations is required; related or clustered participants (for example, household members) may violate this assumption and bias results.
  • The test assesses differences in median ranks only; it does not compare group means or other summary measures.
  • ANOVA
H=n1n2nrN(N+1)Ri2niH = \frac{n_1 n_2 \dots n_r}{N(N+1)} \sum \frac{R_i^2}{n_i}

where n1, n2, …, nr are the number of observations in each group, N is the total number of observations, and Ri is the sum of the ranks for group i.