Biostatistics Study NotesFrom concepts and derivations to interpretation

CHAPTER 04 · TOPIC 04

Paired t Test

Convert paired observations into within-pair differences and test the population mean of those differences.

On this page
  1. What Are Paired Samples?
  2. Calculate the difference between each pair first
  3. Hypotheses
  4. Testing Procedure
  5. Relationship to Repeated-Measures ANOVA

A paired t-test examines the mean difference between quantitative variables in two related samples. We match each observation one-to-one, create the difference between each pair, and test whether the population mean is 0.

What Are Paired Samples?#

RelationshipExample
Measure the same object twiceEvaluation of two conditions before and after training
Natural pairsIdentical twins or matched partners
Matched designMatch similar participants and assign them to different treatments

Each Xᵢ must have a clear Yᵢ and must not be rearranged arbitrarily.

Calculate the difference between each pair first#

difference of i-th pairdi=XiYid_i=X_i-Y_i
mean differencedˉ=1ni=1ndi\bar d=\frac{1}{n}\sum_{i=1}^{n}d_i
standard deviation of differencesd=i=1n(didˉ)2n1s_d=\sqrt{\frac{\sum_{i=1}^{n}(d_i-\bar d)^2}{n-1}}
Paired t-statistict=dˉμd,0sd/n,ν=n1t=\frac{\bar d-\mu_{d,0}}{s_d/\sqrt n},\qquad \nu=n-1

Hypotheses#

two-sidedH0:μd=0,H1:μd0H_0:\mu_d=0,\qquad H_1:\mu_d\ne0
right-tailedH0:μd0,H1:μd>0H_0:\mu_d\leq0,\qquad H_1:\mu_d>0
left-tailedH0:μd0,H1:μd<0H_0:\mu_d\geq0,\qquad H_1:\mu_d<0

The sign of the difference is determined by the order X−Y. Reversing the order reverses the sign of t, but the two-sided p-value remains the same.

Testing Procedure#

  1. Confirm that you can respond correctly one-on-one
  2. Calculate dᵢ by fixing the direction of the difference
  3. Calculate d̄, s_d, t, df=n−1
  4. Determine by finding the p value from the t distribution

Relationship to Repeated-Measures ANOVA#

If there are only two corresponding conditions, one-way repeated-measures ANOVA can be used, and the same significance conclusion will be reached for the same hypothesis.

F=t2F=t^2