# Paired t-Test for Dependent Samples

Often we want to make comparisons not between different subjects but between different measurements in the same subjects, perhaps at different times or before vs after an intervention.

The variable result from the second sample will be dependent on what it was from the first, because it is a change in that variable we are measuring. We cannot use any of the tests previously described! However, before we feel that this seems a complication too far, it is actually a simpler situation and makes for studies of great statistical power. If we are designing a study, we might always look first to see if we can use dependent samples, also called repeated measures or paired samples (because one subject has a pair of values, one belonging to each sample e.g. before vs after).

The reason why a paired test is powerful is because we have eliminated much of the variation – in fact all of the inter-subject variation. That remaining is only random intra-subject variation, e.g. varying over time and variation from measuring inaccuracy. Little variation makes for narrow SE plots so that small mean changes before vs after may be highly significant.

The way we handle this is simply to subtract the paired before vs after values for each subject. Now we have not two samples, but a single sample of differences. If our null hypothesis is no change following an intervention, we simply set the null hypothesis mean difference as zero, and see how the observed mean difference (might be a little positive, might be a little negative) varies from this using the single sample equations!

The one sample form of the t-score formula is again the same as the z-score for one sample:

t = (μ-μ0)√n/SD

One point of difference, though, lies in the degrees of freedom. Normally the single sample t-test above would have degrees of freedom n – 1, if n is the number of measurements. But because we have used pairs the degrees of freedom is only n/2 – 1, or the number of pairs – 1. For a repeated measures test, this is of course the number of subjects -1 as opposed to the number of measurements -1.

The paired t-test can also be used for actual pairs of subjects rather than the same subject twice. One can design a study with matched controls; subjects are matched up so that for each pair all the variables, such as age, sex, background diseases, are as similar as possible, all apart from the test variable in question. Then measurements are taken, but treated not in terms of overall lumped means between test and control samples, but of the difference in values between each paired test and control subject.

For example, a study is designed to determine if diabetes is associated with hypertension. The test variable is whether or not the subject has diabetes and the measured variable is blood pressure. One could compare mean blood pressures in random independent samples of diabetics and non-diabetics, but there are so many other factors that influence blood pressure that the “noise” variability might mask the “signal” variability of diabetes. The paired test instead matches pairs of patients on all parameters apart from diabetes, and looks at the difference in blood pressure between each pair.