SPSS command: SPSS T-TEST PAIRS

Paired t test for before-and-after data

The paired-samples t test compares two measurements taken on the same cases — before and after, left and right, or two raters scoring the same items — by testing whether their mean difference is zero.

Free · No account · Files stay on your device · Updated 18 October 2026

What it tells you

Crosstabs runs SPSS T-TEST PAIRS in your browser for up to 12 pairs, with the pair correlation, the confidence interval for the difference and a choice of three effect-size standardizers.

  • Whether the average within-case change differs from zero.
  • The size of the change in original units, with a confidence interval.
  • How strongly the two measurements correlate — the reason a paired test is more sensitive than an independent one.
  • A standardized effect size based on the SD of the differences (d_z), its correlation-corrected version (d_rm) or the average of the two variances (d_av).

When to use it

Use it when

  • Pre/post designs: the same respondents before and after a training, campaign or redesign.
  • Matched pairs, such as siblings or matched customers, where each pair is one row.
  • Two ratings of the same product or stimulus by each respondent.

Use something else when

  • The two sets of values come from different people: use the independent-samples t test.
  • Three or more repeated measurements: use repeated-measures ANOVA or the Friedman test.
  • Ordinal scores or differences that are far from normal in a small sample: use the Wilcoxon signed-rank test.

How to run it in Crosstabs

  1. 01

    Arrange the data in wide format

    Each case needs one row with both measurements in separate columns. Open the file and switch to Statistics mode.

  2. 02

    Choose Paired-Samples T Test

    In the Compare means group, pick Paired-Samples T Test (T-TEST).

  3. 03

    Build the pairs

    Choose Variable 1 and Variable 2 and click Add pair; repeat for up to 12 pairs, or Remove a pair you no longer need.

  4. 04

    Choose the effect size standardizer

    Under Effect size standardizer, keep Standard deviation of the difference (d_z) or pick the corrected SD of the difference (d_rm) or Average of variances (d_av); set Confidence interval (%) and Missing values.

  5. 05

    Run

    Click Run. Declare any workspace weight first; under a sampling weight only weighted descriptives are reported.

Worked example

Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.

Try with example data

Data

Checkout times in seconds for 20 synthetic users measured before and after a checkout redesign. Each user's two times share a personal baseline, so they are correlated. Generated with a fixed seed.

Paired Samples Statistics
ItemMeanNStd. DeviationStd. Error Mean
before45.72209.9332.221
after40.232010.2192.285
Paired Samples Correlations
ItemNCorrelationTwo-Sided p
Pair 1 before & after200.963<.001
Paired Samples Test
ItemMeanStd. Deviation95% CItdfTwo-Sided p
Pair 1 before − after5.4902.7634.197 to 6.7838.88519<.001
Paired Samples Effect Sizes
ItemStandardizerPoint Estimate95% CI
Cohen's d2.7631.9871.213 to 2.743
Hedges' correction2.8201.9471.189 to 2.688

How to read it

Checkout got faster by 5.49 seconds on average (t(19) = 8.88, p < .001; 95% CI 4.20 to 6.78). The two measurements correlate at r = 0.96, which is why the paired test is far more sensitive than comparing the two means as independent groups. Cohen's d based on the SD of the differences (d_z) is 1.99.

Output tables explained

Paired Samples Statistics
Mean, N, standard deviation and standard error for each variable of each pair, on the cases valid for both.
Paired Samples Correlations
The Pearson correlation between the two measurements with one- and two-sided p.
Paired Samples Test
Mean, SD and standard error of the differences, the confidence interval, t, df and one- and two-sided p.
Paired Samples Effect Sizes
Cohen's d and Hedges' correction with the chosen standardizer and their confidence intervals.

Assumptions and notes

  • Pairs are independent of each other, though the two values within a pair are related.
  • The differences, not the raw scores, are roughly normal; with 30 or more pairs moderate skew matters little.
  • A case missing either measurement is dropped from that pair.

How the results are validated

On Python-generated reference data, t, df, p and the confidence interval match SciPy 1.18 ttest_rel and the pair correlation matches SciPy pearsonr, to a relative tolerance of 1e-9. All three effect sizes (d_z, d_av and d_rm) and their Hedges-corrected versions are checked, with confidence limits within 1e-8 of independent SciPy computations. Validation evidence

Questions

Which effect size should I report?

d_z (SD of the difference) matches the test and is the SPSS default. d_av expresses the change relative to the spread of the raw scores, which is easier to compare with between-group studies; d_rm corrects d_z for the correlation.

Why is the paired test significant when the two means look close?

Because the test works on each case's own difference. When the two measurements are highly correlated, individual differences cancel out and even a small consistent change is detectable.

My data are in long format with a time column. What now?

Restructure to one row per case with the two measurements as separate variables, then pair them.

Can I test several pairs at once?

Yes, up to 12 pairs. Choose Exclude cases listwise if every pair must use the same cases.

Run Paired-Samples T Test on your own data

Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.