Nonparametric calculator

Kruskal-Wallis H test calculator

Compare three or more independent groups using the non-parametric Kruskal-Wallis H test, with H statistic, chi-square p-value, epsilon-squared effect size, and Dunn post-hoc tests.

Run this test live in StatLab npm i @statlab/core

When to use it

Use when comparing 3+ independent groups and ANOVA normality assumptions fail.

Required Inputs

  • Groups of numeric/ordinal values
  • Alpha level
  • Post-hoc correction (Dunn-Bonferroni)

Mathematical Formula

H = [ 12 / (N(N+1)) ] * Σ (R_i² / n_i) - 3(N+1)

Reporting Cautions

  • Follow up significant H results with Dunn’s test rather than standard pairwise t-tests.
  • Sensitive to differences in distribution shape across groups.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
from scipy import stats
res = stats.kruskal(group_a, group_b, group_c)
print(f"H={res.statistic:.4f}, p={res.pvalue:.4f}")
R Language
kruskal.test(list(group_a, group_b, group_c))
TypeScript (@statlab/core)
import { kruskalWallis } from '@statlab/core';
const result = kruskalWallis([groupA, groupB, groupC]);

Developer Use Cases & Production Integrations

  • Comparing user feedback rating distributions across 3+ server deployment regions in VoxelPulse.
  • Evaluating non-parametric latency across multiple Kubernetes pod configurations in VoxelAssurance.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.