Wilcoxon Signed-Rank Test#
The Wilcoxon signed-rank test is the nonparametric alternative to the paired t-test. It tests whether two related samples differ significantly without assuming normally distributed differences.
When to Use#
Use the Wilcoxon test when you want to:
- Compare two paired measurements (e.g., before/after)
- The data are at least ordinally scaled
- The differences are not normally distributed or the sample is small
- You need a nonparametric alternative to the paired t-test
Assumptions#
- Paired (related) observations
- At least ordinal scale of measurement
- Symmetric distribution of differences around the median
- Independence of pairs from one another
Formula#
For each pair, the difference is calculated. The differences are ranked by their absolute value. The test statistic is:
where is the rank of the absolute difference and is the sign of the difference.
Alternatively, can be computed as the smaller of the two rank sums:
where is the sum of positive ranks and is the sum of negative ranks.
Example#
Practical Example: Pain Therapy
A therapist wants to evaluate the effectiveness of a new pain therapy. 15 patients rate their pain intensity on a scale from 0β10 before and after treatment.
- Measurement 1: Pain score before therapy
- Measurement 2: Pain score after therapy
Since the pain scale is ordinal and the sample is small, the Wilcoxon test is used instead of the paired t-test to determine whether the therapy significantly reduces pain.
Effect Size#
The effect size is calculated from the standardized test statistic:
where is the z-approximated value of the test statistic and is the number of pairs.
| Effect Size | r |
|---|---|
| Small | 0.1 |
| Medium | 0.3 |
| Large | 0.5 |
Further Reading
- Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 80β83.
- Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics (5th ed.). SAGE.