# Stata Help

## The Theory Behind Mann-Whitney U tests(A.k.A. Wilcoxon Rank Sum test) & Kruskal-Wallis H Tests

A Mann-Whitney U test (also called a Mann-Whitney-Wilcoxon test or the Wilcoxon rank-sum test) puts everything in terms of rank rather than in terms of raw values. While some power is lost, this allows analyses to be run on non-normally distributed data (as long as the two distributions are similar or data which is not continuous or is already ordinal (ranked). If your two samples have very different distributions or very unequal variances, these tests will cause an inflated Type I error rate (see the newest article on the topic for more information.

At its basic level, the test ranks everything, sums the ranks and ultimately produces a statistic which tells you whether the two (or more) populations likely came from the same underlying population. The major difference between the Mann-Whitney U and the Kruskal-Wallis H is simply that the latter can accommodate more than two groups. Both tests require independent (between-subjects) designs and use summed rank scores to determine the results.

For a walk through the math, see here. For a more in-depth explanation of the Kruska-Wallis H/Mann Whitney see here.

Back to Nonparametric Tests