FS2 7.2 - The paired t-test

FS2 7.2 - The paired t-test

When observations belong together, analyse their differences together. You will recognise paired data, test a population mean difference and construct an interval for it, using the number of pairs and the spread of the differences.

The pair is the unit of comparison

If the mean of the differences equals the difference of the means, why bother keeping the pairs?

Because pairing changes the relevant spread. Six people complete a task before and after training:

PersonABCDEF
Before, seconds202025253030353540404545
After, seconds191923232929323238384242

Every person improves by between 11 and 33 seconds, despite the large differences between people's original completion times. Comparing each person with themselves retains that information.

You already know

For independent observations from one normal population with unknown variance, standardise their sample mean using their unbiased sample standard deviation and use tn−1t_{n-1}. A confidence interval estimates a fixed population mean through a repeated-sampling rule.

The observations for one person are linked, so the two rows are not independent samples. Different people, or separately selected matched pairs, must provide independent differences.

Paired t-test

A paired t-test is a one-sample t-test on the differences within matched pairs. Define the difference direction consistently, for example D=before−afterD=\text{before}-\text{after}, and test its population mean μD\mu_D.

For the exact procedure, assume the differences between paired observations come from a normal population, with independent differences across pairs.

The normality assumption concerns differences. Separate assertions that both measurement rows look normal do not state the required condition. Equal variances in the two rows are not required, and independence within a pair is not required.

Before-and-after measurements on the same people are paired. Measurements on unrelated people randomly assigned to two separate groups are not automatically paired just because the group sizes match.

[DIAGRAM: asset_name: Wide individual times but small paired improvements; asset_slug: 9fm0-fs2-134-paired-changes; caption: Subtract within each person before estimating the spread of improvement; description: Six separate horizontal rows labelled A to F show grey segments joining each person's after and before completion times on a common seconds axis. After markers are pale blue and before markers pale clay, identified by a key. Each row has its positive before-minus-after difference, one,two,one,three,two,three, printed in a separate right column. A note gives six pairs and five degrees of freedom. The large variation in original times and small within-person changes are visible]
Subtract within each person before estimating the spread of improvement

Here the correct difference variance is 0.8 s20.8\,\mathrm{s^2}. If you wrongly reverse the after row before pairing it with the before row, the difference mean remains 2 s2\,\mathrm{s}, but the difference variance becomes 326.8 s2326.8\,\mathrm{s^2}. The two marginal lists cannot recover the pairing information once it has been discarded.

Key idea

A paired analysis uses one sample of differences. Its sample size is the number of pairs, and its uncertainty comes from the differences' variation.

Choose the assumption that belongs to that one sample.

Test a claim about the mean difference

With D=before−afterD=\text{before}-\text{after}, a positive value means a reduction in completion time. Write hypotheses in μD\mu_D; their direction follows this definition.

Paired t statistic

For n≥2n\ge2 independent differences from N(μD,σD2)\mathrm N(\mu_D,\sigma_D^2), with unknown σD2>0\sigma_D^2>0, test H0:μD=δ0H_0:\mu_D=\delta_0 using

dˉ=∑din,sD2=∑di2−(∑di)2/nn−1,t=dˉ−δ0sD/n\bar d=\frac{\sum d_i}{n},\qquad s_D^2=\frac{\sum d_i^2-(\sum d_i)^2/n}{n-1}, \qquad t=\frac{\bar d-\delta_0}{s_D/\sqrt n}

Under H0H_0, the statistic has n−1n-1 degrees of freedom. These are the supplied one-sample variance and t formulas applied to matched-pair differences; the booklet explicitly includes matched pairs. In the formula booklet.

Calculate a signed difference for each matched pair before using a calculator's one-variable statistics. Subtracting the rows' sample standard deviations is not a method for finding sDs_D.

Worked example 1: evidence of an improvement

Question. Use the six-person table to test at 5%5\% whether training is associated with a reduction in population mean completion time. Assume independent, normally distributed before-minus-after differences.

Plan. Form the differences, estimate their spread and use a positive one-tailed t5t_5 test.

d=(1,2,1,3,2,3)before minus after∑d=12,∑d2=28dˉ=12/6=2,sD2=28−122/65=45H0:μD=0,H1:μD>0t=2(4/5)/6=30=5.47722…5.47722…>2.015t5, upper 5%\begin{aligned} d&=(1,2,1,3,2,3) &&\text{before minus after}\\ \sum d&=12,\qquad \sum d^2=28\\ \bar d&=12/6=2,\qquad s_D^2=\frac{28-12^2/6}{5}=\frac45\\ H_0&:\mu_D=0,\qquad H_1:\mu_D>0\\ t&=\frac2{\sqrt{(4/5)/6}}=\sqrt{30}=5.47722\ldots\\ 5.47722\ldots&>2.015 &&t_5,\text{ upper }5\% \end{aligned}

Why this step? Positive before-minus-after differences mean improvement, so the claim belongs to the positive tail.

Answer. Reject H0H_0. There is sufficient evidence at 5%5\% of a positive population mean reduction in completion time.

Check. There are six independent differences and therefore five degrees of freedom. The large statistic reflects consistent positive changes, rather than similarity in the original times.

Worked example 2 changes only the claimed threshold: the mean reduction must exceed 1.5 s1.5\,\mathrm{s}, rather than 00.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account