You need to log-in or subscribe in order to use Student access.

Mann Whitney U-Test

A Mann-Whitney U-Test is used to compare the differences between two independent samples when the sample distributions are not normally distributed and the sample sizes are small (n < 30).

When to use

  • You want to compare two independent samples.
  • Your data cannot be assumed to be normally distributed AND your sample size is small (n < 30).

NOTES:

  1. You can use a Shapiro-Wilk OR Kolmogorov-Smirnov Test to check for the assumption of “normality”.
  2. If your data is continuous and can be assumed to be normally distributed, you should use a t-Test.
  3. If your data samples are not independent (but are repeated), you should use a Wilcoxon Rank Test.

Features

To do a Mann-Whitney U test, the following conditions must be met:

  • Ordinal or Continuous: The variable you’re analysing must be ordinal or continuous. e.g. Likert items (such as a 5-point scale from “strongly disagree” to “strongly agree”) or continuous like height (measured in cm/m) or weight (measured in g/kg/t) (see Types of Data for more information).
  • Independence: All of the observations from both groups must be independent of each other.
  • Shape: The shapes of the distributions for the two groups must be roughly the same. Comparing graphs of the data can be useful to confirm this condition is met.

In most cases, a Mann-Whitney U test is performed as a two-sided test. The hypotheses are:

H0: The two populations are equal (i.e. the distributions of the two samples are identical).

H1: The two populations are not equal (i.e. the distributions of the two samples are not identical).

An online calculator for this test can be found HERE.

PRACTICE

Worked Example

You want to compare how algae grows in two different water sources. You gather data by collecting 10 x 1L of water at each location and then weighing the algae found in each sample of water. 

The following data (g) was recorded:

    Site A: 6.7, 8.5, 7.4, 3.5, 4.9, 5.2, 6.4, 9.8, 7.8, 5.4

    Site B: 4.5, 2.3, 7.4, 8.2, 9.1, 5.7, 6.4, 2.9, 14.9, 16.7

Using a Mann-Whitney test, test whether the two locations can be considered equal.

Our hypotheses will be:

H0: The data at both sites comes from the same distribution
      (ie the median at Site A is equal to the median at Site B).

H1: The data at both sites comes from different distributions
      (ie the median at Site A is not equal to the median at Site B).

This is a two-tailed test as we are considering whether the data from Site B is both larger and smaller than the data from Site A.

Using an online calculator we get the following results with a two-tailed test and a significance level of 5%:

The p-value = 0.8493.

Since the calculated p-value is more than the critical probability or significance level (P/α = 0.05), the null hypothesis cannot be rejected. Therefore we can conclude that the two water sources do not have statistically significant different amounts of algae growth.

Your Turn

You are studying the density of earthworms in two different types of ground. By pouring a weak solution of detergent on the ground you can count how many earthworms emerge in 20 different quadrat positions. You end up with the following data:

Grassy field: 12, 9, 4, 13, 6, 17, 8, 10, 11, 16

Dirt (no grass): 5, 7, 9, 2, 0, 7, 3, 4, 8, 7

You now want to test whether this data shows a significant difference between these two types of ground.

You decide to use the Mann Whitney Test. This means your data must meet which of the following assumptions? Tick all that are correct.

The data is independent as each placement of the quadrat is a new source of data BUT it would not be independent if your placements overlapped with each other.

What are our null and alternative hypotheses for this test?

We are testing whether the distributions of the number of worns in the two types of ground are the same.

 Enter the data into the online calculator HERE using a critical probability or significance level of 5% (0.05).

What type of test are we running and why?

We are testing whether the underlying populations are different. One could be either smaller OR larger than the other.

Which of the following statements are correct based on the test results? (Tick all that apply)

Remember the rule of thumb: "If p is low, H0 must go". Since the p-value is less than the critical probability or significance level we reject the null hypothesis.

 

Total Score:

All materials on this website are for the exclusive use of teachers and students at subscribing schools for the period of their subscription. Any unauthorised copying or posting of materials on other websites is an infringement of our copyright and could result in your account being blocked and legal action being taken against you.