Introduction to SPSS

SPSS is a data management and analysis software package, maintained by IBM. On the surface it looks a lot like a spreadsheet and performs many of the same functions.


1. The dependent variable is continuous or ordinal data.

2. The independent variable is related and matched pairs.

3. The distribution of the differences between the two related groups needs to be symmetrical in shape.

4. two samples are not normally distributed, and samples include outliers or heavy tails.


Firstly, calculating the difference score. Click "Transform" → "Compute Variable", then put the numeric expression and target variable, a dialogue box will be shown below:

After click the "OK" button, a new column named "differences" will be shown in your dataset.


The null hypothesis is the median difference between paired observations is 0.

The reject hypothesis is the median difference between paired observations is not 0.


Next, get the median values would help you interpret the result. To analyze the median, click "Analyze"  "Compare Means" → "Means", put before_treatment, after_treatment, and differences into "Dependent List", a dialogue box will be shown below:

Click the top right corner "Options...", Choose the "Median" into "Cell Statistics" window, deselect others in "Cell Statistics", and click the "Continue" button:

A median statistics summary will be shown below:

To perform a wilcoxon signed rank test, click "Analyze"→"Nonparametric Tests "→"Related Samples"→"Scan Data" and the following dialogue box will appear:

After clicking the "Run" button, a dialogue box will be shown below. Choosing your pre and post treatment variable into the "Test Fields: ", then click the "Run" button:

The Output window will show you the "Hypothesis Test Summary". Double Click it, a Model Viewer will be shown below:

There is another way to perform Wilcoxon Signed Rank Test, click "Nonparametric Tests" → "Legacy Dialogs" → "2 Related Samples". A dialogue box will be shown below, then choose pre and post treatment into "Variable 1" and "Variable 2" separately: 

Notice that here is after_treatment - before_treatment.

A result will be shown below:


From this "Model Viewer" Window, on the left side, there is a Hypothesis Test Summary table. The "Null Hypothesis" column, it shows there is no median of differences between pre and post treatment. The "Test" column, it indicates which test has been conducted. The "Sig." column indicates the p-value, for this case, the p-value is < 0.05, which is significant. The "Decision" column is based on the p-value, for this case, it reject the null hypothesis, which indicates there is median differences between pre and post treatment.

From this histogram of difference scores, it informs there are 2 children had positive differences while there are 6 children had negative differences, which means there are only 2 children gain weights after treatment best, and the rest of patients lose weights .



The differences in median here is -12.5, which means the median decreases in weight with the after treatment versus the before the treatment is 12.5. Besides, the Wilcoxon Signed Rank test show this median difference is statistically significant. 


A Wilcoxon signed-rank test determined that there was a statistically significant median decrease in weight (45 pound) when children accepted the treatment compared to not accepted the treatment (67.50 pound), z = -1.97, p = 0.049.

Marriott Library Eccles Library Quinney Law Library