You are on page 1of 17

Wilcoxon Matched- Pairs Signed

Rank Test: Large Sample


Large-Sample Case (n>15)
• Z-score is used as the test statistic and is calculated
as: T 
z 
T

 T

• Mean of T is calculated as:


( n)(n  1)
 T

4
• Standard error is calculated as:
(n)(n  1)(2n  1)
 
T
24
• An analyst wants to determine whether there is a difference in the cost per mile of
airfares in the United States between 1979 and 2006 for various cities. The data in
the Table represents the costs per mile of airline tickets for a sample of 17 cities
for both 1979 and 2006. Use Wilcoxon matched-pairs signed rank test to test the
hypothesis at 5 percent level of significance.
City 1979 2006
1 20.3 22.8
2 19.5 12.7
3 18.6 14.1
4 20.9 16.1
5 19.9 25.2
6 18.6 20.2
7 19.6 14.9
8 23.2 21.3
9 21.8 18.7
10 20.3 20.9
11 19.2 22.6
12 19.5 16.9
13 18.7 20.6
14 17.7 18.5
15 21.6 23.4
16 22.4 21.3
17 20.8 17.4
• Step 1: Set the null and alternative hypothesis
– H0: Md= 0
– Ha: Md≠ 0
• Step 2: Calculate the difference between the
scores (d)
City 1979 2006 d
1 20.3 22.8 -2.5
2 19.5 12.7 6.8
3 18.6 14.1 4.5
4 20.9 16.1 4.8
5 19.9 25.2 -5.3
6 18.6 20.2 -1.6
7 19.6 14.9 4.7
8 23.2 21.3 1.9
9 21.8 18.7 3.1
10 20.3 20.9 -0.6
11 19.2 22.6 -3.4
12 19.5 16.9 2.6
13 18.7 20.6 -1.9
14 17.7 18.5 -0.8
15 21.6 23.4 -1.8
16 22.4 21.3 1.1
17 20.8 17.4 3.4
• Step 3: Rank all the differences regardless of whether
the difference is positive or negative
City 1979 2006 d Rank
1 20.3 22.8 -2.5 8
2 19.5 12.7 6.8 17
3 18.6 14.1 4.5 13
4 20.9 16.1 4.8 15
5 19.9 25.2 -5.3 16
6 18.6 20.2 -1.6 4
7 19.6 14.9 4.7 14
8 23.2 21.3 1.9 6
9 21.8 18.7 3.1 10
10 20.3 20.9 -0.6 1
11 19.2 22.6 -3.4 11
12 19.5 16.9 2.6 9
13 18.7 20.6 -1.9 7
14 17.7 18.5 -0.8 2
15 21.6 23.4 -1.8 5
16 22.4 21.3 1.1 3
17 20.8 17.4 3.4 12
• Step 4: Assign positive and negative sign to the computed difference (d)
– If a difference is negative, the rank is given a negative sign.
– If a difference is positive, the rank is given a positive sign.

City 1979 2006 d Rank Rank With Sign


1 20.3 22.8 -2.5 8 -8
2 19.5 12.7 6.8 17 17
3 18.6 14.1 4.5 13 13
4 20.9 16.1 4.8 15 15
5 19.9 25.2 -5.3 16 -16
6 18.6 20.2 -1.6 4 -4
7 19.6 14.9 4.7 14 14
8 23.2 21.3 1.9 6 6
9 21.8 18.7 3.1 10 10
10 20.3 20.9 -0.6 1 -1
11 19.2 22.6 -3.4 11 -11
12 19.5 16.9 2.6 9 9
13 18.7 20.6 -1.9 7 -7
14 17.7 18.5 -0.8 2 -2
15 21.6 23.4 -1.8 5 -5
16 22.4 21.3 1.1 3 3
17 20.8 17.4 3.4 12 12
• Step 5: Calculate T
– T is the minimum of T+ and T-
– T+= sum of positive ranks=
(17+13+15+14+6+10+9)= 99
– T-= sum of negative ranks=
(8+16+4+1+11+7+2+5)= 54
– So, T= 54
• Step 6: Calculate mean of T, standard error of T and z
score using the given formulas:
• Mean of T is calculated as:
( n)(n  1)
 T

4

• Standard error is calculated as:


(n)(n  1)(2n  1)
 
T
24

• Z-score is used as the test statistic.


T  T
z
 T
• In the given example: n= 17
• Mean of T is calculated as:
(17)(17  1)
 
T
 76.5
4

• Standard error is calculated as:


(17)(17  1)(2 *17  1)
 
T  21.125
24

• Z-score is calculated as:


54  76.5
z  1.065
21.125
• Step 7: Calculate critical value of z
• It turns out to be ± 1.96
• Step 8: Interpretation
• Since the calculated value (-1.065) lies in the
acceptance region, the null hypothesis is
accepted and it is concluded that there is no
difference in the cost per mile of airfares in
the United States between 1979 and 2006 for
various cities.
• Additional Problems:
A research team wants to test whether a new teaching method increases the literacy of children.
Therefore, the researchers measure the literacy of 20 children before and after the teaching
method has been applied. The literacy is measured on a scale from 0 to 10, with 10 indicating
high literacy. The data is given in the following table. Does the data indicate that the new
teaching method increases the literacy of children at α= 0.05 assuming that the data is not
normal.

Case Before After Case Before After


1 1 7 11 5 6
2 5 7 12 0 10
3 4 10 13 6 10
4 5 9 14 6 6
5 5 8 15 0 10
6 0 3 16 0 5
7 5 2 17 0 10
8 5 2 18 1 8
9 0 10 19 2 9
10 0 10 10 2 10
Answer:
• n= 19 (Because there is one tie)
• T+= 9
• T-= 181
• So, T= 9
  95
T

T  24.850
z  3.461
• Critical z value= -1.64
• Rejection
A researcher wanted to determine whether people’s ability to identify objects with their right eye differs from
their ability with their left eye. 30 subjects were presented with a series of images and were scored on their
abilities to identify objects which each eye. The results are tabulated in the given Table. Use the Wilcoxon
Signed-Ranks Test to determine whether there is a difference between the two eyes at α= 0.05.

Person Right Left Person Right Left


1 15 17 16 17 24
2 8 19 17 14 12
3 11 18 18 5 12
4 19 19 19 9 8
5 13 17 20 8 16
6 4 5 21 9 12
7 16 13 22 11 7
8 5 0 23 11 17
9 9 16 24 12 13
10 15 21 25 17 20
11 12 12 26 12 9
12 11 9 27 5 13
13 14 10 28 5 11
14 4 17 29 15 11
15 11 12 30 0 12
Answer:
• n= 28 (Because there are two ties)
• T+= 90
• T-= 316
• So, T= 90
  203
T

T  43.915
z  2.573
• Critical z value= ±1.96
• Rejection

You might also like