Kruskal-Wallis H test
The Kruskal-Wallis H test compares three or more independent groups on ranks — the nonparametric alternative to one-way ANOVA.
Menu: Analyze → Nonparametric Tests → Legacy Dialogs → K Independent Samples…
When should I use Kruskal-Wallis H test?
- Three or more independent groups; ordinal or non-normal outcome.
What are the assumptions?
- Independent observations; similar distribution shapes if you want to talk about medians.
How do I run it in StatLab?
- Choose test variable(s) and the grouping variable.
How do I read the output?
| Output | Meaning |
|---|---|
| Mean Rank | Per group; higher = higher values. |
| Kruskal-Wallis H, df, Asymp. Sig. | Tie-corrected H with a chi-square approximation (df = groups − 1). |
| ε² | Effect size H / ((N² − 1)/(N + 1)). |
| Follow-up | If significant, compare pairs with Mann-Whitney tests and a Bonferroni-adjusted α (Dunn’s test is planned). |
Worked example
Compare score across group in the bundled sample dataset (File → Sample dataset: 150 survey respondents with gender, programme group, age, pre/post test scores, five satisfaction items, income, smoking and education): H(2) = 5.27, p = .072.
How would I report it in APA style?
A Kruskal-Wallis H test showed no statistically significant difference in wellbeing across the three programme groups, H(2) = 5.27, p = .072, ε² = .035.
Numbers above were computed by StatLab’s validated engine from the sample dataset when this page was built.
What are common mistakes?
- Expecting it to say which groups differ — it is an omnibus test.