Paired t-Test

The paired t-test analyzes paired data by converting each pair into a difference and then performing a one-sample t-test on those differences.

If $d_i = y_{Ai} - y_{Bi}$, the test is based on

$$t = \frac{\bar{d} - d_0}{s_d / \sqrt{n}}.$$

R

t.test(yA, yB, paired = TRUE)

Equivalent one-sample formulation:

d <- yA - yB
t.test(d)