Statistics made easy
8th revised edition (March 2026) - many illustrative examples - only €8.99
Mann-Whitney U Test
Author: Dr. Hannah Volk-Jesussek
Updated:
What is a Mann-Whitney U test?
The Mann-Whitney U test examines whether values tend to be larger in one of two independent groups. It uses the ranks of the observations rather than comparing means as in the t-test for independent samples.
The Mann-Whitney U test is thus the non-parametric counterpart to the t-test for independent samples; it is subject to less stringent assumptions than the t-test. Therefore, the Mann-Whitney U test may be used when assumptions for the t-test are violated.
Assumptions of the Mann-Whitney U Tests
To compute a Mann-Whitney U test, there must be two independent samples, the observations within and between groups must be independent, and the outcome must be at least ordinal. The outcome does not have to follow a normal distribution.
If the data are available in pairs (dependent samples), the Wilcoxon signed-rank test can be used instead of the Mann-Whitney U test.
Hypotheses Mann-Whitney U Test
The usual null hypothesis for the Mann-Whitney U test is that the two population distributions are equal. This implies that a randomly selected value from either group is equally likely to be the larger one. Only when the two distributions have a similar shape can the result be interpreted specifically as a difference in location, such as a difference in medians. For a two-sided test:
- Null hypothesis: The outcome has the same distribution in both populations.
- Alternative hypothesis: The outcome distributions differ between the two populations.
A one-sided alternative states in advance which group is expected to tend toward larger values. The direction should be chosen before examining the data.
Calculate the Mann-Whitney U Test
To calculate the Mann-Whitney U test for two independent samples, the rankings of the individual values must first be determined (An example with tied ranks follows below).
These rankings are then added up for the two groups. In the example above, the rank sum T1 of the women is 37 and the rank sum of the men T2 is 29. The average value of the ranks is thus R̄1= 6.17 for women and R̄2= 5.80 for men. The difference between R̄1 and R̄2 now shows whether there are possible differences between the reaction times. In the next step, the U-values are calculated from the rank sums T1 and T2.
where n1, n2 are the number of elements in the first and second group respectively. Under the null hypothesis, the expected value of each U statistic is n1n2/2. The standardized z-value can then be calculated using the expected value and standard deviation of U. The smaller of U1 and U2 is commonly reported for a two-sided test.
The p-value can be calculated exactly for small samples or approximated using the normal distribution for larger samples. The availability of an exact calculation also depends on the software and on whether the data contain ties.
Note: In this example, we would actually use the exact value, but we will nevertheless use the normal distribution. To do this, the z-value was simply inserted into the z-value to p-value calculator of numiqo.
For a two-sided test, the null hypothesis is rejected when the absolute calculated z-value is larger than the critical absolute z-value, or equivalently when the p-value is below the chosen significance level.
Calculate Mann-Whitney U test with tied ranks
If several observations share a value, tied ranks are present. In this case, there is a change in the calculation of the rank sums and the standard deviation of the U value. We will now go through both using an example.
In the example it can be seen that the...
- ...reaction times 34 occur twice and share the ranks 2 and 3
- ...reaction times 39 occur three times and share the ranks 6, 7 and 8.
To account for these tied ranks, the mean values of the shared ranks are calculated in each case. In the first case, this results in a "new" rank of 2.5 and in the second case in a "new" rank of 7. Now the rank sums T can be calculated.
Since the rank ties are clearly visible in the upper table, a term is calculated here that is needed for the later calculation of the U value in the presence of rank ties.
Now all values are available to calculate the z-value while accounting for tied ranks.
The normal approximation becomes more accurate as the sample sizes increase; for small samples, use an exact p-value when it is available.
Calculate a Mann-Whitney U-Test with numiqo
A Mann-Whitney U-Test can be easily calculated with numiqo. Simply copy the table below or your own data into the statistics calculator and click on Hypothesis tests. Then click on the two variables and select Non-Parametric Test.
Reaction time example data| Gender | Reaction time |
|---|---|
| female | 34 |
| female | 36 |
| female | 41 |
| female | 43 |
| female | 44 |
| female | 37 |
| male | 45 |
| male | 33 |
| male | 35 |
| male | 39 |
| male | 42 |
numiqo then gives you the following table for the Mann-Whitney U-Test:
The Mann-Whitney U-Test works with ranks, so the result will first show the mean ranks and the rank sum. The women have a slightly lower mean rank for reaction time than the men.
numiqo gives you the asymptotic significance and the exact significance. For small samples, prefer the exact p-value when it is available. For larger samples, the asymptotic p-value based on the normal approximation is usually appropriate.
Therefore the exact significance is used for this example. The significance (2-tailed) is .931 and thus above the significance level of 0.05. Therefore, no difference between the reaction time of men and women can be determined with these data.
Interpretation of the Mann-Whitney U-Test
The female group had the same median reaction time (Mdn = 39) as the male group (Mdn = 39). A Mann-Whitney U test found no statistically significant difference between the distributions, U = 14, p = .931, r = 0.06.
Mann-Whitney U-Test effect size
In order to make a statement about the effect size in the Mann-Whitney U-Test, you need the standardised test statistic z and the number of cases n, with this you can then calculate the effect size with the equation below
In this case, the effect size r is 0.06. Common guidelines for interpreting the effect size are:
- r around 0.1 → small effect
- r around 0.3 → medium effect
- r around 0.5 → large effect
These are general guidelines; practical importance depends on the subject area.
Statistics made easy
- many illustrative examples
- ideal for exams and theses
- statistics made easy on 464 pages
- 8th revised edition (March 2026)
Only €8.99
Free sample
"Super simple written"
"It could not be simpler"
"So many helpful examples"