Unit 3 · Compare groups
How to run a paired-samples t-test in SPSS
Run a paired-samples t-test in SPSS for before-and-after data and report it correctly in APA style.
Quick answer: How do you run a paired-samples t-test in SPSS?
- Click Analyze › Compare Means › Paired-Samples T Test.
- Move the two related variables (such as pre and post) into the same pair.
- Click OK and read the Paired Samples Test table.
Report it in APA style: Anxiety fell from before to after therapy, t(29) = 4.83, p < .001, d = 0.88.
What is a paired-samples t-test?
A paired-samples t-test compares two means from the same people (or matched pairs), such as anxiety before and after therapy. Because each person acts as their own comparison, it removes differences between people and is more powerful than an independent t-test.
When to use it
- Before-and-after designs.
- Every participant takes part in both conditions (repeated measures).
- Matched pairs, such as twins or partners.
- If the differences are clearly non-normal or the data are ordinal, use Wilcoxon signed-rank.
How it works
SPSS works out each person’s difference score (first minus second), then tests whether the mean difference is different from zero: t = mean difference ÷ (SD of differences ÷ √n). Degrees of freedom are the number of pairs minus 1.
Assumptions
- The difference scores are roughly normal.
- The pairs are independent of each other.
- The outcome is Scale.
Worked example
For 30 clients, anxiety fell by an average of 4.50 points from before to after therapy, t(29) = 4.83, p < .001, d = 0.88.
Key terms
- Difference score
- Each person’s score in condition 1 minus condition 2.
- Repeated measures
- The same people measured more than once.
- Counterbalancing
- Varying the order of conditions to stop order effects.
Common mistakes
- Running an independent t-test on paired data.
- Getting the direction wrong: check which variable SPSS subtracted from which.
- Forgetting order or practice effects in the design.
How to do it in SPSS
The SPSS syntax
Prefer typing to clicking? Open File › New › Syntax, paste this in, select it and choose Run › Selection. Every dialog's Paste button writes the same kind of code.
T-TEST PAIRS=anx_pre WITH anx_post (PAIRED)
/ES DISPLAY(TRUE)
/CRITERIA=CI(.95)
/MISSING=ANALYSIS.Practice data
Download the file used in this lesson and run it yourself in SPSS: you should get the same results as the screens above.
- therapy_paired.savAnxiety before and after therapy (N = 30)
Now practise it interactively →
Reading is only half of it. Tap through the real SPSS menus, read the output and pick the right write-up in 6 quick questions, with instant feedback on every answer.
Practice for this lesson is part of Pro, with every unit, unlimited hearts and saved progress.