The Wilcoxon Signed Rank Test Lecture 50

 

The Wilcoxon Signed Rank Test

Lecture 50

The Wilcoxon signed-rank test is a non-parametric version of Student's one-sample and Student's two-sample t-tests for dependent observations. The Wilcoxon signed-rank test was proposed by Frank Wilcoxon as an improved test over the sign test, which completely ignores the magnitude of observation and depends only on the sign of observation. The Wilcoxon signed-rank test is used when the assumptions of normality are not met.

In case of one sample

In the case of a single sample, we wish to test the null hypothesis that the population has the specified median “m0”. Assign ranks to |X -m0|, and calculate the sum of ranks assigned to the positive of (X - m0) and the negative of (X - m0). The statistic is denoted by T, where T is the smaller sum of ranks with signs ignored.

In case paired observations

In the case of paired observation, assign ranks to |X-Y| or |(X-Y)-m0| and calculate the sum of ranks assigned to positive and negative differences. The statistic is denied by T, where T is the smaller sum of ranks with signs ignored.

Reject the null hypothesis if T is less than the Wilcoxon T critical value.

The Wilcoxon signed-rank test table values are given below:



Normal approximation

When the number of observations “n” is large (n exceeding 25), then it is convenient to use normal approximation.

Where:

Example 13.4: The marks obtained by 10 students in a quiz are 6, 10, 8, 9, 10, 7, 8, 8, 7, and 6. The average marks in the similar test the previous year were 7. The shape of the data is unknown but does not follow a normal population. Use the Wilcoxon signed-rank test to test at 0.05.

Solution:

i. State the null and alternative hypotheses.

H0: Median = 7 vs. H1: Median  7

ii. The significance level: α = 0.05

iii. The test statistic: T (smaller sum of ranks)

vi. Critical Region at 0.05 (10) = 8

Reject H0 when T < 8.

vi. Remarks: The calculated statistic T = 6, which is less than the table value. The sample data does not provide sufficient evidence to reject the null hypothesis. Thus, it is concluded that the performance of students is similar to previous-year students.
Example 13.5: A researcher is interested to know which food increases the weight of sheep. Two different diets are assigned to ten sheep, and the increase in weights is recorded below:

Sheep

1

2

3

4

5

6

7

8

9

10

Diet A

2.03

3.10

2.35

3.86

3.91

1.72

2.65

2.30

2.70

3.60

Diet B

2.28

3.68

2.17

3.56

3.73

1.86

1.48

1.86

2.76

2.88

Test the null hypothesis: the median of diet A is significantly different from diet B at the 1% significance level. Assume the population is non-normal.

Solution: 
i. State the null and alternative hypotheses:

H0: MdietA = MdietB vs. H0: MdietA ≠ MdietB

ii. The significance level: α = 0.01
iii. The test statistic: T (smaller sum of ranks)
vi. Critical Region at 0.01 (10) = 3
v. Computation:

Diet A

Diet B

Difference

A – B

Rank of |A-B|

Rank

(-)

Rank

(+)

     2.03

2.28

- 0.25

5

 

5

3.10

3.68

- 0.58

8

 

8

2.35

2.17

0.18

3.5

3.5

 

3.86

3.56

0.30

6

6

 

3.91

3.73

0.18

3.5

3.5

 

1.72

1.86

- 0.04

1

 

1

2.65

1.48

0.79

10

10

 

2.30

1.86

- 0.44

7

 

7

2.70

2.76

- 0.06

2

 

2

3.60

2.88

0.72

9

9

 

Total

32

T = 23


T = 23
iv. Remarks: The T computed value is not less than the Wilcoxon tabulated value. The sample data does not provide sufficient evidence to reject H0. Thus, it is concluded that both diets have the effect of gaining weight.
Example 15.6: Test scores in the natural sciences are thought to be more than five points higher than those in the social sciences for high school graduates who intend to major in mathematics in college. The test results of these 20 pupils are listed below.

Score in Natural Sc. (X)

98

75

94

85

70

80

90

75

65

90

Score in Social Sc. (Y)

87

66

80

75

62

76

78

65

50

60

Score in Natural Sc. (X)

80

85

70

90

66

77

76

95

68

70

Score in Social Sc. (Y)

70

75

60

77

55

80

65

88

60

60

Using the Wilcoxon signed-rank test, test the hypothesis that the natural science score is 5 points higher than the social science score at the 1% significance level.

Solution: 
i. State the null and alternative hypotheses:
H0: Median 1 - Median 2  5 vs. H0: Median 1 - Median 2 > 5
ii. The significance level: α = 0.05
iii. The test statistic: T (smaller sum of ranks)
vi. Critical Region: Reject H0 when T < 43
v. Computation:

 

X

 

Y

 

(X-Y) - 5

Rank

|(X-Y) – 5|

Sum of Ranks

(+)

(-)

98

87

6

13

13

 

75

66

4

4

4

 

94

80

9

18

18

 

85

75

5

8

8

 

70

62

3

2.5

2.5

 

80

76

- 1

1

 

1

90

78

7

15

15

 

75

65

5

8

8

 

65

50

10

19

19

 

90

60

25

20

20

 

80

70

5

8

8

 

85

75

5

8

8

 

70

60

5

8

8

 

90

77

8

16.5

16.5

 

66

55

6

13

13

 

77

80

- 8

16.5

 

16.50

76

65

6

13

13

 

95

88

5

8

8

 

68

60

3

2.5

2.5

 

70

60

5

8

8

 

Total

 

T=17.5


T = 17.5
vi. Remarks: The Wilcoxon signed rank value is less than the table. The sample data does not provide sufficient evidence to accept the null hypothesis. Thus, it is concluded that the median natural science score is 5 points higher than the social science.
Example 13.7: According to a teacher, the median score of her grade 10 students is more than 80. A sample of 40 students is selected from grade 10 students since the institution’s head wants to confirm the teacher's claim. The score of students is given below:

Score

98

75

94

85

70

80

90

75

65

90

Score

87

66

80

75

62

76

78

65

50

60

Score

80

85

70

90

66

77

76

95

68

70

Test the teacher claim at 5%; the shape of the score distribution is unknown.

Solution:
i. State the null and alternative hypotheses:
H0: Median  80 vs. H0: Median > 80
ii. The significance level: α = 0.05
iii. The test statistic: T (smaller sum of ranks), the sample size is large enough, using the normal approximation.
vi. Critical Region: Reject H0 when z > 1.645
v. Computation:

X

m0

X-m0

Rank|X-m0|

Rank (+)

Rank (-)

98

80

18

24.5

24.5

75

80

-5

7

7

94

80

14

19

19

85

80

5

7

7

70

80

-10

13.5

13.5

80

80

0

ignore

90

80

10

13.5

13.5

75

80

-5

7

7

65

80

-15

22

22

90

80

10

13.5

13.5

87

80

7

10

10

66

80

-14

18.5

18.5

80

80

0

ignore

75

80

-5

7

7

62

80

-18

24.5

24.5

76

80

-4

3.5

3.5

78

80

-2

1

1

65

80

-15

22

22

50

80

-30

27

27

60

80

-20

26

26

80

80

0

ignore

85

80

5

7

7

70

80

-10

13.5

13.5

90

80

10

13.5

13.5

66

80

-14

18.5

18.5

77

80

-3

2

2

76

80

-4

3.5

3.5

95

80

15

22

22

68

80

-12

17

17

70

80

-10

13.5

13.5

130

247


T = 130

vi. Remarks: The computed z value falls in the rejection area; the sample data does not provide sufficient evidence to reject the null hypothesis. Thus, it is concluded that the teacher's claim is true about the median score of students.

No comments:

Post a Comment

Moving Average Models (MA Models) Lecture 17

  Moving Average Models  (MA Models)  Lecture 17 The autoregressive model in which the current value 'yt' of the dependent variable ...