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

Method When to use
Manual Data Input Paste Before and After values side by side
Excel Upload Upload 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

Field What it shows
W Statistic Sum of positive ranks
Z-score Standardised Z with continuity correction
P-value (NEJM) Significance
Effect Size (r) Rank-biserial with interpretation label
Medians Median of Before and After
Rank table All paired differences with signed ranks

Interpretation includes significance and direction statements.

A UniversalChatBot is available for discussion.


Statistical methods used

Test statistic

Component Formula
Pair differences dᵢ = afterᵢ − beforeᵢ
Zero-difference handling Pairs with dᵢ = 0 are excluded
Ranking
W statistic Sum of positive ranks (W⁺)

Normal approximation with continuity correction

Component Formula
μ_W n(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

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