Wilcoxon Signed Rank Test using SPSS
Overview
The Wilcoxon Signed-Rank Test is the nonparametric test equivalent to the dependent t-test. It is used when we wish to compare two sets of scores that come from the same participants. This can occur when we wish to investigate any change in scores from one time point to another or individuals are subjected to more than one condition. As the Wilcoxon Signed-Ranks Test does not assume normality in the data it can be used when this assumption has been violated and the use of the dependent t-test is inappropriate.
Example
A pain researcher is interested in finding methods to reduce lower back pain in individuals without having to use drugs. The researcher thinks that having acupuncture in the lower back might reduce back pain. To investigate this, the researcher recruits 25 participants to their study. At the beginning of the study, the researcher asks the participants to rate their back pain on a scale of 1 to 10 with 10 indicating the greatest level of pain. After 4 weeks of twice weekly acupuncture the participants are asked again to indicate their level of back pain on a scale of 1 to 10 with 10 indicating the greatest level of pain. The researcher wishes to understand whether the participants' pain levels changed after they had undergone the acupuncture so they run a Wilcoxon Signed-Rank Test.
Assumptions
- One dependent variable that is either ordinal, interval or ratio (see our Types of Variable guide).
- One independent variable that consists of one group or two "matched-pairs" groups.
Test Procedure in SPSS
Click Analyze > Nonparametric Tests > Legacy Dialogs > 2 Related Samples... on the top menu in Version 18.0 of SPSS.
For older versions of SPSS, click Analyze > Nonparametric Tests > Related Samples....- You will be presented with the following:
- Transfer the variables you are interested in analyzing into the "Test Pairs:" box. In our example, we need to transfer the variables Pain_Score_Pre and Pain_Score_Post, which represent the Pain Scores before and after the acupuncture intervention, respectively. There are two ways to do this. You can either (1) highlight both variables (use the cursor and hold down the shift key) and then press the
button or (2) you can drag-and-drop each variable into the boxes. Make sure that the "Wilcoxon" checkbox is ticked in the "Test Type" box.
You will end up with a screen similar to the one below:
button shifts the pair of variables you have highlighted down one level.
button shifts the pair of variables you have highlighted up one level.
button shifts the order of the variables with a variable pair itself. - If you want to generate descriptives or quartiles for your variables then select them by clicking the
button and ticking the "Descriptive" and "Quartiles" checkboxes under the "Statistics" box. You can also decide how to deal with missing values.
You will end up with a screen similar to the one below:
Click on the
button. - Click on the
button to generate the output.
SPSS Output of the Wilcoxon Signed Rank Test
You will be presented with some tables in the Output Viewer under the title NPar Tests.
Descriptives Table
The first table titled Descriptive Statistics is where SPSS has generated descriptive and quartile statistics for your variables if you selected these options. If you did not select these options, this table will not appear in your results. You can use the results from this table to describe the Pain Score scores before and after the acupuncture treatment. As you have used a nonparametric test it is most likely that you should use the quartiles information to describe both your groups.
Ranks Table
The Ranks table provides some interesting data on the comparison of participant's Before (Pre) and After (Post) Pain Score score. We can see from the table's legend that 11 participants had a higher pre-acupucture treatment Pain Score than after their treatment. However, 4 participants had a higher Pain Score after treatment and 10 participants saw no change in their Pain Score.
Test Statistics Table
By examining the final Test Statistics table we can discover whether these changes, due to acupuncture treatment, led overall to a statistically significant difference in Pain Scores. We are looking for the Asymp. Sig. (2-tailed) value, which in this case is 0.071. This is the P value for the test. In statistics, the Wilcoxon Signed Ranks Test is denoted by the test statistic T although we can report the Z statistic instead.
We could, therefore, report our results as follows:
A Wilcoxon Signed Ranks Test showed that a 4 week, twice weekly acupuncture treatment course did not elicit a statistically significant change in lower back pain in individuals with existing lower back pain (Z = -1.807, P = 0.071). Indeed, median Pain Score rating was 5.0 both pre- and post-treatment.










