Wilcoxon Signed-Rank Test

Compare paired or before-and-after measurements without assuming normality. The Wilcoxon signed-rank test ranks the size of the differences and uses their signs, making it the go-to non-parametric alternative to the paired t-test.

Run Wilcoxon Signed-Rank Test →

What is the Wilcoxon Signed-Rank Test?

The Wilcoxon signed-rank test is a non-parametric test for paired data. It is the natural alternative to the paired t-test when the differences between pairs are not normally distributed, testing whether those differences are centered around zero.

Unlike the sign test, which uses only the direction of differences, the Wilcoxon test also uses their magnitude. It ranks the absolute differences from smallest to largest, then attaches the sign of each difference to its rank and sums the ranks. This use of magnitude gives it considerably more power than the sign test.

The test assumes that the distribution of the differences is symmetric about its center, though it does not require normality. If the differences are strongly skewed, this symmetry assumption is violated, and the simpler sign test, which needs no such assumption, becomes the more appropriate choice.

In plain terms: It's the paired t-test's non-parametric cousin: use it for before-and-after data that isn't bell-shaped. Unlike the sign test, it pays attention to how big each change was, not just its direction, so it's more sensitive, provided the changes are roughly symmetric.

Key Points

Uses Magnitude

Ranks the absolute differences and applies their signs, using more information than the sign test for greater power.

Paired T-Test Alternative

The standard non-parametric replacement for the paired t-test when difference scores are non-normal.

Symmetry Assumption

Assumes the differences are symmetric about their center. Strong skew calls for the sign test instead.

Key Formulas

di = difference for pair i; discard zeros
Rank the |di|, then reattach signs
W = Σ signed ranks (or min of W+, W-)
p-value from the Wilcoxon distribution (or normal approx.)

Interpreting the Result

The null hypothesis is that the differences are centered at zero (no systematic change). A small p-value means the signed ranks lean toward one direction more than chance allows, indicating a real shift.

Because the test uses magnitude, it detects effects the sign test would miss, but it relies on the differences being symmetric. Check the distribution of the differences: if it is roughly symmetric, Wilcoxon is the right choice; if strongly skewed, fall back to the sign test.

Assumptions & Validation

Paired Data

Observations are meaningfully paired (same subject or matched).

If violated: For independent groups use the Mann-Whitney U test.

Symmetric Differences

The distribution of the differences is symmetric about its center.

If violated: Use the sign test when differences are strongly skewed.

At Least Ordinal

Differences can be ranked by magnitude.

If violated: The test needs meaningful ordering of difference sizes.

⚠️ Check assumptions first

The Wilcoxon signed-rank test assumes the paired differences are symmetric about their center, an assumption often overlooked. If the differences are strongly skewed, the test can be misleading, and the sign test, which assumes nothing about shape, is the safer alternative. When the differences are approximately normal, the paired t-test remains slightly more powerful and may be preferred.

When NOT to Use Wilcoxon Signed-Rank Test

Independent Groups

For two unrelated groups, use the Mann-Whitney U test, not the signed-rank test.

Strongly Skewed Differences

When differences are badly skewed, the sign test's assumption-free approach is safer.

Normal Differences

When differences are approximately normal, the paired t-test is slightly more powerful.

Industry Applications

Before-After (Non-normal)

Test whether an intervention changed a measurement on the same subjects when differences are non-normal.

Method Comparison

Compare two measurement methods on the same items without assuming normality.

Ordinal Paired Data

Analyze paired ordinal outcomes such as rating-scale changes.

Small-Sample Paired Tests

Compare paired measurements robustly when the sample is small and non-normal.

Frequently Asked Questions

When should I use the Wilcoxon signed-rank test?

Use it for paired or before-and-after data when the differences between pairs are not normally distributed, making it the standard non-parametric alternative to the paired t-test. It tests whether the paired differences are centered at zero. Because it uses the magnitude of the differences, not just their direction, it is more powerful than the sign test, provided the differences are roughly symmetric.

How is the Wilcoxon signed-rank test different from the sign test?

Both are non-parametric tests for paired data, but the sign test uses only the direction of each difference, while the Wilcoxon signed-rank test also uses the magnitude by ranking the absolute differences before applying their signs. This extra information gives the Wilcoxon test more power, at the cost of an added assumption that the differences are symmetric about their center.

How is the Wilcoxon signed-rank test different from the Mann-Whitney U test?

The names are similar and both are rank-based, but they apply to different designs. The Wilcoxon signed-rank test is for paired or related data, testing the differences within pairs. The Mann-Whitney U test, sometimes called the Wilcoxon rank-sum test, is for two independent groups. Choosing between them depends on whether your data is paired or independent.

What is the symmetry assumption?

The Wilcoxon signed-rank test assumes that the distribution of the paired differences is symmetric about its center. This allows the ranks of positive and negative differences to be compared meaningfully. If the differences are strongly skewed, the assumption is violated and the test can give misleading results, in which case the sign test, which makes no distributional assumption, is more appropriate.

What happens to zero differences?

Pairs with a difference of exactly zero carry no directional or magnitude information, so the standard procedure discards them and reduces the sample size accordingly before ranking. When many differences are zero, the reduced effective sample size lowers the test's power. Different software may handle ties and zeros with slightly different conventions, which can affect borderline results.

Is the Wilcoxon signed-rank test better than the paired t-test?

It depends on the data. When the paired differences are approximately normal, the paired t-test is slightly more powerful and is generally preferred. When the differences are non-normal, the Wilcoxon signed-rank test is more reliable because it does not assume normality. The Wilcoxon test is also more resistant to outliers, since it works with ranks rather than raw values.

Compare Paired Data Without Normality

Run the Wilcoxon signed-rank test on paired differences. Free during Beta.

Run Wilcoxon Signed-Rank Test →