How to do a bonferroni correction after Kruskal Wallis H

Hello everyone!
My knowledge in statistics being very poor, I would like to ask for your valuable help!

Wanting to check any differences between the anwers given in a 5-point likert type question measuring attitudes towards new technologies and the years of service of teachers (0-5 / 6-10 / 11-15 / 16-20 / 21+, namely a variable of 5 groups), I decided to do a Kruskal Wallis H test.
I read online that after performing a Kruskal Wallis test, in case there is a statistically significant difference, one has to perform a post hoc test (a number of Mann-Whitney U tests), in order to check in which groups there actually is statistically significant differences.
However, I cannot understand how to do the Bonferroni correction after performing those Mann Whitney U tests.

I would be very grateful for any help! Thank you!


TS Contributor
At the best of my knowledge, you should divide the alpha level (say, 0.05) by the number of pairwise comparisons (k(k-1)/2), and use that "corrected" alpha level as threshold for your pairwise MW tests.
So, if you have 5 groups to compare, your new alpha level would be 0.05/(5*(5-1)/2)=0.005.

Be advised that the Dunn's test can be used as a post-hoc test after KW; Dunn's test will account for multiple comparisons "issue".



Less is more. Stay pure. Stay poor.
Yes GM's post seems correct. What GM may be alluding to at the end of the post is that the Bonferroni correction can be fairly cautious and runs the risk of increasing the risk of type II errors (i.e., accepting the null hypothesis when it is false). So there are different correction options out there to chose from.


Super Moderator
This is the most used K-W post-hoc test (Bonferroni correction) that is used in software packages such as SPSS:

\(\left | \bar{R_{i}}-\bar{R_{j}} \right |\geq z_{\frac{\alpha }{k\left ( k-1 \right )}}\sqrt{\frac{N\left ( N+1 \right )}{12}\left ( \frac{1}{n_{i}}+\frac{1}{n_{j}} \right )}\)

Thus, with an alpha per-comparison rate of 0.05 and k = 5, the critical value of z from the standard normal distribution would be 2.80703.
Thank you all so much for answering my question!!! Your amswers were really helpfull!!

So, if I understood right, my new a level with the Bonferroni correction whould be 0.005 (because I have 5 groups). That means that I can reject the null hypothesis for each pairwise comparison only when its sig is less than 0.005?

And also, do you by any chance know whether there is a command is spss for doing the Bonferroni correction? Or is it not available in spss?

Thank you again!


Less is more. Stay pure. Stay poor.
Your interpretation of the Bonferroni correction is correct. Just in case you may have missed it, the 10 comes from the total possible comparisons that are possible:

1 v 2
1 v 3
1 v 4
1 v 5
2 v 3
2 v 4
2 v 5
3 v 4
3 v 5
4 v 5