Mann-Whitney Non Parametric U Test

The preferred non-parametric method for unpaired samples is the Mann-Whitney hypothesis test, or Mann-Whitney test. It is also called the Wilcoxon Rank Sum Test or the Mann-Whitney Wilcoxon Test. It is the non-parametric way to compare two independent datasets, comparable to the Student’s T-test.

The Mann-Whitney U test is a non-parametric statistical test used to compare two independent samples. It assesses whether the distribution of values in one sample is stochastically greater or less than the distribution of values in another sample. This test does not compare sample means. Instead, it evaluates whether the two samples come from the same population, or whether one tends to have higher values than the other.

How Decision Rules Differ Between Mann-Whitney U and Parametric t-Tests

The Mann-Whitney U test makes decisions differently from parametric tests like the independent or paired t-test. All of these tests ask whether two groups differ. However, their approaches and interpretations are different:

  • Parametric t-Tests: These tests compare means and assume that the underlying data follows a normal distribution. A small p-value in a t-test typically means the two groups differ significantly in their average values.
  • Mann-Whitney U Test: This test does not compare means. Instead, it ranks the data and tests whether values in one group tend to be higher or lower than those in the other group. It makes no assumption about the shape of the distribution. That makes it a safer option when data is skewed or ordinal. A significant p-value here suggests that one population tends to yield higher (or lower) values than the other. It does not necessarily mean their medians or means differ.

So, both tests help you reject or accept a null hypothesis. However, the t-test focuses on differences in central tendency (mean), and the Mann-Whitney focuses on differences in rank distributions.

Mann-Whitney Hypothesis Test: Null and Alternative Hypotheses

A few researchers also read the Mann-Whitney test as a comparison of the medians of the two populations. Usually, parametric tests compare the means (Null hypothesis: μ1=μ2) between the independent groups. For this non-parametric test, the null and two-sided alternative hypotheses read as follows:

  • Null Hypothesis (H₀): The two populations come from the same distribution.
  • Alternative Hypothesis (H₁): The two populations come from different distributions.

Note: Unlike t-tests, Mann-Whitney does not assume a difference in means, only a difference in distribution or tendency.

Analysts regularly run the Mann-Whitney test as a two-sided test. Therefore, the investigative hypothesis says the two populations are not equal, without specifying a direction.

Assumptions of the Mann-Whitney:

  • The sample drawn from the population is random.
  • The test assumes independence within each sample and between the samples. That means that an observation is in one group or in the other (it cannot be in both).
  • The data do not need to be normal. To read the result as a difference in medians, both distributions should have the same shape and spread.
  • The test assumes an ordinal measurement scale.

Uses of Mann-Whitney

Many industries use the Mann-Whitney U test. It appears most often in healthcare, nursing, business, and related fields. In medicine, it is a more efficient method to compare the effect of two medicines and see whether they are equal.  Researchers also use it to check whether a particular medicine cures an ailment. 

Procedure to conduct Mann-Whitney test

  • Combine the two data samples into a single dataset and sort them in ascending order.
  • Assign ranks to all observations.
  • Separate the ranks back into their original groups.
  • Calculate the U statistic using the sum of ranks for each group.
  • Find the critical U value from the Mann-Whitney table based on your sample sizes and significance level.
  • Compare the calculated U value to the critical value and draw a conclusion.

Calculation of Mann-Whitney Test

Case 1: For comparing two small sets of observations (samples sizes less than 20)

U1 = n1n2+0.5n1(n1+1)-R1

U2 = n1n2+0.5n2(n2+1)-R2

Where U1+U2=n1n2

  • n1 is the observations from the first population
  • n2 is the observations from the second population
  • R1 is the sum of observation ranks for the first population
  • R2 is the sum of observation ranks for the second population

Finally, calculate the U statistic as the smaller U1 and U2. U= min (U1, U2)

Case2: Normal approximation and tie correction

For sample sizes above ~20, the distribution of U rapidly approaches the normal distribution

U mean = μU =0.5 n1n2

Formulas for standard deviation of U and z-score used in the normal approximation of the Mann-Whitney U test.

Example of Mann-Whitney Test

A researcher was studying the biomass of various trees. He wished to determine if there was a difference in the biomass of male and female Juniper trees. So, he randomly selected 6 individuals of each gender from the field. He dries them to constant moisture, chips them, and then weighs them to the nearest kg.

Biomass weights for 6 male trees (2, 3, 5, 6, 4, 2 kg) and 6 female trees (5, 9, 8, 10, 7, 6 kg) for the example.
  • H0: There is no difference between the biomass of male and female Juniper trees– Biomassmale = Biomassfemale (medians are equal)
  • H1: There is a difference between the biomass of male and female Juniper trees– Biomassmale ≠ Biomassfemale (medians are not equal)

The samples are small (6 and 6) and we do not assume normal biomass, so a non-parametric test is appropriate: the Mann-Whitney U test (the non-parametric counterpart of an independent measures t-test).

Table of biomass values and ranks for 6 male and 6 female trees, showing lower ranks for males.
  • n1 =6
  • n2 =6
  • R1 = 1.5 + 3 + 5.5 + 7.5 + 4 + 1.5 = 23
  • R2 = 5.5 + 11 + 10 + 12 + 9 + 7.5 = 55

And then calculate U1 and U2

  • U1 = n1n2+0.5n1(n1+1)-R1 = 6 *6 + 0.5 * 6(7) – 23 = 34
  • U2 = n1n2+0.5n2(n2+1)-R2 = 6 * 6 + 0.5 * 6(7) – 55 = 2

U= min (U1, U2) = 2

Mann-Whitney Table: For Two-Tailed Test at a 5% Significance Level

Mann-Whitney Non Parametric Hypothesis test table

Ucritical = 5

Calculated U is a value less than the critical value of U for a 0.05 significance level. Ucalculated < Ucritical . Hence, we can reject the null hypothesis.

Therefore, we reject the null hypothesis. There is a statistically significant difference in the biomass distributions between male and female Juniper trees.

Six Sigma Black Belt Certification Mann-Whitney Test Questions:

Question: Which of the following test is calculated by ranking all the participant’s scores from lowest to highest and adding up the ranks separately for each of the groups?

(A) Wilcoxon signed rank test
(B) Kruskal Wallis test
(C) Mann-Whitney test
(D) Friedman Test

Answer:

Unlock Additional Members-only Content!

To unlock additional content, please upgrade now to a full membership.
Upgrade to a Full Membership
If you are a member, you can log in here.

Authors

Comments (15)

“Mann-Whitney test is a non-parametric test that is to compare two sample means”
How come Non-parametric test and used to compare means?

Hi Mohamed,

Actually, the Mann-Whitney test does not compare means. It ranks all of your data to see if one group tends to have higher values than the other.

If both groups have the same shape and spread, you can use it to compare medians. You would use this test when your data are not normally distributed or when you have ordinal data.

Best,
Ted.

“Calculated U is value less than the critical value of U for a 0.05 significance level. Ucalculated Shouldn’t it means reject null instead?

I agree with you. The following sentence means that the null hypothesis was rejected.

> So, we can say that seem like there is a highly significant difference between biomass of male and female Juniper trees.

Thank you.

Those disagreements between the conclusions in the same articles are really annoying. Led to massive misunderstanding!

Hi Ted

I have juste a question please
I observe that there is a lot of reference of certification
Like IASSC, ASQ, 6 sigma study , councel six sigma
in your point of views which certifications better ,
and what reference should we avoid

I am somewhat confused.

In Paired T Test, when the calculated statistic is below the Critical value, we fail to reject it.

In non-parametric Mann Whitney, when calculated statistic is below the Critical value, we reject it?

Thank you for your thoughtful question, Ashwin. The confusion you’re experiencing is quite common, as the decision rules for parametric and non-parametric tests can differ based on how their test statistics are defined and how critical values are interpreted.

For the Paired T-Test, the test statistic is compared to a critical value from the t-distribution. If the absolute value of your calculated t-statistic is greater than the critical value, you reject the null hypothesis; if it is less, you fail to reject it.

With the Mann-Whitney U test, the logic is a bit different, and it depends on how the U statistic and critical value are defined in your tables or software. Typically, if your calculated U statistic is less than or equal to the critical value, you reject the null hypothesis. This is because a smaller U suggests a greater difference between groups than would be expected by chance.

So, your understanding is correct: for the Mann-Whitney test, a lower U statistic (below the critical value) usually means you reject the null hypothesis. For the Paired T-Test, a lower t-statistic (in absolute value) means you fail to reject the null hypothesis. The key is to always check the specific decision rule for the test you’re using, as the direction of comparison can vary.

If you’d like to deepen your understanding of hypothesis testing and the differences between these tests, you might find our resources on the Green Belt Course and Black Belt Course helpful.

Warm regards,
Ted
SixSigmaStudyGuide.com

To answer you directly: yes, many people treat the Mann-Whitney test as a comparison of medians. However, that is only true if both groups have the same distribution shape and spread. If the shapes are different, the test actually tells you whether one group tends to have larger values than the other. We cover this in the assumptions section of the page.

Hello mohamed ramzi bentoumi,

The Mann-Whitney U test is used to compare differences between two independent groups. It is the non-parametric counter part to the t-test for the independent samples. t-test checks is there a difference in mean. In other hand, Mann-Whitney U test checks is the difference in the rank sum. When we have two groups, we check is there a difference in rank sum of the first group and the second group. Please refer article on how to calculate the rank sum.

Thanks

Hi meshach

Independent non-parametric tests:

Mann-Whitney U test
Kruskal-Wallis test
Friedman test
Kolmogorov-Smirnov test

Dependent non-parametric tests:

Wilcoxon signed-rank test
Sign test
McNemar’s test
Friedman’s test with repeated measures

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.