In: Statistics and Probability
Wilcoxon Rank-Sum Test
Is there a difference between Girls and Boys on number of books read?
Boys 12, 5, 13, 3, 11
Girls 4, 10, 9, 7, 6
Hello Sir/ Mam
First, we put both samples together and organize it in ascending order, which is shown in the table below:
Sample | Value |
1 | 3 |
2 | 4 |
1 | 5 |
2 | 6 |
2 | 7 |
2 | 9 |
2 | 10 |
1 | 11 |
1 | 12 |
1 | 13 |
Now, that the values that are in ascending order are assigned ranks to them, taking care of assigning the average rank to values with rank ties
Sample | Value | Rank | Rank (Adjusted for ties) |
1 | 3 | 1 | 1 |
2 | 4 | 2 | 2 |
1 | 5 | 3 | 3 |
2 | 6 | 4 | 4 |
2 | 7 | 5 | 5 |
2 | 9 | 6 | 6 |
2 | 10 | 7 | 7 |
1 | 11 | 8 | 8 |
1 | 12 | 9 | 9 |
1 | 13 | 10 | 10 |
The sum of ranks for sample 1 is:
R1 = 1+3+8+9+10 = 31
and the sum of ranks of sample 2 is:
R2 = 2+4+5+6+7 = 24
Hence, the test statistic is R = R1 = 31.
(1) Null and Alternative Hypotheses
The following null and alternative hypotheses need to be tested:
H0: Median (Difference) = 0
Ha: Median (Difference) ≠ 0
(2) Rejection Region
The critical value for the signficance level provided and the type of tail is Rc = 8, and the null hypothesis is rejected if R ≤ 8.
(3) Decision about the null hypothesis
Since in this case R = 31 > 8, there is not enough evidence to claim that the population median of differences is different than 0, at the 0.05 significance level.
I hope this solves your doubt.
Do give a thumbs up if you find this helpful.