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 truly 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 significant difference in the quality of the architecture between El Raval (site 3); and El Raval (site 4)?

Stage 1:

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

Site 4: (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: U= 3+4+6+6+6+7+7+8 = 47

Stage 4: U= 0+0+0+1+2+2+5+7 = 17

Stage 5: U= 17

The critical value from the table = 6.5

The probability that the quality of the architecture measured in Site 4 is better than Site 3 just by chance is 6.5 per cent.

If you find that there is a significant probability that the differences could have occurred by chance, this can mean:

1. Either the difference is not significant and there is 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.


n¹

1

2

3

4

5

6

7

8

u

0

11.1

2.2

0.6

0.2

0.1

0.0

0.0

0.0

1

22.2

4.4

1.2

0.4

0.2

0.1

0.0

0.0

2

33.3

8.9

2.4

0.8

0.3

0.1

0.1

0.0

3

44.4

13.3

4.2

1.4

0.5

0.2

0.1

0.1

4

55.6

20.0

6.7

2.4

0.9

0.4

0.2

0.1

5

 

26.7

9.7

3.6

1.5

0.6

0.3

0.1

6

 

35.6

13.9

5.5

2.3

1.0

0.5

0.2

7

 

44.4

18.8

7.7

3.3

1.5

0.7

0.3

8

 

55.6

24.8

10.7

4.7

2.1

1.0

0.5

9

 

 

31.5

14.1

6.4

3.0

1.4

0.7

10

 

 

38.7

18.4

8.5

4.1

2.0

1.0

11

 

 

46.1

23.0

11.1

5.4

2.7

1.4

12

 

 

53.9

28.5

14.2

7.1

3.6

1.9

13

 

 

 

34.1

17.7

9.1

4.7

2.5

14

 

 

 

40.4

21.7

11.4

6.0

3.2

15

 

 

 

46.7

26.2

14.1

7.6

4.1

16

 

 

 

53.3

31.1

17.2

9.5

5.2

17

 

 

 

 

36.2

20.7

11.6

6.5

18

 

 

 

 

41.6

24.5

14.0

8.0

19

 

 

 

 

47.2

28.6

16.8

9.7

Mann Whitney u test table of critical values