Statistics & Analysis
Mann Whitney U Test
Definition
The Mann Whitney U test is a nonparametric statistical test that compares the distributions of a continuous or ordinal dependent variable between two independent groups. It tests whether one group tends to have higher or lower values than the other and serves as the nonparametric alternative to the independent samples t test when the assumption of normality is not met. It does not remove the need for similar spreads: unequal spreads in the two groups can themselves produce a significant result.
Why it matters
Not all data meet the assumptions required by parametric tests. When samples are small, distributions are skewed, or outcomes are measured on ordinal scales, the independent samples t test may produce unreliable results. The Mann Whitney U test provides a valid alternative that does not require normality and is resistant to the influence of outliers. It is widely used in clinical research, behavioral science, and social science whenever researchers compare two groups on a non normally distributed outcome.
How it works
The Mann Whitney U test operates on the ranks of the data rather than the raw values. All observations from both groups are combined, ranked from smallest to largest, and tied values receive the average rank. The test statistic (U) is calculated from the sum of ranks in each group. Conceptually, U counts the number of times an observation in one group precedes an observation in the other group in the ranked sequence.
The null hypothesis states that the two groups are drawn from the same distribution, so that a randomly selected observation from one group is equally likely to be larger or smaller than a randomly selected observation from the other group. For small samples, exact p values are obtained from the distribution of U under all possible rank orderings. For larger samples, a normal approximation is used.
The effect size for the Mann Whitney U test can be reported as the rank biserial correlation (r = 1 minus 2U divided by n₁ times n₂, with U counted for the group of interest), which ranges from negative 1 to positive 1, or as a common language effect size indicating the probability that a randomly selected observation from one group exceeds a randomly selected observation from the other.
It is important to note that the Mann Whitney U test does not specifically compare medians unless both groups have the same distributional shape. When the distributions differ in shape or spread, a significant result may reflect differences in the overall distribution rather than differences in central tendency.
When to use it
Use the Mann Whitney U test when comparing two independent groups on a continuous or ordinal dependent variable and when one or more of the following conditions hold: the data are not normally distributed, the sample size is small (making it difficult to rely on the central limit theorem), the outcome is measured on an ordinal scale, or outliers are present that would distort the t test. For three or more groups, use the Kruskal Wallis test. For paired or matched data, use the Wilcoxon signed rank test instead.
Key takeaways
- Not all data meet the assumptions required by parametric tests.
- All observations from both groups are combined, ranked from smallest to largest, and tied values receive the average rank.
- Use the Mann Whitney U test when comparing two independent groups on a continuous or ordinal dependent variable and when one or more of the following conditions hold: the data are not normally distributed, the sample size is small (making it difficult to rely on the central limit theorem), the outcome is measured on an ordinal scale, or outliers are present that would distort the t test.
- A common error is referring to the Mann Whitney U test as a test of median differences when the distributions of the two groups have different shapes.
Common mistakes
A common error is referring to the Mann Whitney U test as a test of median differences when the distributions of the two groups have different shapes. The test actually assesses whether the probability of a randomly selected value from one group being larger than a randomly selected value from the other group differs from 0.5. Another mistake is failing to report an effect size alongside the p value, which provides information about the magnitude of the difference. Some researchers also apply the Mann Whitney U test to paired data, which is incorrect; the Wilcoxon signed rank test is the appropriate nonparametric test for related samples. Finally, using the test with very large samples when the data are approximately normal offers no advantage over the t test and may sacrifice a small amount of power.
Example
A clinical researcher compares pain scores (measured on a 0 to 10 visual analog scale) between 25 patients receiving a new topical analgesic and 25 patients receiving placebo at 2 hours post application. The pain score distributions are right skewed in both groups. The Mann Whitney U test yields U = 198, z = 2.22, p = 0.026 (normal approximation), and the rank biserial correlation is 0.37, indicating a moderate effect in favor of the topical analgesic. The median pain score is 3.0 in the analgesic group and 5.0 in the placebo group.
Sources
- [1]Field A. Discovering Statistics Using IBM SPSS Statistics. 6th ed. SAGE Publications, 2024.
- [2]Mann HB, Whitney DR. On a test of whether one of two random variables is stochastically larger than the other. Annals of Mathematical Statistics. 1947;18(1):50-60.
- [3]Hart A. Mann-Whitney test is not just a test of medians: differences in spread can be important. BMJ. 2001;323(7309):391-393.
- [4]Divine GW, Norton HJ, Barón AE, Juarez-Colunga E. The Wilcoxon-Mann-Whitney procedure fails as a test of medians. Am Stat. 2018;72(3):278-286.
Cite this term
Mann Whitney U Test. Paperguide Research Glossary. Paperguide, 2026. Available at: https://paperguide.ai/research-glossary/mann-whitney-u-test/(Paperguide, 2026)