Kruskal-Wallis H (non-parametric ANOVA)
VerifiedNonparametric ANOVA
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
The nonparametric extension of Mann-Whitney to 3+ independent groups.
Pools all observations, ranks them, then asks whether the rank-sum per group differs from what random allocation would produce. Reports the H statistic, df = k-1, and the χ²-approximated p plus an exact / Monte-Carlo p when k or n is small. Tests the null of identical distributions across groups; under the location-shift assumption it specifically tests equal medians. Use Dunn's test or pairwise Mann-Whitney for post-hoc.
Worked example
Do three diets differ in weight loss when the data aren't normal?
45 participants across three diets; weight loss (kg) was non-normal, so a Kruskal-Wallis test compares the groups by ranks, with Dunn's post-hoc.
Diets differed significantly, H(2) = 12.47, p = .002, ε² = .25; post-hoc comparisons showed Diet C had the greatest loss.
A Kruskal-Wallis test showed a significant difference in weight loss across diets, H(2) = 12.47, p = .002, ε² = .25.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- 3+ independent groups on an ordinal or non-normal DV120 employees at three companies rate job satisfaction on a 1-7 Likert (n = 38, 41, 41).
- Small-sample k-group test of distributional equalityA pilot study of 4 catalysts with n = 8 reactions each measures yield.
When NOT to — use instead
- Two groups onlyMann-Whitney U is the two-group special case; Kruskal-Wallis collapses to it but is overkill. → Mann-Whitney U
- Repeated measures / within-subjects designKruskal-Wallis requires INDEPENDENT groups. → Friedman Test (non-parametric RM)
- Ordered IV with directional hypothesisKruskal-Wallis is omnibus / non-directional. → Jonckheere-Terpstra (ordered trend)
- Continuous DV with normal residuals + balanced groupsOne-way ANOVA is more powerful when its assumptions hold — use it unless you have specific evidence against normality. → One-Way ANOVA (3+ groups)
Hypotheses
Parameter tested: set of population distribution functions {F₁, …, Fₖ}
Assumptions (and what to do if they fail)
Check: Count per-group observations after pairwise missing-deletion.
If violated: With small per-group n, the chi-square approximation to H may be inaccurate.
Check: Inspect side-by-side boxplots; check whether IQRs and whisker lengths look similar across groups.
If violated: When distribution shapes differ across groups, Kruskal-Wallis tests stochastic dominance rather than a median shift.
Ready to run a Kruskal-Wallis H (non-parametric ANOVA) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →