Paired t-Test

1 min read Last updated Sat Jun 27 2026 08:46:52 GMT+0000 (Coordinated Universal Time)

Used when 2 related measurements are taken on the same subjects. Evaluates whether the mean difference between paired observations is significantly different from zero.

Use when: observations are naturally paired (before/after, matched subjects, repeated measures). Use an independent 2-sample tt-test instead when samples are unrelated.

Let each pair have values (X1,X2)(X_1, X_2). Suppose di=X1iX2id_i = X_{1i} - X_{2i}.

dˉ=1ni=1ndiandsd=(didˉ)2n1\bar{d} = \frac{1}{n} \sum_{i=1}^{n} d_i \quad \text{and} \quad s_d = \sqrt{\frac{\sum (d_i - \bar{d})^2}{n - 1}}

Hypotheses

H0:μd=d0(no mean difference, typically d0=0)H_0 : \mu_d = d_0 \quad \text{(no mean difference, typically } d_0 = 0\text{)} H1:μd<d0 or μd>d0 or μdd0H_1 : \mu_d < d_0 \text{ or } \mu_d > d_0 \text{ or } \mu_d \ne d_0

Test Statistic

Under H0H_0 with ν=n1\nu = n - 1:

t=dˉd0sd/ntνt = \frac{\bar{d} - d_0}{s_d / \sqrt{n}} \sim t_\nu

Decision Rule

Reject H0H_0 if:

  • Left-tail: t<tν,αt < -t_{\nu, \alpha}
  • Right-tail: t>tν,αt > t_{\nu, \alpha}
  • Two-tail: t>tν,α/2|t| > t_{\nu, \alpha/2}

Examples:

  • Blood pressure measured before and after a drug treatment on the same patients
  • Exam scores for the same students before and after a tutoring program
Was this helpful?