Wilcoxon signed-rank test
A rank-based test for paired data (or one sample against a hypothesised median) using the ranks of the absolute differences and their signs.
- Paired difference (or for one sample).
- Number of nonzero differences.
- Size of each group of tied |d|.
When to use
Paired measurements (before/after, matched pairs) when the differences are clearly non-normal with a small sample, or the outcome is ordinal-ish but differences can be ranked.
Assumptions
- Pairs independent of each other.
- The distribution of differences is symmetric about its median (needed to interpret the test as being about the median difference). If not, use the sign test.
How to interpret
H₀: differences are symmetric about 0 (median difference 0). Effect size: matched-pairs rank-biserial , from −1 to 1.
Common mistakes
- Using it on two independent groups (use Mann–Whitney).
- Forgetting that zero differences are dropped, which reduces n.
- Expecting an "exact" p-value when there are ties or zeros.
Example
Before 140, 135, 150, 142, 138, 145; after 136, 132, 143, 141, 133, 139. Differences 4, 3, 7, 1, 5, 6 are all positive: , , . Exact two-sided ; (every pair decreased).