Kruskal-Wallis H Test

Non-parametric alternative to one-way ANOVA. Compare distributions across three or more independent groups.

Please verify you are human to use the calculator.

About the Kruskal-Wallis H Test

The Kruskal-Wallis H test is the non-parametric extension of one-way ANOVA. It tests whether the distributions of three or more independent groups are identical, without assuming normality. The test works by ranking all observations across groups, computing the average rank per group, and measuring how much these average ranks deviate from what would be expected under the null hypothesis.

The H statistic is computed as H = [12 / N(N+1)] ∑ (R²ᵢ / nᵢ) − 3(N+1), where Rᵢ is the rank sum for group i, nᵢ is the group size, and N is the total sample size. Under the null hypothesis, H follows an approximate chi-square distribution with k − 1 degrees of freedom. This approximation is adequate when each group has at least 5 observations.

Like ANOVA, a significant Kruskal-Wallis result only tells you that at least one group differs—it does not identify which groups differ. Post-hoc pairwise comparisons (typically using the Dunn test with a multiple comparison correction) are needed to pinpoint specific differences. The Kruskal-Wallis test is preferred over ANOVA when data is ordinal, heavily skewed, or when group sizes are small and normality cannot be assumed.

A test result carries weight only when the hypothesis, the sample size and the decision rule were fixed before the data arrived. Every pilot we scope is built the same way, with success criteria and kill gates agreed in advance. That work is described under AI pilot design.

Related calculations

  • Anova: Use ANOVA when the target is group means and its assumptions are appropriate.
  • Mann whitney: Use a two-independent-group rank test when only two groups are compared.
  • Chi squared: Inspect the asymptotic reference distribution for the Kruskal-Wallis statistic.
  • Wilcoxon signed rank: Use signed ranks for two paired measurements; Kruskal-Wallis assumes independent groups.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Kruskal-Wallis H Test FAQ

Common questions about the kruskal-wallis h test