MerQuR+Statistics Glossary

Statistics Glossary → Dunn's test

Dunn's testconcept

A post hoc method used after the Kruskal-Wallis test that compares group pairs with a z test on the mean ranks obtained by ranking all the data together.

Dunn's test keeps the joint ranking used by Kruskal-Wallis: each group's mean rank is computed and the difference between two groups is standardized as z = (R̄ᵢ − R̄ⱼ) / SE. The standard error depends on the total sample size and the sizes of the two groups, with a correction for ties. The raw p values are then adjusted for multiple comparisons with a method such as Bonferroni, Holm or Benjamini-Hochberg.

Because the ranking is joint, the result for one pair is also affected by data in the groups not being compared; this sets it apart from methods that re-rank each pair using only its own two groups (such as pairwise Mann-Whitney tests or Dwass-Steel-Critchlow-Fligner). A difference in mean ranks is not the same as a difference in medians; it can be read as a location shift when the distributions have similar shapes.

An everyday example

Customer satisfaction scores (1-10) for three cafés are not normally distributed, so they are compared with Kruskal-Wallis, and the difference is significant. Dunn's test shows that café A's mean rank (42) is significantly higher than café C's (21), while the difference between A and B (36) is not significant after the Holm adjustment.

In MerQur

Under the 'Post-hoc test' option of the Kruskal-Wallis test as Dunn (Bonferroni, Holm, Benjamini-Hochberg, Hochberg, Šidák); the same z is used and only the adjustment changes. In the Friedman test, as the Dunn-Bonferroni option based on within-block ranks.

Analyses where this concept appears

Kruskal-WallisFriedman

Related concepts

Post hoc tests (pairwise comparisons)Bonferroni correction