Paired (Dependent-Samples) t-Test
The matched-pairs companion the two-sample t-test set was missing.
Example
You enter
- Mean of the differences d_bar 2.5
- SD of the differences s_d 3
- Number of pairs n 20
- Tail two
- Alpha 0.05
You get
- T stat 3.727
- Degrees of freedom 19
- P value 0.00143
Details, formula, and sources
On the n differences of before/after or matched pairs: t = d_bar / (s_d / sqrt(n)) on n - 1 df, where d_bar and s_d are the mean and SD of the DIFFERENCES (not the two groups). A mean difference of 2.5 with SD 3.0 over 20 pairs gives t = 3.73, df 19, two-sided p = 0.0014. Pairing removes between-subject variation, so it is usually far more powerful than a two-sample test on the same data - but it needs genuinely matched pairs. Reports t, df, the p-value, and the significance flag, reusing the bundled Student-t CDF. Small n leans on the normality of the differences.
On the n paired differences d_i: t = d_bar / (s_d / sqrt(n)) on df = n - 1, where d_bar and s_d are the mean and standard deviation of the differences; p from the Student-t CDF.
Per OpenIntro Statistics Chapter 7 (inference for paired data) - the paired t-test is a one-sample t on the differences, by name; the t-CDF reuses the bundled special-function helper.
Free at openintro.org.
Estimate. AHJ and licensed professional govern.
Field names used by the API: mean_diff, sd_diff, n_pairs, tail, alpha, t_stat, df, p_value
- One-sample t on differences t = d_bar/(s_d/sqrt(n)), df = n - 1OpenIntro Ch. 7
- Matched pairs requires genuinely paired data (same subject, twins, before/after)OpenIntro Ch. 7