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.

Free tutorialPro practiceAbout 5 minutes6 practice questions

Quick answer: How do you run a paired-samples t-test in SPSS?

  1. Click Analyze › Compare Means › Paired-Samples T Test.
  2. Move the two related variables (such as pre and post) into the same pair.
  3. 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.

Last updated November 2026 · Not sure this is the right test? Try the Which statistical test? tool.

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

Paired-samples t-test

Use it when the same people are measured twice, such as anxiety before and after a course of therapy.

Paired-Samples T Test
Variables
Participant ID [id]
Age in years [age]
Paired Variables:2
PairVariable1Variable2
1anx_pre1anx_post
2
Options…Bootstrap…
✓Estimate effect sizes4
3Use the ↕ button to swap the order within a pair
OKPasteResetCancelHelp
  1. 1
    Pick the pairClick the first measurement, then the second, and move them across together with the arrow.
  2. 2
    Paired VariablesEach row is one pair. SPSS calculates Variable1 minus Variable2 for every person, then tests whether the average difference is zero.
  3. 3
    Order mattersPre − post gives a positive difference when scores go down. Swap them and the sign flips, but the p-value stays the same.
  4. 4
    Estimate effect sizesAdds Cohen's d.

Reading the paired output

Three tables appear. The last one holds the test.

Output1 [Document1] – SPSS Statistics Viewer
FileEditViewDataTransformAnalyzeGraphsUtilitiesExtensionsWindowHelp
Output
Log
T-Test
Paired Samples Statistics
Paired Samples Correlations
Paired Samples Test
Paired Samples Statistics
Mean1NStd. Deviation
anx_pre24.60306.20
anx_post20.10305.80
Paired Samples Test
Mean2Std. Deviationt3dfTwo-Sided p4
anx_pre − anx_post4.505.104.8329.000
  1. 1
    Means at each timeAnxiety went from 24.60 to 20.10.
  2. 2
    Mean differencepre − post = 4.50. Positive, so scores dropped.
  3. 3
    t and dfdf is the number of pairs minus 1: 30 − 1 = 29.
  4. 4
    p shown as .000It's rounded, not zero. Report it as p < .001.

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.

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.

More in Compare groups