Perform nonparametric multiple comparison tests after a significant Kruskal–Wallis test.Enter your group data, and get rank sums, z-scores, raw and adjusted p-values (Bonferroni, Holm, or Benjamini–Hochberg), effect sizes (Cliff's Delta), and significance flags. Ideal for biological, medical, and social science research.
Dunn's test (also known as Dunn's post-hoc test or Dunn's multiple comparison test) is a nonparametric procedure for pairwise multiple comparisons following a significant Kruskal–Wallis test. Developed by Olive Jean Dunn in 1964, it is widely used in biomedical research, ecology, psychology, and any field where data do not meet the normality assumptions required by ANOVA.
While the Kruskal–Wallis test tells you whether at least one group differs from the others, it does not identify which groups differ. Dunn's test fills this gap by performing all pairwise comparisons while controlling the family-wise error rate — typically via the Bonferroni correction or other adjustments such as Holm or Benjamini–Hochberg.
For two groups i and j, the Dunn's test statistic is:
zij = ( Ri − Rj ) / sqrt( ( N(N+1)/12 − ΣT / (N(N−1)) ) · ( 1/ni + 1/nj ) )
where Ri is the mean rank of group i, N is total sample size, ni is group size, and ΣT is the tie correction factor.
A researcher tests four fertilizer formulations on crop yield. The Kruskal–Wallis test reveals a significant difference (H = 11.2, p = 0.011). Using Dunn's test with Bonferroni correction, the researcher finds that Formulation A yields significantly higher than Formulation C (adj. p = 0.023) and Formulation D (adj. p = 0.041), but not Formulation B (adj. p = 0.31). This targeted information guides the selection of the best fertilizer while controlling the risk of false positives.
In a four-arm clinical trial comparing a new drug, an existing drug, a placebo, and a no-treatment control, patient recovery scores are ordinal. After a significant Kruskal–Wallis result, Dunn's test identifies that the new drug is significantly better than placebo (adj. p = 0.008) and no-treatment (adj. p = 0.012), but not significantly different from the existing drug (adj. p = 0.34). This informs the clinical significance and comparative effectiveness of the new therapy.
| Method | Type | Correction | When to Use |
|---|---|---|---|
| Dunn's test | Nonparametric | Bonferroni / Holm / Benjamini–Hochberg | After Kruskal–Wallis, when data are ordinal or non-normal |
| Conover test | Nonparametric | Bonferroni / Holm | Similar to Dunn's but uses a different variance estimator |
| Nemenyi test | Nonparametric | Tukey | All pairwise comparisons, often used with Friedman test |
| Tukey HSD | Parametric | Tukey | After ANOVA, when data are normal and variances are homogeneous |
| Bonferroni correction | General | Bonferroni | Can be applied to any set of comparisons; conservative |