Non-parametric alternative to one-way ANOVA. Compares 3 or more independent groups using ranks, with no normality assumption. Includes Dunn's post-hoc test for pairwise comparisons.
Kruskal-Wallis H statistic (with tie correction):
H = [12 / (N(N+1))] × Σᵢ (Rᵢ² / nᵢ) − 3(N+1)
H_corrected = H / [1 − Σ(tⱼ³−tⱼ) / (N³−N)]
df = k − 1
Dunn's post-hoc (Bonferroni adjusted) z-test:
z(i,j) = (R̄ᵢ − R̄ⱼ) / SE(i,j)
SE(i,j) = √[ N(N+1)/12 × (1/nᵢ + 1/nⱼ) ]
p_adjusted = p_raw × C (Bonferroni: C = number of pairs)