When to Use the Kruskal-Wallis Test vs. ANOVA
4 min read
When to use the Kruskal-Wallis test is the non-parametric version of a familiar decision: when you have three or more groups but the normality assumption for ANOVA cannot be met. It compares rank distributions across groups and is a reliable alternative for small samples or ordinal dependent variables. This guide explains the H statistic, post-hoc follow-ups, and APA reporting.
Key takeaways
- Use Kruskal-Wallis when comparing 3+ groups on a metric or ordinal DV and normality is violated.
- It is the non-parametric equivalent of one-way ANOVA — it compares rank distributions, not means.
- A significant Kruskal-Wallis result requires a post-hoc test (Dunn’s test with Bonferroni correction) to identify which groups differ.
- Effect size η²H = (H − k + 1) ÷ (N − k), where k = number of groups.
- Report medians, not means, in your results.
What Is Kruskal-Wallis? Non-Parametric ANOVA Explained
The Kruskal-Wallis H test compares three or more independent groups on a dependent variable without assuming normal distribution. It works by ranking all observations from all groups together, then testing whether the mean ranks differ more than would be expected by chance.
It is the non-parametric equivalent of one-way ANOVA. If ANOVA requires normally distributed data and your data fails this check, Kruskal-Wallis is the appropriate alternative.
Typical thesis example: comparing exam anxiety across three study programmes when Shapiro-Wilk is significant for at least one group.
Kruskal-Wallis vs. ANOVA: Which One to Choose?
The decision tree is straightforward:
| Condition | Use this test |
|---|---|
| 3+ groups, metric DV, normality holds in all groups | One-way ANOVA |
| 3+ groups, metric DV, normality violated in ≥1 group, n < 30 | Kruskal-Wallis |
| 3+ groups, ordinal DV | Kruskal-Wallis |
| 3+ groups, n ≥ 30 per group, mild normality violation | ANOVA (robust with large n) |
How to Run Kruskal-Wallis in SPSS: Step-by-Step
SPSS path: Analyze → Nonparametric Tests → Legacy Dialogs → K Independent Samples → move your DV to Test Variable List, grouping variable to Grouping Variable → Define Range → ensure Kruskal-Wallis H is ticked → OK.
- In the output, read the Test Statistics table:
- Kruskal-Wallis H statistic
- Degrees of freedom (df = k − 1)
- Asymptotic Significance = your p-value
[TIP] For post-hoc pairwise comparisons after a significant Kruskal-Wallis, use Analyze → Nonparametric Tests → Independent Samples → run pairwise comparisons. Alternatively, use Dunn’s test with Bonferroni correction via the new SPSS nonparametric tests interface.
Post-Hoc Tests After a Significant Kruskal-Wallis
A significant Kruskal-Wallis result tells you that at least one group differs — but not which pairs. Run pairwise comparisons with Bonferroni correction:
SPSS (new interface): Analyze → Nonparametric Tests → Independent Samples → Fields tab: move DV and grouping variable → Settings → Customize tests → tick Kruskal-Wallis → Multiple comparisons → All pairwise → Run.
Alternatively, run three separate Mann-Whitney U tests (one for each pair) and apply Bonferroni correction: multiply each p-value by the number of comparisons (3). A corrected p < .05 is significant.
Interpreting the H Statistic and Reporting in APA Format
Effect size η²H = (H − k + 1) ÷ (N − k), where H = Kruskal-Wallis statistic, k = number of groups, N = total sample size. Benchmarks: .01 small, .06 medium, .14 large.
- Significant:
- "A Kruskal-Wallis test revealed a significant difference in exam anxiety across study programmes, H(2) = 9.84, p = .007, η²H = .08."
- Non-significant:
- "No significant difference in exam anxiety was found across study programmes, H(2) = 2.31, p = .315, η²H = .01."
[INFO] Report medians (Mdn) and interquartile ranges (IQR) for each group when using Kruskal-Wallis, not means and SDs.
Frequently asked questions
When should I use Kruskal-Wallis instead of one-way ANOVA?
â–¾
Does Kruskal-Wallis test medians or means?
â–¾
What post-hoc test should I use after a significant Kruskal-Wallis result?
â–¾
How do I calculate the effect size for Kruskal-Wallis?
â–¾
Further reading
Which Statistical Test to Use for Your Thesis: A Complete Decision Guide
· Test selectionOne-Way ANOVA for Your Thesis: Complete Guide with Post-Hoc Tests, Effect Size, and APA Templates
· Statistical testsWhen to Use the Mann-Whitney U Test (vs. t-Test)
· Statistical testsAPA Statistics Reporting: Copy-Paste Templates for Every Test in Your Thesis
· APA reporting
Free tool
Not sure which statistical test to use?
Answer 5 quick questions about your research design and get the right test - with an explanation of why - in under two minutes.
Statoria Team
Statistics educators & software developers
We build Statoria to help bachelor and master students get through their thesis data analysis without stress. Our guides are written by researchers with experience in social science statistics and student supervision.
Related guides

