S3-SA3-0414
What is the Wilcoxon Signed-Rank Test?
Grade Level:
Class 9
AI/ML, Data Science, Physics, Economics, Cryptography, Computer Science, Engineering
Definition
What is it?
The Wilcoxon Signed-Rank Test is a statistical test used to compare two related samples or to compare a single sample against a known value. It helps us decide if there's a significant difference between two sets of observations when the data might not follow a normal distribution.
Simple Example
Quick Example
Imagine your school wants to see if a new teaching method improves students' math scores. You test 10 students before the new method and then test the SAME 10 students after the new method. The Wilcoxon Signed-Rank Test can help you check if the scores have really changed significantly.
Worked Example
Step-by-Step
Let's say a new diet plan claims to reduce weight. We measure the weight of 5 people BEFORE the diet and AFTER the diet.
BEFORE: 65 kg, 70 kg, 62 kg, 75 kg, 68 kg
AFTER: 63 kg, 68 kg, 60 kg, 73 kg, 67 kg
---1. Calculate the difference for each person (Before - After):
Person 1: 65 - 63 = 2
Person 2: 70 - 68 = 2
Person 3: 62 - 60 = 2
Person 4: 75 - 73 = 2
Person 5: 68 - 67 = 1
---2. Find the absolute differences (ignore minus signs if any):
|2|, |2|, |2|, |2|, |1|
---3. Rank the absolute differences from smallest to largest. If there are ties, give them the average rank.
|1| gets rank 1
|2| (all four of them) share ranks 2, 3, 4, 5. Average rank = (2+3+4+5)/4 = 3.5
So, ranks are: 3.5, 3.5, 3.5, 3.5, 1
---4. Assign the original sign of the difference to the ranks.
Person 1 (diff=2): +3.5
Person 2 (diff=2): +3.5
Person 3 (diff=2): +3.5
Person 4 (diff=2): +3.5
Person 5 (diff=1): +1
---5. Sum the positive ranks (W+) and sum the negative ranks (W-).
Here, all differences were positive. So, W+ = 3.5 + 3.5 + 3.5 + 3.5 + 1 = 15. W- = 0.
---6. The test statistic (W) is the smaller of W+ and W-. So, W = 0.
---7. We then compare this W value to a critical value from a Wilcoxon Signed-Rank table to decide if the diet had a significant effect. (This comparison step is usually done using tables or software and is beyond Class 9 scope).
ANSWER: The Wilcoxon test statistic (W) for this data is 0.
Why It Matters
This test is super useful in fields like AI/ML to compare different algorithm performances, in Data Science to analyze survey results, and in Economics to study changes in market behavior. Scientists and engineers use it to make important decisions based on data, helping them improve products and services.
Common Mistakes
MISTAKE: Forgetting to take the absolute value of differences before ranking them. | CORRECTION: Always find the absolute difference first (ignore the minus sign) and then rank these absolute values.
MISTAKE: Incorrectly handling tied ranks. | CORRECTION: When two or more absolute differences are the same, they get the average of the ranks they would have occupied.
MISTAKE: Not considering the original sign when summing the ranks. | CORRECTION: After ranking absolute differences, re-assign the original positive or negative sign to each rank before summing them into W+ and W-.
Practice Questions
Try It Yourself
QUESTION: A student's scores in two different practice tests for the same subject are: Test 1: 85, 78, 92, 65 | Test 2: 88, 80, 90, 68. Calculate the differences (Test 1 - Test 2). | ANSWER: -3, -2, 2, -3
QUESTION: Using the differences from Q1 (-3, -2, 2, -3), find their absolute values and then rank them. (Remember to handle ties!) | ANSWER: Absolute values: 3, 2, 2, 3. Ranks: 3.5, 1.5, 1.5, 3.5 (for absolute values 3, 2, 2, 3 respectively)
QUESTION: For the data in Q1, after ranking the absolute differences (3.5, 1.5, 1.5, 3.5 for differences -3, -2, 2, -3), assign the original signs to the ranks and then calculate the sum of positive ranks (W+) and sum of negative ranks (W-). What is the Wilcoxon test statistic (W)? | ANSWER: Ranks with signs: -3.5, -1.5, +1.5, -3.5. W+ = 1.5. W- = |-3.5 + -1.5 + -3.5| = |-8.5| = 8.5. The test statistic W is the smaller of W+ and W-, so W = 1.5.
MCQ
Quick Quiz
What is the primary purpose of the Wilcoxon Signed-Rank Test?
To compare three or more unrelated samples
To find the average of a single sample
To compare two related samples or a single sample against a known value
To predict future outcomes based on past data
The Correct Answer Is:
C
The Wilcoxon Signed-Rank Test is specifically designed for comparing two related samples (like 'before and after' measurements) or comparing a single sample to a specific benchmark, especially when data is not normally distributed. Options A, B, and D describe other statistical methods or purposes.
Real World Connection
In the Real World
Imagine a company like Zomato wants to test if a new app interface makes users order food faster. They could track the order time for the same group of users with the old interface and then with the new one. The Wilcoxon Signed-Rank Test helps them statistically confirm if the new interface truly led to quicker orders, influencing their app development.
Key Vocabulary
Key Terms
RELATED SAMPLES: Two sets of data where each observation in one set is directly linked to an observation in the other set (e.g., 'before and after' for the same person). | ABSOLUTE DIFFERENCE: The positive value of the difference between two numbers, ignoring any minus sign. | RANKING: Arranging data points in order from smallest to largest and assigning them a position number. | TEST STATISTIC: A value calculated from sample data that is used in a hypothesis test.
What's Next
What to Learn Next
Next, you can explore the 'Wilcoxon Rank-Sum Test' (also known as Mann-Whitney U test). It's similar but used for comparing two INDEPENDENT samples, meaning the observations in one group are not related to the observations in the other. Understanding both will give you powerful tools for data analysis!


