Kruskal-Wallis H (non-parametric ANOVA)

Verified

Nonparametric ANOVA

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

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.

Result

Diets differed significantly, H(2) = 12.47, p = .002, ε² = .25; post-hoc comparisons showed Diet C had the greatest loss.

How you'd report it (APA)

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 DV
    120 employees at three companies rate job satisfaction on a 1-7 Likert (n = 38, 41, 41).
  • Small-sample k-group test of distributional equality
    A pilot study of 4 catalysts with n = 8 reactions each measures yield.

When NOT to — use instead

Hypotheses

H₀: the population distributions of the DV are identical across the k groups (equivalently, F₁ = F₂ = … = Fₖ in distribution).
Hₐ: at least one population distribution differs (typically interpreted as a difference in medians when distribution shapes are similar across groups; otherwise as stochastic dominance).

Parameter tested: set of population distribution functions {F₁, …, Fₖ}

Assumptions (and what to do if they fail)

Sufficient observations per group (n ≥ 5 per group recommended)medium

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.

Distributions of the DV have similar shape across groups (median interpretation)low

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 →