Which Test?

Draft: This page has not been reviewed by a statistician yet. Use it as a starting point and check important choices with a statistician.

Wilcoxon signed-rank test

Compares paired measurements using the ranks of the within-patient differences, for skewed differences or ordered scores.

Clinical example

A pain score from 0 to 10 recorded before and after a physiotherapy course in the same patients.

When to use it

Assumptions to check

Pairs are independent of each other

Each patient contributes one pair. Several pairs per patient need a mixed model.

Differences symmetric around the median

Look at a histogram of the within-patient differences. The test assumes they are roughly symmetric.

What to report

  • Median with interquartile range at each time point
  • Pseudo-median of the differences with 95% CI
  • The exact p-value, not just "p < 0.05"

Common mistakes

Paired data need a paired test

Measurements in the same patient are related. An unpaired test ignores that and loses power, or gives the wrong answer.

Be careful treating a score as a measurement

The steps of an ordinal score aren't necessarily equal. Means and t-tests assume they are.

Alternatives

If your situation is…Use
Differences roughly symmetricPaired t-test

In your software

R
# R (second minus first)
wilcox.test(trial$pain_after, trial$pain_before, paired = TRUE, conf.int = TRUE)
SPSS
NPAR TESTS
  /WILCOXON=pain_after WITH pain_before (PAIRED).

Sources