When to Use the Wilcoxon Signed-Rank Test
You have the same people, items, or matched pairs measured twice — before and after an intervention, pre-test and post-test scores, or two ratings of the same thing — and you want to know whether the scores systematically changed. The paired-samples t-test is the usual first choice for this design, but it assumes the differences between the two measurements are roughly normally distributed. When that assumption is clearly not met, when your sample is small, or when your data are ordinal (for example, Likert-scale ratings), the Wilcoxon signed-rank test is the safer, standard alternative.
In plain language, the test asks: when you line up the differences between each pair, do the increases clearly outweigh the decreases, or vice versa? It does not compare means. It works with the ranks of the differences, so a few extreme scores cannot dominate the result the way they can with a mean. That is exactly why it is useful for skewed questionnaire data, reaction times, or small thesis samples where one or two outliers would otherwise distort everything.
Use the Wilcoxon signed-rank test when all of these fit: you have two related measurements per case; the outcome is at least ordinal; and the distribution of the differences is roughly symmetric. If the differences are badly asymmetric, consider reporting medians and a sign test as a sensitivity check, and say so plainly in your write-up rather than hiding it.
Do not use it for two independent groups — that is the Mann-Whitney U test. Do not use it for three or more related measurements — that is Friedman’s test. Matching the test to the design matters more than any single p-value.
Setting Up Your Data in SPSS
Your data file needs one row per person (or per pair) and two columns, one for each measurement. For example, a column called Before and a column called After, or PreTest and PostTest. Each row is one participant; the two scores in that row belong together. This paired layout is essential — do not stack the two measurements into a single column with a grouping variable, because that layout is for independent-groups tests.
Before you run anything, look at your data. Run Analyze, Descriptive Statistics, Explore, or simply check Frequencies for each variable, and look at the differences. Compute a difference variable if it helps: Transform, Compute Variable, name it Diff, and set the numeric expression to After minus Before. A histogram or boxplot of Diff will tell you quickly whether the differences look symmetric and whether extreme values are present. Missing data need a decision too: SPSS handles a pair with a missing value by excluding that pair from this test, which is the usual pairwise approach, but report how many pairs were excluded so your reader can judge the effective sample size.
Running the Wilcoxon Signed-Rank Test, Click by Click
The classic dialog is the most reliable route, and it is the one most thesis supervisors expect to see.
- Go to Analyze, then Nonparametric Tests, then Legacy Dialogs, then 2 Related Samples.
- In the dialog, move your two variables — for example Before and After — into the Test Pairs box as a pair. SPSS will show them as Before – After.
- Under Test Type, make sure Wilcoxon is ticked (it is the default) and untick Sign and McNemar unless you deliberately want those too.
- Click Options if you want descriptives or quartiles, then click OK.
SPSS also offers a newer route under Analyze, Nonparametric Tests, Related Samples, which opens an interactive model viewer with extra plots. The numbers for the test itself match the classic dialog, but the classic output tables are easier to quote in a thesis, so this tutorial uses the classic route throughout.
If you have more than one pair to test, repeat the dialog for each pair rather than cramming unrelated pairs into one run. Each pair gets its own test, its own table, and its own sentence in your results.
Paste-Ready SPSS Syntax
If you prefer syntax — and for a thesis, you should, because syntax is reproducible — the command is short:
NPAR TESTS /WILCOXON=Before WITH After (PAIRED) /MISSING ANALYSIS.
Replace Before and After with your exact variable names. The (PAIRED) keyword tells SPSS these are related samples. The /MISSING ANALYSIS subcommand excludes a pair only when one of its two scores is missing. Save the syntax file with your data file; when a supervisor asks how you got a number, you can show the exact command instead of trying to remember which boxes you ticked.
How to Interpret the SPSS Output
SPSS gives you two main tables. Read them in order.
First, the Ranks table. It splits your pairs into Negative Ranks (where the second score is lower than the first, depending on how you ordered the pair), Positive Ranks (where it is higher), and Ties (where the two scores are equal). For each group it shows N, the Mean Rank, and the Sum of Ranks. Ties contribute no rank to either side, so the effective sample size for the test is the number of non-tied pairs, not your total sample. Say this in your results — a reader who sees 30 participants but only 24 non-tied pairs needs to know why.
Second, the Test Statistics table. This gives you the Z statistic (based on the smaller rank sum, with a normal approximation) and Asymp. Sig. (2-tailed), which is the p-value. If Asymp. Sig. is below your alpha level, usually .05, you reject the null hypothesis of no systematic difference between the two measurements. If it is above .05, you do not have evidence of a systematic difference — phrase it that way, not as proof that there is no difference.
Also check the direction. A significant p-value alone does not tell you which measurement was higher. Look at the Ranks table: if Positive Ranks dominate, the second measurement tends to be higher; if Negative Ranks dominate, it tends to be lower. Compare the medians of the two measurements as well, because medians are the natural summary for this test.
Effect size
A p-value does not tell you how large the change was. A widely used effect-size approximation for this test is r equals Z divided by the square root of N, where N is the total number of observations used. Values around .10 are conventionally described as small, around .30 as medium, and around .50 as large, following the usual Cohen-style benchmarks for r. Report the effect size alongside the p-value, and interpret it in context: a medium effect on a ten-point scale may matter more in practice than the label alone suggests. Do not over-claim — an effect size from a small sample is imprecise, so describe it as an estimate, not a precise population value.
What to do if the result is not significant
A non-significant result is still a result. Check the medians and the rank pattern: were the increases and decreases roughly balanced, or was the sample simply too small to detect a real change? Look at the number of ties — many ties shrink the effective sample and the power of the test. Report the result honestly, give the medians and the test statistic, and avoid language like “no effect” when what you mean is “no statistically significant difference detected in this sample.”
Reporting in APA Style (7th ed.)
APA style (7th edition) wants the test, the statistic, the sample size, the p-value, and an effect size, plus the descriptive statistics your reader needs to understand the direction of the change. For a nonparametric paired test, report medians rather than means as the headline descriptives.
Use a sentence like this template, filling in your own numbers:
“A Wilcoxon signed-rank test indicated that post-intervention scores (Mdn = [value]) were significantly higher than pre-intervention scores (Mdn = [value]), Z = [value], p = [value], r = [value].”
If the result is not significant, write: “A Wilcoxon signed-rank test indicated no significant difference between pre-intervention scores (Mdn = [value]) and post-intervention scores (Mdn = [value]), Z = [value], p = [value], r = [value].”
Two APA details matter. First, report exact p-values (for example, p = .032) rather than only p less than .05, unless SPSS prints .000, in which case write p less than .001. Second, italicise the symbols Z, p, Mdn, and r, and use an equals sign with spaces around it. Keep the sentence to one result per test; if you ran several pairs, give each its own sentence and consider noting whether you adjusted for multiple comparisons.
Worked Example: Reading an Output Without Getting Lost
Imagine a small study in which 24 students complete a short anxiety questionnaire before and after a four-week workshop, and you want to know whether scores changed. You run the Wilcoxon test on the Before and After scores. This is an illustrative walkthrough only, not data from a real study, but the reading steps are exactly the ones you will use on your own data.
First, look at the Ranks table. Suppose most pairs are Positive Ranks and only a few are Negative Ranks, with a couple of Ties. That pattern already tells you the direction: more students improved than worsened. Next, look at the Test Statistics table: the Z value and its p-value tell you whether that imbalance is larger than you would expect by chance. If the p-value is below .05, you can report a significant change in the direction shown by the ranks and the medians. If it is above .05, you report no significant change, even if the medians moved a little — the movement was not large or consistent enough, in this sample, to rule out chance.
Finally, compute r from Z and N, and put the medians, Z, p, and r together in a single APA sentence. That one sentence, plus the Ranks pattern in words, is usually all a results section needs for this test. A table of medians and quartiles for the two time points is a useful addition, but do not paste every SPSS table into your thesis — select, summarise, and interpret.
Common Mistakes to Avoid
The most common mistake is using the Wilcoxon signed-rank test on two independent groups, or using the Mann-Whitney U test on paired data. The names sound similar, but the designs are different, and the wrong test answers the wrong question. Second, do not report means as if this were a t-test: the test is about ranks, so medians are the matching summary. Third, do not ignore ties. A dataset with many identical before-and-after scores has less information than its headline sample size suggests. Fourth, do not run the test on difference scores as if they were independent data — the pairing is the whole point. Finally, do not cherry-pick: if you tested three pairs, report all three, not only the significant one.
Key Takeaways
- The Wilcoxon signed-rank test is the nonparametric alternative to the paired-samples t-test, for two related measurements.
- It compares the ranks of the differences, so it is robust to skew and outliers, and it suits ordinal data and small samples.
- In SPSS, use Analyze, Nonparametric Tests, Legacy Dialogs, 2 Related Samples, with the Wilcoxon option ticked.
- Read the Ranks table for direction and ties, then the Test Statistics table for Z and the p-value, and always add an effect size r.
- Report medians, Z, exact p, and r in a single APA-style sentence, and state how many pairs were tied or excluded.
Frequently Asked Questions
When should I choose Wilcoxon over a paired-samples t-test?
Choose Wilcoxon when the differences between your paired scores are clearly non-normal, when your data are ordinal, or when your sample is small and outliers would distort a mean. If the differences look roughly normal and your sample is adequate, the paired-samples t-test is more powerful and is the better choice.
Does the Wilcoxon test compare medians?
Strictly, it tests whether the distribution of differences is symmetric around zero, which is often described in practice as a test of the median difference. Reporting the medians of the two measurements alongside the test is standard, but do not claim the test itself directly compared two medians in the way a t-test compares two means.
How many participants do I need?
There is no single minimum, but very small samples have very little power: with fewer than about six non-tied pairs, it is hard for any result to reach significance. Plan your sample size before collecting data, and report the number of non-tied pairs actually used, not just the number recruited.
What if I have a lot of ties?
Ties are dropped from the ranking, which reduces power. If most of your pairs are tied, the measurement may be too coarse — for example, a three-point scale — and a sign test or a different outcome measure may be worth considering. Report the tie count so readers can judge this.
Can I run the Wilcoxon test in SPSS with the newer Related Samples procedure?
Yes. Analyze, Nonparametric Tests, Related Samples gives the same test with an interactive viewer and extra plots. The classic Legacy Dialogs route used in this tutorial gives simpler tables that are easier to quote, so use whichever output your supervisor prefers and keep the test itself the same.
Need this done on your data? Get a free quote → /services/