PickMyTest

Wilcoxon Signed-Rank Test

Nonparametric test for paired samples at ordinal level

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 di=Xi,1βˆ’Xi,2d_i = X_{i,1} - X_{i,2} is calculated. The differences are ranked by their absolute value. The test statistic is:

W=βˆ‘i=1nsgn(di)β‹…RiW = \sum_{i=1}^{n} \text{sgn}(d_i) \cdot R_i

where RiR_i is the rank of the absolute difference ∣di∣|d_i| and sgn(di)\text{sgn}(d_i) is the sign of the difference.

Alternatively, WW can be computed as the smaller of the two rank sums:

W=min⁑(W+,Wβˆ’)W = \min(W^+, W^-)

where W+W^+ is the sum of positive ranks and Wβˆ’W^- 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 rr is calculated from the standardized test statistic:

r=Znr = \frac{Z}{\sqrt{n}}

where ZZ is the z-approximated value of the test statistic and nn is the number of pairs.

Effect Sizer
Small0.1
Medium0.3
Large0.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.