Dunn's test is the post hoc test to use after a significant Kruskal-Wallis test when you need to compare groups pairwise on an ordinal outcome or when data are non-normal. It works on ranks and so the APA 7 write-up reports medians (not means), the Kruskal-Wallis H statistic, and Dunn's z values with a correction for multiple comparisons. This guide shows the APA 7 format, a worked example, and the mistakes reviewers catch.
What you need before you write a single word
- A significant Kruskal-Wallis test: the H statistic, degrees of freedom, exact p value and effect size (epsilon squared or eta squared).
- Each group's median (Mdn) and n. Report medians, not means, because the test ranks the data.
- For every pair: the z value, the adjusted p value, and ideally the difference in medians or medians for each group.
- Which multiple-comparison correction you used: Bonferroni, Holm, Fdr or other.
The APA 7 format template
A Kruskal-Wallis test showed a significant difference in [outcome] across [groups], H(df) = X.XX, p = .XXX, ε² = .XX. Dunn's post hoc tests with a [Bonferroni/Holm] correction indicated that [group A] (Mdn = X) differed significantly from [group B] (Mdn = X), z = X.XX, p = .XXX. [Group C] and [group D] did not differ, p = .XXX.
Want to see it written from data? Run this test on sample data in KyroStat: free, no file needed, and it does not use your free tests.
Formatting rules reviewers check:
- Report medians, not means and standard deviations, since Kruskal-Wallis works on ranks.
- Name the correction method: Bonferroni, Holm, Benjamini-Hochberg (FDR), or other.
- Italicize H, p, z, n and Mdn. Greek letters (ε², α) stay upright.
- No leading zero on p or ε²: p = .008, ε² = .15.
- Report all pairwise comparisons, significant and non-significant.
A worked example
Three store locations tracked customer satisfaction (1 to 10, ordinal).
| Location | n | Mdn |
|---|---|---|
| A | 25 | 8 |
| B | 25 | 8 |
| C | 25 | 5 |
The Kruskal-Wallis test was significant, H(2) = 47.44, p < .001, ε² = .64.
Dunn's post hoc tests with Bonferroni correction gave:
| Comparison | z | p |
|---|---|---|
| Location B vs Location C | 6.11 | < .001 |
| Location A vs Location C | 5.80 | < .001 |
| Location A vs Location B | 0.31 | 1.000 |
Write it:
A Kruskal-Wallis test showed a significant difference in satisfaction across the three locations, H(2) = 47.44, p < .001, ε² = .64. Dunn's post hoc tests with a Bonferroni correction indicated that Location B (Mdn = 8) and Location A (Mdn = 8) were both rated significantly higher than Location C (Mdn = 5), z = 6.11, p < .001 and z = 5.80, p < .001, respectively. Locations A and B did not differ significantly, z = 0.31, p = .758, Bonferroni-adjusted p = 1.000.
The paragraph covers all three pairs: the two meaningful differences get the z and adjusted p values, and the non-significant pair is named too.
Understanding Dunn's test numbers
Dunn's test standardizes the difference between group rank sums by dividing by the standard error. Each z is compared to the standard normal distribution, and the resulting p value is adjusted for the number of comparisons:
- Three pairs, Bonferroni: each p is multiplied by 3, so only the smallest raw p values survive.
- Three pairs, Holm: p values are ordered, the smallest is multiplied by 3, the next by 2, and the largest by 1.
Holm's correction is less conservative than Bonferroni while still controlling the family-wise error rate, so it has more power to detect differences. Use Holm unless your field convention requires Bonferroni.
Dunn's test in a table
For many groups, a summary table clarifies the pattern:
Table 1
Customer Satisfaction by Store Location
| Location | n | Mdn |
|---|---|---|
| A | 25 | 8ᵃ |
| B | 25 | 8ᵃ |
| C | 25 | 5ᵇ |
Note. Satisfaction rated on a 1 to 10 scale. Medians that do not share a superscript letter differ significantly (Dunn's test with Bonferroni correction, α = .05). Kruskal-Wallis H(2) = 47.44, p < .001, ε² = .64.
The letters show that Locations A and B are grouped together (medians 8 and 8) and differ from C (median 5).
Mistakes reviewers catch
- Reporting means and standard deviations. Kruskal-Wallis ranks the data, so report medians.
- Unadjusted p values. Report the p values after the correction (Bonferroni, Holm, etc.), not the raw values.
- Not naming the correction method. Always say whether you used Bonferroni, Holm, or another correction.
- Only significant pairs. Reporting only differences inflates the apparent pattern. Give every comparison.
- No direction. Always tell the reader which median was higher: "Location A (Mdn = 8) was rated higher than Location C (Mdn = 5)".
- Post hoc without an omnibus test. Run and report the Kruskal-Wallis H first, and only if it is significant, run Dunn's test.
Let KyroStat do the write-up for you
KyroStat runs the Kruskal-Wallis test on your data, then Dunn's post hoc comparisons with your choice of correction (Bonferroni, Holm or others). It reports the medians, the H statistic, and each pair's z and adjusted p value, all formatted in APA 7.
Frequently asked questions
Bonferroni or Holm? Holm's correction is usually preferred because it is less conservative (more powerful) while still controlling the family-wise error rate. Use Bonferroni if your journal tradition requires it or if the number of comparisons is very small.
What about other corrections: FDR, Benjamini-Hochberg, Fdr? Benjamini-Hochberg (FDR) controls the false discovery rate rather than the family-wise error rate. It is less conservative than Bonferroni or Holm and is gaining use in exploratory settings, but Bonferroni and Holm are more common in confirmatory research. Report whichever you used.
Should I report the effect size for each pair? Not routinely. The omnibus effect size (ε² or η²) is usually enough. If you do, an effect size r = z / sqrt(N) is a simple option (N = the two groups' combined n for a pair).
Where are these numbers in SPSS? Analyze > Nonparametric Tests > Independent Samples. Click Run and inspect the Test Statistics table (Kruskal-Wallis H, df and Sig). Then run Pairwise Comparisons (newer SPSS): each row is a pair with z and adjusted p (Dunn's or others).
What about R?
Use kruskal.test() for the omnibus test, then dunn_test() from the rstatix package, specifying p.adjust.method = "bonferroni" or "holm".
Related guides
- How to report a Kruskal-Wallis test in APA 7: the omnibus test Dunn's test follows.
- How to report post hoc tests in APA 7: Tukey, Bonferroni and Games-Howell side by side.
- How to report a Bonferroni correction in APA 7: multiple comparison corrections explained.
- How to report Levene's test in APA 7: testing the variance assumption.
- Which statistical test should I use: test picker.