Wilcoxon Signed Rank Test

The Wilcoxon Signed Rank Test compares two related measurements (typically before-and-after on the same subjects) without assuming the differences are normally distributed. Example: comparing patient pain scores before and after treatment when score differences are highly skewed.


Step 1 — Choose the input method

MethodWhen to use
Manual Data InputPaste Before and After values side by side
Excel UploadUpload your file and select the two paired columns

Step 2 — Provide your data

In manual mode, fill two text areas (Before and After) with the same number of values.

In Excel mode, a Generate Random Data button is also available.


Step 3 — Calculate

Click the calculate button. On success, results appear with a "New Analysis" button to reset.


Step 4 — Read the results

FieldWhat it shows
W StatisticSum of positive ranks
Z-scoreStandardised Z with continuity correction
P-value (NEJM)Significance
Effect Size (r)Rank-biserial with interpretation label
MediansMedian of Before and After
Rank tableAll paired differences with signed ranks

Interpretation includes significance and direction statements.

A UniversalChatBot is available for discussion.


Statistical methods used

Test statistic

ComponentFormula
Pair differencesdᵢ = afterᵢ − beforeᵢ
Zero-difference handlingPairs with dᵢ = 0 are excluded
Ranking
W statisticSum of positive ranks (W⁺)

Normal approximation with continuity correction

ComponentFormula
μ_Wn(n + 1) / 4
σ_W√(n(n + 1)(2n + 1) / 24)
Z-score(W_corrected − μ_W) / σ_W (continuity correction applied)
p-value`2 × (1 − Φ(

Hypothesis statement

  • H₀: The median of paired differences is 0
  • H₁: The median of paired differences is non-zero (two-tailed)
  • Significance level: α = 0.05

Effect size — Rank-biserial correlation (r)

r = |Z| / √n (n = number of non-zero differences)

| |r| value | Label | |---|---| | < 0.10 | Negligible effect | | 0.10 – 0.30 | Small effect | | 0.30 – 0.50 | Medium effect | | ≥ 0.50 | Large effect |

Error handling

ConditionError message
All differences are 0"All differences are zero. Cannot perform Wilcoxon signed-rank test."