Sign test or Wilcoxon signed-rank test
Compares the centre of a skewed measurement in one group with a known reference value, using signs or ranks.
Clinical example
Whether the median waiting time in your clinic differs from a target of 30 days. Waiting times are strongly skewed and the sample is small.
When to use it
- The outcome is a measurement, one value per patient.
- You have one group and a known reference value to compare its centre with.
- The data are clearly skewed and the sample is small.
- It also works for paired data: apply it to the within-pair differences, with 0 as the reference. It then tests whether the median difference is zero.
Assumptions to check
Independent observations
One value per patient.
What to report
- Median and IQR
- Median difference (IQR)
Common mistakes
Reporting a mean ± SD for a heavily skewed variable
Using the Wilcoxon signed-rank test for clearly skewed differences, because it assumes symmetry
Alternatives
| If your situation is… | Use |
|---|---|
| The data are roughly normal, or the sample is large | One-sample t-test |
In your software
# R
wilcox.test(d$waiting_days, mu = 30, conf.int = TRUE)
# Sign test
binom.test(sum(d$waiting_days > 30), sum(d$waiting_days != 30))
NPTESTS
/ONESAMPLE TEST (waiting_days) WILCOXON(TESTVALUE=30).
Sources
An interval for the median
The sign test and the Wilcoxon test give a p-value. If you also want a confidence interval for the median, a bootstrap confidence interval is one option.