Skip to content

Wilcoxon Signed-Rank Test

Compare two matched measurements, such as before-and-after scores on the same subjects, without assuming the differences follow a normal distribution the way a paired t-test does.

What this answers

This test answers "did these matched pairs change in a consistent direction, using only the ranks of how large each change was, rather than assuming those changes follow any particular distribution shape?" It is the standard nonparametric counterpart to the paired t-test.

How it is calculated

Pairs with a difference of exactly zero are dropped first, a documented convention rather than a silent choice. The remaining differences are ranked by their absolute size (average ranks for ties), and the ranks belonging to positive differences are summed separately from those belonging to negative differences, giving W+ and W-. The test statistic W is the smaller of the two. When there are no ties and the pair count is small enough, this calculator enumerates the exact null distribution of W directly; otherwise it uses a tie-corrected normal approximation.

Worked example

For before values of 5, 6, and 7 and after values of 7, 8, and 10, every pair increases, so W- is 0 and W+ takes the full rank sum. With three pairs and no ties, this calculator enumerates all 8 possible sign assignments exactly and returns a two-sided p-value of .25, the smallest p-value obtainable at all with only 3 pairs, since there is no more extreme possible outcome than every pair moving the same direction.

Assumption audit

Calculated from your data: how many pairs had a zero difference and were dropped, whether any tied absolute differences forced the asymptotic mode instead of the exact one, and the resulting W+, W-, and p-value.
Evidence to review: whether the distribution of differences looks roughly symmetric. Interpreting this test as evidence about a shift in location (rather than just "the distributions differ") formally requires that symmetry assumption.
You must verify: that each row is a genuine matched pair, not an arbitrary row-position alignment of two otherwise unrelated lists, since the entire method depends on differences being computed within real pairs.

What this result does not mean

A significant result means the ranked differences are unlikely under the null hypothesis of no consistent direction, not that the median change is large in absolute terms; the rank-biserial correlation above gives a magnitude-free sense of how one-sided the result is, not the actual size of a typical change.

Common mistakes

Using this test when the raw values, not the differences, are what should be compared between two independent groups is a common mix-up; unrelated groups belong in the Mann-Whitney U Test instead. A second mistake is expecting an exact p-value with very few pairs; small n limits how extreme any p-value can possibly be, regardless of how consistent the pattern looks.