Subjects biostatistics

Wilcoxon Signed Rank

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Wilcoxon Signed Rank


1. **State the problem:** We are given two paired samples for two different scenarios: time measurements for Twin A and Twin B, and customer ratings for original and darker-colour products. We want to perform the Wilcoxon Signed-Rank Test to determine if there is a significant difference between the paired samples in each case. 2. **Wilcoxon Signed-Rank Test overview:** This non-parametric test compares two related samples to assess whether their population mean ranks differ. It is used when the data cannot be assumed to be normally distributed. --- ### Problem 1: Twin A vs Twin B times 3. **Calculate differences:** For each pair, compute $d_i = \text{Twin A}_i - \text{Twin B}_i$: $$ \begin{aligned} d &= [22-26, 17-22, 30-27, 21-26, 22-22, 23-29, 13-18, 19-20, 25-26] \\ &= [-4, -5, 3, -5, 0, -6, -5, -1, -1] \end{aligned} $$ 4. **Remove zero differences:** The 5th pair difference is 0, so exclude it. 5. **Rank the absolute differences:** Compute $|d_i|$ and rank them (smallest rank = 1): $$ |d| = [4, 5, 3, 5, 6, 5, 1, 1] $$ Rank these values: - 1 (two times) → average rank $\frac{1+2}{2} = 1.5$ - 3 → rank 3 - 4 → rank 4 - 5 (three times) → average rank $\frac{5+6+7}{3} = 6$ - 6 → rank 8 So ranks: $$ [4 \to 4, 5 \to 6, 3 \to 3, 5 \to 6, 6 \to 8, 5 \to 6, 1 \to 1.5, 1 \to 1.5] $$ 6. **Assign signs to ranks:** Use the sign of $d_i$: $$ [-4 \to -4, -5 \to -6, 3 \to 3, -5 \to -6, -6 \to -8, -5 \to -6, -1 \to -1.5, -1 \to -1.5] $$ 7. **Calculate sums of positive and negative ranks:** - Positive ranks sum: $3$ - Negative ranks sum: $- (4 + 6 + 6 + 8 + 6 + 1.5 + 1.5) = -33$ 8. **Test statistic $W$:** The smaller of the absolute sums is $3$. --- ### Problem 2: Original vs Darker-colour ratings 9. **Calculate differences:** $$ d = [5-5, 7-4, 5-3, 5-8, 2-4, 4-6, 8-9, 8-10] = [0, 3, 2, -3, -2, -2, -1, -2] $$ 10. **Remove zero differences:** Exclude the first pair. 11. **Rank absolute differences:** $$ |d| = [3, 2, 3, 2, 2, 1, 2] $$ Ranks: - 1 → rank 1 - 2 (four times) → average rank $\frac{2+3+4+5}{4} = 3.5$ - 3 (two times) → average rank $\frac{6+7}{2} = 6.5$ Ranks assigned: $$ [3 \to 6.5, 2 \to 3.5, 3 \to 6.5, 2 \to 3.5, 2 \to 3.5, 1 \to 1, 2 \to 3.5] $$ 12. **Assign signs:** $$ [3 \to +6.5, 2 \to +3.5, -3 \to -6.5, -2 \to -3.5, -2 \to -3.5, -1 \to -1, -2 \to -3.5] $$ 13. **Sum positive and negative ranks:** - Positive sum: $6.5 + 3.5 = 10$ - Negative sum: $-(6.5 + 3.5 + 3.5 + 1 + 3.5) = -18$ 14. **Test statistic $W$:** Smaller absolute sum is $10$. --- **Final answers:** - Wilcoxon test statistic for Twin times: $W = 3$ - Wilcoxon test statistic for Customer ratings: $W = 10$ These values can be compared to critical values from Wilcoxon Signed-Rank tables or used to compute p-values to determine significance.