Barcelona Field Studies Centre

Mann WhitneyU Test of Significance

This example deals with two sets of sample data from two contrasting urban areas, area X and area Y, with the aim of comparing them and demonstrating differences. There are eight pairs of data in this example.

Tests of significance are used to tell us whether the differences between the two sets of sample data are statistically significant or whether these differences could have occurred by chance. Tests of significance tell us the probability level that differences between the two areas, X and Y are due to chance.

First, examine the two data sets to decide whether differences appear to exist which warrant further investigation.

The sample sets are:

Area X: 7; 3; 6; 2; 4; 3; 5; 5

Area Y: 3; 5; 6; 4; 6; 5; 7; 5

Area Mean Median Mode
X 4.38 4.5 5
Y 5.13 5.0 5

The difference between the means for the two sets of data warrants further investigation, to test the statistical significance of the difference.

 

THE MANN-WHITNEY U TEST

Stage 1: Call one sample A and the other B.

Stage 2: Place all the values together in rank order (i.e. from lowest to highest). If there are two samples of the same value, the 'A' sample is placed first in the rank.

Stage 3: Inspect each 'B' sample in turn and count the number of 'A's which precede (come before) it. Add up the total to get a U value.

Stage 4: Repeat stage 3, but this time inspect each A in turn and count the number of B's which precede it. Add up the total to get a second U value.

Stage 5: Take the smaller of the two U values and look up the probability value in the table below. This gives the percentage probability that the difference between the two sets of data could have occurred by chance.

Example: Is there a statistically significant difference in the quality of the environment between North El Raval and South El Raval?

Stage 1:

North: (Sample A) 7; 3; 6; 2; 4; 3; 5; 5

South: (Sample B) 3; 5; 6; 4; 6; 5; 7; 5

Stage 2:

A A A B A B A A B B B A B B A B
2 3 3 3 4 4 5 5 5 5 5 6 6 6 7 7

Stage 3:

B U = 3+4+6+6+6+7+7+8 = 47

Stage 4:

A U = 0+0+0+1+2+2+5+7 = 17

Stage 5:

Lowest U = 17

The critical probability value from the table for a U number of 17 and 8 pairs of data = 0.065. P-values are expressed as decimals although they may be more easily understood if you convert them to a percentage (e.g. 0.065 = 6.5%).

The probability that the quality of the environment in South El Raval is better than North El Raval by chance is 6.5 per cent.

Geographers work to a maximum probability value of 5% (p = 0.05). With a p-value of 0.065 there is no statistically significant difference between north and south El Raval in environmental quality.

This can mean:

1. the difference is not significant and there may be little point in looking further for explanations of it, OR

2. your sample is too small. If you had taken a larger sample, you might well find that the result of the test of significance changes: the difference between the two areas becomes more certain.

It is not possible to tell which of these conclusions is the correct one from the result of the test itself. Statistics are only a tool and can never replace good geographical thinking.


  Pairs of data

u

1

2

3

4

5

6

7

8

0

0.111

0.022

0.006

0.002

0.001

0.0

0.0

0.0

1

0.222

0.044

0.012

0.004

0.002

0.001

0.0

0.0

2

0.333

0.089

0.024

0.008

0.003

0.001

0.001

0.0

3

0.444

0.133

0.042

0.014

0.005

0.002

0.001

0.001

4

0.556

0.200

0.067

0.024

0.009

0.004

0.002

0.001

5

 

0.267

0.097

0.036

0.015

0.006

0.003

0.001

6

 

0.356

0.139

0.055

0.023

0.010

0.005

0.002

7

 

0.444

0.188

0.077

0.033

0.015

0.007

0.003

8

 

0.556

0.248

0.107

0.047

0.021

0.010

0.005

9

 

 

0.315

0.141

0.064

0.030

0.01.4

0.007

10

 

 

0.387

0.184

0.085

0.041

0.020

0.010

11

 

 

0.461

0.230

0.111

0.054

0.027

0.014

12

 

 

0.539

0.285

0.142

0.071

0.036

0.019

13

 

 

 

0.341

0.177

0.091

0.047

0.025

14

 

 

 

0.404

0.217

0.114

0.060

0.032

15

 

 

 

0.467

0.262

0.141

0.076

0.041

16

 

 

 

0.533

0.311

0.172

0.095

0.052

17

 

 

 

 

0.362

0.207

0.116

0.065

18

 

 

 

 

0.416

0.245

0.140

0.080

19

 

 

 

 

0.472

0.286

0.168

0.097

Mann Whitney u test table of critical values