← All resources

WORKED EXAMPLE · PAIRED RANKS

Wilcoxon Signed-Rank Worked Example: Paired Symptom Scores

Follow before-and-after ordinal symptom scores through paired changes, zero differences, tied absolute ranks, a signed-rank statistic, and a reproducible BioTabular analysis.

Published by BioTabularLast reviewed: November 2, 2026

These 14 synthetic participants each have a symptom score before and after a program. Scores range from 0 to 10; lower means fewer symptoms. The question is whether the paired scores tend to shift in one direction. This is an illustrative association within people, not evidence that the program caused the change: there is no comparison group or control for other explanations.

Define the design and target

Observational unit
One participant with two correctly matched scores.
Before measurement
Before-program symptom score, 0–10.
After measurement
After-program symptom score, 0–10.
Difference throughout this example
After minus before; negative values indicate improvement.
Calculator order
Select the after score first and the before score second so BioTabular ranks the same after-minus-before differences.
Starting method
Two-sided Wilcoxon signed-rank test with a continuity-corrected normal approximation because zero differences and ties are present.

BioTabular lets users choose either column order. The selected order determines the sign of the differences and the reported positive-rank sum; the two-sided p-value is the same when that order is reversed. The participant ID identifies the matched pair; rows must not be sorted independently by score.

Inspect the synthetic paired data

ParticipantBeforeAfterAfter − before
P0183-5
P0294-5
P0373-4
P0484-4
P0596-3
P0674-3
P0786-2
P0864-2
P0976-1
P1065-1
P11550
P12880
P1367+1
P1478+1

Ten participants improve, two are unchanged, and two worsen by one point. The median before score is 7, the median after score is 5, and the median of the 14 individual after-minus-before changes is −2. The difference between the two separate medians is also −2 here by coincidence; paired analysis uses each participant’s actual change.

Plot the pairs

Paired line plot of fourteen before and after symptom scores; most lines descend, two are level, and two rise by one point.
Each line connects one participant’s measurements. Teal lines are improvements or unchanged scores; muted orange lines indicate the two one-point worsenings. Coincident endpoints overlap because the scores are discrete.

The figure makes the pairing and direction visible before any test is calculated. It also shows many repeated integer values, which create tied change magnitudes. A paired plot and a plot of the differences are useful checks: the signed-rank test is based on the size and sign of each nonzero within-person difference, not on the two unpaired score distributions.

Build the signed ranks

With after selected first, BioTabular calculates after minus before. The nonzero differences are −5, −5, −4, −4, −3, −3, −2, −2, −1, −1, +1, and +1. The two zero differences are set aside before ranking, leaving 12 ranked pairs. Rank the absolute sizes from smallest to largest, giving tied magnitudes their average rank.

Absolute changeNumber of pairsOccupied ranksAverage rank per pair
141–42.5
225–65.5
327–87.5
429–109.5
5211–1211.5

The two positive one-point changes each receive rank 2.5, so the positive-rank sum is V = 5. The negative changes have rank sum 73: the two negative one-point changes contribute 5, and the size-2, 3, 4, and 5 pairs contribute 11, 15, 19, and 23. The two sums total 78, the sum of ranks 1 through 12. Neither a zero change nor a tie creates an extra participant or a degree of freedom.

Read the result

Complete pairs
14; omitted 0
Zero differences
2 excluded from ranks
Ranked pairs
12
Positive-rank sum for after − before
V = 5
Two-sided p-value
0.008236
Computation
Normal approximation with continuity correction

The null hypothesis concerns a paired difference distribution centered at zero under the signed-rank model. At α = .05, these data provide evidence of a directional shift. The predominance of negative after-minus-before differences points toward improvement. The p-value does not measure the size or clinical value of the change. Because ties and zero differences are present, BioTabular uses a continuity-corrected normal approximation rather than an exact no-ties distribution.

The usual interpretation as a location shift, including a median shift, needs a reasonably symmetric distribution of nonzero paired differences around its center. With this small, discrete dataset, inspect that shape and describe the observed changes directly. BioTabular does not currently report a signed-rank shift estimate or confidence interval; a confirmatory study needing one should use a validated interval procedure.

Reproduce the analysis in BioTabular

  1. Download the CSV and open the Wilcoxon signed-rank calculator.
  2. Import it with Participant_ID as the identifier. Keep the two score columns numeric or ordinal, then confirm the column types.
  3. Select “Two paired columns.” Choose After_Symptom_Score as the first measurement and Before_Symptom_Score as the second, matching the after-minus-before differences in the table.
  4. Keep the two-sided alternative and α = .05, then run the test.
  5. Check 14 complete pairs, two zeros excluded from ranks, V = 5, and p = .008236. Inspect the paired figure in Plot Studio as well as the numerical output.

Interpret and report with care

“Among 14 participants with paired 0–10 symptom scores, ten had lower scores after the program, two were unchanged, and two had one-point increases. The median paired after-minus-before change was −2 points. A two-sided Wilcoxon signed-rank test of after-minus-before differences, excluding two zero differences from ranks and using a continuity-corrected normal approximation for ties, gave V = 5, p = .0082.”

Describe when the measurements were taken, how the scale was defined, and whether other treatments or changes could explain the observed pattern. Report missing pairs if any. The result supports a within-participant association in this sample; causal claims require a design that addresses secular changes, regression to the mean, and other concurrent influences.

Common mistakes and limits

  • Analyzing before and after scores as independent groups and losing the participant matching.
  • Sorting each column separately or pairing records without checking IDs.
  • Including zero changes in the ranked sample size or assigning arbitrary ranks to ties.
  • Calling the statistic a mean difference or treating its p-value as the magnitude of improvement.
  • Automatically interpreting a signed-rank result as a median change without considering the shape of paired differences.
  • Assuming a significant before-and-after change establishes a program effect without a comparison design.

This synthetic example is complete, small, and intentionally simple. Real data may have missing visits, floor effects, clustering, unequal follow-up intervals, and asymmetric changes. In those settings, consider a method matched to the scientific estimand and design, and seek statistical support for confirmatory inference.

Related resources

Compare this rank-based paired analysis with the paired t-test worked example, which estimates a mean within-person difference. Review Paired vs. Independent Samples for the design distinction, and Kruskal–Wallis and Dunn for ranks across three independent groups.

References and further reading

BioTabular’s editorial approach and scope explain how these educational resources are prepared and what they do not replace.