Group comparison

Wilcoxon Signed-Rank Test

Compares two measurements taken from the same participants using the signed ranks of their differences, without assuming the differences are normally distributed.

Method summary

The Wilcoxon signed-rank test takes the difference between two matched measurements, ranks those differences by absolute size, and sums the ranks separately for positive and negative differences. If the two rank sums are close, there is no systematic change; if one clearly dominates, the measurements have shifted. Because it uses the ranks of the differences rather than their raw size, it suits small samples where the normality assumption behind the paired t-test is strained, and ordinal scales where a mean difference is hard to defend. By default, zero differences are dropped from the ranking. Alongside the rank table the engine reports a Z value, the asymptotic p value and r as an effect size.

Which research questions does it answer?

  • Did a five-point self-confidence rating change between before and after a training course?
  • Do the same participants rank two product samples differently?
  • Do symptom severity scores differ before and after an intervention in a small sample?
  • Does the difficulty level reported by the same users change between the old and the new interface?

When should you use it?

  • When two measurements come from the same person or from matched pairs.
  • When the distribution of the difference scores departs clearly from normality.
  • When the measurement is on an ordinal scale and interpreting a mean difference is not defensible.
  • When the sample is small and a few outliers pull the mean around.

Required variable types

  • Two columns: the first and second measurement of the same participant, coded numerically.
  • Rows represent matched observations; each row is one participant or one matched pair.
  • At least six complete pairs; below that the engine will not run the analysis.

Key assumptions

Measurements are matched
The two columns must hold measurements of the same participant or matched pair. The test is not valid for independent groups.
Differences can be ranked
The absolute sizes of the differences must be meaningfully rankable; on unordered categorical codes the test has no meaning.
Enough matched observations
The rank sums need a reasonable number of pairs before their distribution behaves predictably.
Symmetry of the differences
Reading the outcome as a difference in medians assumes the difference scores are roughly symmetric. Without symmetry the test speaks about the general tendency of the differences.

How YouReply checks these assumptions

  • Measurements are matched: The panel does not check this assumption automatically; the researcher evaluates it.
  • Differences can be ranked: The method picker asks for two numeric columns and prevents the same column being chosen for both fields.
  • Enough matched observations: The engine requires at least six complete pairs. In addition, the Z value is not computed when fewer than ten non-zero differences remain and is reported as zero, so read the p value cautiously in that case.
  • Symmetry of the differences: The panel does not test symmetry. The engine reports a Kolmogorov-Smirnov normality check per column, which is informational and does not change how the test runs.

How the analysis is run

  1. 1Upload a data file that holds the two measurements in separate columns.
  2. 2On the Variable tab confirm both columns are read as numeric and that missing values are marked correctly.
  3. 3On the Analysis tab choose the Wilcoxon signed-rank test.
  4. 4In the parameter form select the first and second measurement columns, adjusting how zero differences are handled if you need to.
  5. 5Run the analysis. The rank table, the Z value, the p value, the effect size and the normality check open as separate sections.
  6. 6Download the results as Excel; the credits card names the library call behind the numbers.

Statistics and tables produced

Signed rank table
Counts of negative, positive and tied differences with their mean ranks and rank sums; the direction of the change is read here.
Z value
The standardised test statistic. It is not computed when fewer than ten non-zero differences remain and then appears as zero.
Asymptotic p value
Reported as two-tailed or one-tailed according to the direction selected.
Effect size r
Obtained by dividing Z by the square root of the number of observations, presented with a label describing its magnitude.
Kolmogorov-Smirnov normality check
A separate table per column reporting a Monte Carlo p value together with an interval describing the uncertainty of that simulation.

Effect size and confidence intervals

r coefficient
The Z value scaled by sample size. Around 0.1 counts as small, 0.3 as medium and 0.5 and above as large; these are conventions from the literature rather than firm boundaries.

No confidence interval is returned for the median of the differences or for the effect size. The 99 per cent interval that appears in the result belongs to the Monte Carlo simulation used in the normality check and must not be reported as an interval for the effect.

Example research question and example result

The numbers below are a representative example, not data from a real study or a real user.

Research question
In a training programme, did the skill level participants reported for themselves (1-7) change between before and after?
Variables
First measurement: skill level before the programme (ordinal) · Second measurement: skill level after the programme (ordinal)
Example result
Of 38 participants, 26 increased, 7 decreased and 5 stayed the same. Z = -3.41, p = 0.001, r = 0.55.
Interpretation
The rank sum in the direction of increase clearly dominates, so the reported skill level rose systematically after the programme. The effect size is large, but in a before-and-after design without a control group the change cannot be attributed to the programme alone.

Real output on a sample dataset

The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.

General customer survey (synthetic)

A wide survey of three hundred respondents: two and three category grouping variables, continuous measures, a five point ordinal scale, a binary purchase outcome, a four category brand choice, three repeated measurements, paired binary questions, three raters, four price questions and deliberately empty cells.

Rows
300
Columns
respondent_id, gender, education, region, age, income, satisfaction, service_score, price_score, quality_score, loyalty, nps_score, purchased, brand_choice, satisfaction_level, pre_score, post_score, measure_1, measure_2, measure_3, use_before, use_after, use_followup, rater_1, rater_2, rater_3, price_too_cheap, price_cheap, price_expensive, price_too_expensive, feedback_score, followup_rating
Download the dataset as CSV

The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.

Research question: Did the same respondents score higher at the later measurement?

First variable
pre_score
Second variable
post_score

One-sample Kolmogorov-Smirnov test

One-sample Kolmogorov-Smirnov test
RowSample sizeNormal parametersMost extreme differencesTest statisticAsymptotic significance (2-tailed)Monte Carlo significance (2-tailed)
pre_score300--0.0460.548-
post_score300--0.0420.660-

Ranks

Ranks
RowNegative ranksPositive ranksTiesTotal
Sample Size632361300
Mean Rank95.98164.42--
Sum of Ranks6,046.5038,803.50--

Test statistics

Test statistics
RowComparison of pre_score - post_score
Z-10.95
Asymptotic Significance (2-tailed) (p)< 0.001

Effect size

Effect size r
-0.632

Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260914

How to report the result

Reported skill level was significantly higher after the programme than before it, Z = -3.41, p = .001, r = .55 (26 increases, 7 decreases, 5 ties).

An example sentence close to APA style; the numbers are representative.

When you should not use it

  • Not for independent groups; that design calls for the Mann-Whitney U test.
  • Not suitable when there are more than two repeated measurements; those need a different method.
  • With many zero differences the number of usable pairs shrinks and the test loses power.
  • If the distribution of differences is clearly skewed, the result cannot be read as a difference in medians.
  • In a before-and-after design without a control group a significant result does not establish causation; other changes over time cannot be ruled out.

What to use when the assumptions are not met

  • Paired Samples t-TestWhy: When the difference scores are approximately normal, giving a directly interpretable mean difference.
  • Mann-Whitney U TestWhy: When the two measurements come from different groups rather than the same people.
  • Friedman TestWhy: When three or more repeated measurements are taken from the same participants; it extends the rank logic beyond two.

Frequently asked questions

How are zero differences handled?
By default zero differences are removed from the ranking and counted on their own row of the rank table. The panel offers a setting that changes this behaviour, and you are expected to report which one you used.
The Z value came out as zero, what does that mean?
When fewer than ten non-zero differences remain, the engine does not use the normal approximation and returns zero in the Z field. Read the p value together with the rank table in that case, and consider collecting more pairs.
Is the 99 per cent interval in the result a confidence interval for the effect?
No. That interval describes the uncertainty of the Monte Carlo simulation used in the normality check. No interval is computed for the effect size or for the median difference.
When should I choose this over the paired t-test?
Choose it when the difference scores are clearly skewed, when a few outliers dominate the mean, or when the measurement is a single ordinal item. If the differences are reasonably symmetric, the paired t-test has more power.

References

  • Siegel, S., & Castellan, N. J. (1988). Nonparametric Statistics for the Behavioral Sciences
  • Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
  • scipy.stats.wilcoxon documentation

Try it with your own data

The free plan includes 50 analysis runs a month and needs no card.