Analyses

Paired-samples t-test

Compare two measurements from the same people.

Edit on GitHub

When to use it

Use this when each row is one person measured twice, and you want to know whether the average change is different from zero. For example: did anxiety scores fall from before a workshop to after it?

The independent-samples test is the wrong tool here, because the two scores are not from separate people.

Assumptions

The two columns are numeric, and each row is a matched pair. The test assumes the differences are roughly normal.

Tensr calculates a Jarque–Bera test on those differences and stores it on the result as diagnostics.jarque_bera_statistic and diagnostics.jarque_bera_p_value. The Paired Differences table does not print it, and there is no assumption note of the kind the independent-samples test shows. A Jarque–Bera p below .05 means the differences look non-normal. Use the Wilcoxon signed-rank test, or the sign test if you only care about the direction of the change.

Running it in Tensr

Analyze → Compare Means → Paired-Samples T Test. In chat: “Paired t-test of before and after.”
Put the first measurement in before column and the second in after column. The difference Tensr tests is before minus after.
Confidence level starts at 0.95. There is no equal-variance option, because there is only one set of differences.

Options

Prop

Type

Reading the output

Forty-eight people measured before and after a short course. The typical gain is a few points, and some people go the other way.

MeanSDSE95% CI low95% CI hightdfp
before - after-3.8087.8431.132-6.086-1.531-3.36447.002

Paired t-test comparing before and after on 48 paired rows (mean diff = -3.808, p = .002). The primary result is significant (p = .002). This is large enough, in this sample, to treat the comparison this page is about as a real association rather than noise. Metrics: Mean difference = -3.808; SD of differences = 7.843; SE mean difference = 1.132; 95% CI mean diff = [-6.086, -1.531]; t statistic = -3.364; p-value = .002.

Reporting (APA 7)

Paired t-test comparing before and after on 48 paired rows (mean diff = -3.808, p = .002). This result is significant (p = .002). The effect is moderate, so report its size with the p-value.

Coming from SPSS

Analyze → Compare Means → Paired-Samples T Test.

SPSS also prints the correlation between the two columns. Tensr’s Paired Differences table does not. SPSS does not print Cohen’s dz unless you ask for an effect size. Tensr always reports dz in the metrics.

Wilcoxon signed-rank and the sign test are the rank alternatives. Three or more repeated measurements belong on repeated-measures ANOVA.