Up  

 

 

Wilcoxon Matched-Pairs Signed-Ranks Test

If paired data is

1) measures at the ordinal level

2) may not be normally distributed

Wilcoxon signed-ranks test is the nonparametric equivalent of paired t test

The Wilcoxon signed-ranks test uses matched-pair differences ranked from lowest (rank 1) to highest.

The matched-pairs data can come either from direct ordinal measurement or from interval/ratio differences downgraded to ranks.

The absolute difference between the two variables is used to determine the rank for each matched pair.

When the difference for any matched pair is zero, the data are ignored and the sample size reduced accordingly.

When differences for matched pairs are tied for a particular rank position, the average rank is assigned to each such pair.

Ho for the signed-ranks test states that the matched-pairs differences (in ranks) for the population from which the sample is drawn equals zero.

Two sums can be calculated from the set of ranked matched pairs:

Tp, the sum of ranks for positive differences (variable one greater than variable two),

and Tn, the sum of ranks for negative differences (variable two greater than variable one).

If the two variables measured for the single sample show very little difference, Tp should be approximately equal to Tn.

For a problem in which the differences between the two variables are large, the disparity between Tp and Tn will also be large.

In these situations, one of the rank sums (either the positive or negative differences) will be large and the other small.

The Wilcoxon test for dependent samples uses only one of the two possible rank sum values.

The decision of which rank sum to test depends on whether the alternate hypothesis (HA) is directional (one-tailed) or nondirectional (two-tailed).

If no direction of difference between the two variables is hypothesized, a two-tailed test is applied, and the smaller of Tp and Tn is chosen.

In this instance, the hypothesis concerns only a difference between the two variables under study and not which variable is the largest.

The second possibility involves a directional hypothesis and a one-tailed procedure.

In this case, the hypothesis states that either the positive or negative differences for the matched pairs are expected to dominate. The value of T corresponding to the smaller number of hypothesized differences (either positive or negative) is selected for testing.

Thus, if more differences are expected to be positive, Tn, the sum of the negative differences is used.

When the number of matched pairs exceeds ten, the rank sum (T) can be converted to a Z statistic (ZW) and tested using the distribution of normal values:

where n = number of matched pairs (n>10)

T = rank sum

example

Quebec Auto Sales 1960 and 1968

Month

1960

1968

January

6550

13210

February

8728

14251

March

12026

20139

April

14395

21725

May

14587

26099

June

13791

21084

July

9498

18024

August

8251

16722

September

7049

14385

October

9545

21342

November

9364

17180

December

8456

14577

 

from: Abraham, B. and Ledolter, J. 1983, Statistical Methods for forecasting, New York, John Wiley & Sons, 420

Quebec Auto Sales 1960 and 1968

Month

1960

1968

% 1960

%1968

diff

abs diff

rank

signed rank

October

9545

21342

7.68

9.66

-1.98

1.98

1

-1

August

8251

16722

6.64

7.57

-0.93

0.93

4

-4

September

7049

14385

5.67

6.51

-0.84

0.84

5

-5

January

6550

13210

5.27

5.98

-0.71

0.71

6

-6

July

9498

18024

7.64

8.16

-0.51

0.51

9

-9

November

9364

17180

7.53

7.78

-0.24

0.24

10

-10

May

14587

26099

11.74

11.82

-0.08

0.08

12

-12

December

8456

14577

6.8

6.6

0.2

0.2

11

11

March

12026

20139

9.68

9.12

0.55

0.55

8

8

February

8728

14251

7.02

6.45

0.57

0.57

7

7

June

13791

21084

11.1

9.55

1.55

1.55

3

3

April

14395

21725

11.59

9.84

1.74

1.74

2

2

 

124200

220706

           

Tp = 31

Tn = 47

choosing a 2 tailed test take the lesser of Tp and Tn

clearly the difference is not significant so we accept H0