1.3 - Wilcoxon Signed Ranks test
Learn how paired differences become signed ranks, why zero differences are excluded, and how the smaller rank sum supports a significance decision.
A difference between paired observations
Wilcoxon Signed Ranks tests a difference between two related conditions using the direction and ranked size of each paired difference.
A repeated-measures experiment gives each person two scores, such as recall before and after a mnemonic. A matched-pairs design also creates meaningful pairs, such as two people matched on initial recall, one in each condition. The relevant unit is the pair, not two independent groups. The pairs themselves must be independent of one another.
Wilcoxon Signed Ranks
A non-parametric test using signed ranks of non-zero paired differences to test for a systematic difference between related conditions.
For OCR test selection, recognise a difference, a related design, and rankable data at least ordinal. The procedure also needs paired differences whose relative sizes are meaningful. Counts, times and other interval or ratio measurements commonly satisfy this; subtracting arbitrary category labels does not. Wilcoxon does not require normality, but the usual interpretation as a population location shift assumes an approximately symmetric distribution of differences. Non-normality alone does not remove all assumptions.
Wilcoxon retains more information than a sign test: a change of 8 can receive a larger rank than a change of 1, although the exact eightfold difference is lost. A sign test records only whether each change is positive or negative. If meaningful difference sizes or symmetry are doubtful, a sign test may be more defensible. A statistically significant before/after result still needs a sound design: improvement could reflect practice rather than the mnemonic unless order, material difficulty and other influences are controlled.
Rank absolute differences
First calculate a consistent difference for every pair, then rank its absolute size after removing zeros.
Use one subtraction direction throughout, such as after minus before. Keep the sign: a positive value means an increase under that definition. A zero difference means no change, so it contributes neither a positive nor a negative rank. Remove it before ranking and reduce the effective sample size . A study with eight pairs and one zero uses , not 8 or 16.
The original example below measures number of items recalled:
| Person | Before | After | After − before | Absolute difference | Rank with sign |
|---|---|---|---|---|---|
| A | 8 | 10 | +2 | 2 | +2 |
| B | 8 | 8 | 0 | 0 | Excluded |
| C | 9 | 8 | −1 | 1 | −1 |
| D | 7 | 10 | +3 | 3 | +3 |
| E | 6 | 10 | +4 | 4 | +4 |
| F | 5 | 10 | +5 | 5 | +5 |
| G | 4 | 10 | +6 | 6 | +6 |
| H | 3 | 10 | +7 | 7 | +7 |
Rank absolute differences from smallest to largest: −1 has absolute size 1, so it receives rank 1, rather than being placed below zero in a signed ordering. Restore the original sign after assigning the rank.
Ties concern equal absolute differences, even if their signs differ. If +2 and −2 occupy positions 2 and 3, each receives rank 2.5; one then contributes +2.5 and the other −2.5. Do not discard these tied non-zero differences. Only zero changes are removed under the procedure taught here.
Choose the smaller rank sum
Wilcoxon uses the smaller of the total positive ranks and total negative ranks, rather than the less frequent sign.
Write for the sum of positive ranks and for the magnitude of the sum of negative ranks. Both totals are reported as non-negative quantities. Then:
For non-zero differences, , including average tied ranks.
In the worked example, and , so . The total rank sum is , providing an arithmetic check. T is dimensionless even though the original differences are counts of items.
Why must we add both sets? Imagine ranks 1, 2, 3 and 4 are positive, while 5, 6 and 7 are negative. There are fewer negative signs, but their rank sum is 18; the positive sum is only 10. The statistic is 10, not 18. Counting signs alone would ignore the size information that distinguishes Wilcoxon from the sign test.
When a worksheet uses W rather than T, check its definition. Some software reports a particular signed sum instead of the smaller sum. Its probability calculation may be valid, but that reported number cannot be inserted uncritically into a table defined for the smaller T.
Interpret T with the effective N
The critical value must match the number of non-zero pairs, the selected significance level and the hypothesis direction.
This supplied extract is for a two-tailed Wilcoxon test at :
| Effective | Critical |
|---|---|
| 6 | 0 |
| 7 | 2 |
For the example, use , so the critical T is 2. The rule is observed T less than or equal to critical T. Since , reject the null hypothesis: there is a significant difference in recall before and after at the 5% level. The original signed differences show that recall generally increased in this sample.
A small T means one direction dominates the rank total. It does not mean that the original change is small. Significance concerns compatibility with the null model, not the probability that the null is true or the size of a useful benefit. A non-significant result means insufficient evidence to reject the null, rather than proof of no change. A directional hypothesis additionally requires the observed change to agree with the prediction.
The simple exact table assumes no tied absolute differences. Average ties still give correct signed-rank totals, but a real tied-data analysis needs suitable tie-aware probability support. Follow any supplied table and its stated conditions in a bounded task. Keep unrounded measurements when forming differences where possible: rounding can accidentally create ties or zeros and change the effective N.