From Paired Observations to a Test Statistic
A paired t test is calculated by turning each matched set of observations into one difference. The test then asks whether the population mean of those differences is consistent with a specified null value. The arithmetic resembles a one-sample t test, but the data being analyzed are the differences, not the two original columns separately.
The direction chosen for the subtraction matters. If the difference is defined as “after minus before,” a positive value means an increase. Reversing the order reverses every sign, the test statistic, and the direction of the alternative hypothesis. The two-sided p-value remains the same, but the scientific interpretation changes direction.
The standard error in the denominator, \(s_d/\sqrt{n}\), estimates the standard deviation of the sample mean difference across repeated samples. The degrees of freedom are based on the number of complete pairs: each pair contributes one difference, so \(n\) pairs provide \(n\) values of \(d_i\). They do not provide \(2n\) independent values for this test.
Model, Conditions, and the p-Value
The paired t procedure is the one-sample t procedure applied to the differences. Its key model assumption is that the differences are an independent sample from a population with mean \(\mu_d\) and a finite standard deviation. For small samples, the population distribution of differences should be approximately normal, with no severe skewness or extreme outliers. With larger samples, the t procedure is generally more robust to moderate departures from normality, although extreme outliers can still distort the mean and standard deviation.
Independence concerns different pairs, not the two measurements within a pair. The measurements within a pair are expected to be related; that is why they are paired. The pairs should come from an appropriate random sample or randomized design, and one pair should not determine another pair’s difference. When the sample is drawn without replacement from a finite population, the sample should also be a small fraction of that population unless an appropriate design justifies otherwise.
After calculating \(t\), use a \(t\) distribution with \(n-1\) degrees of freedom. The p-value is the probability, assuming \(H_0\) is true, of obtaining a test statistic at least as far in the direction specified by \(H_a\) as the observed statistic. For a two-sided alternative, “as far” means at least as large in absolute value.
Worked Calculation for an Upper-Tail Test
Worked Example: Testing for a Positive Mean Difference
In a hypothetical study, five randomly selected matched pairs each complete two versions of a task. Define each difference as the score on version A minus the score on version B. The differences are \(1, 2, 2, 3,\) and \(4\) points. Assume pairs are independent, and that examining the differences gives no indication of a severe outlier or strong skewness. With only five pairs, normality cannot be established from the data alone, so the paired t model’s approximate-normality assumption must be plausible for the setting. Test \(H_0:\mu_d=0\) against \(H_a:\mu_d>0\).
First calculate the mean difference:
The deviations from the mean are \(-1.4,-0.4,-0.4,0.6,\) and \(1.6\) points. Their squared sum is \(1.96+0.16+0.16+0.36+2.56=5.20\) points squared. Thus:
The standard error is \(s_d/\sqrt{n}\), and the null mean difference is zero:
Because the alternative is upper-tailed, the p-value is \(P(T_4\ge 4.707)\), not a two-sided probability. From a t distribution calculator, it is approximately \(0.004631\). If the significance level were \(0.05\), this p-value would be smaller than \(\alpha\), so the null hypothesis would be rejected. The data provide evidence that the population mean score difference, defined as version A minus version B, is positive. They do not establish that version A caused higher scores in a broader setting.
Worked Calculation for a Two-Sided Test
Worked Example: Testing for Any Mean Difference
In another hypothetical setting, four independent matched pairs are assigned to compare two measurement methods. Define each difference as method 1 minus method 2. The recorded differences are \(1,2,3,\) and \(4\) millimeters. Suppose the pairs were selected or assigned appropriately and the differences have no extreme outlier; with just four pairs, using the t procedure also requires the population differences to be approximately normal. Test \(H_0:\mu_d=0\) against \(H_a:\mu_d\ne0\).
The mean difference is:
The deviations from \(2.50\) are \(-1.50,-0.50,0.50,\) and \(1.50\), whose squared values sum to \(5.00\). Therefore:
The test statistic and degrees of freedom are:
For the two-sided alternative, the p-value is \(P(|T_3|\ge3.873)\). A t distribution calculator gives approximately \(0.0305\). This is the probability, if the population mean difference were zero, of observing a statistic at least this far from zero in either direction. At \(\alpha=0.05\), the result is statistically significant evidence of a nonzero mean difference. The estimated direction is positive: method 1 readings averaged \(2.50\) mm higher than method 2 in these pairs.
Worked Calculation for a Lower-Tail Test
Worked Example: Using a t Table to Bound a P-Value
A hypothetical evaluation records five paired differences in a quantity measured in seconds, defined as treatment minus comparison. The differences are \(-3,-2,-1,0,\) and \(1\) seconds. Assume the pairs are independent and sampled or assigned appropriately; the small sample also requires an approximately normal population distribution of differences without severe outliers. Test \(H_0:\mu_d=0\) against \(H_a:\mu_d<0\).
The mean is \((-3-2-1+0+1)/5=-1.00\) second. Deviations from the mean are \(-2,-1,0,1,\) and \(2\); their squares sum to \(10\). Hence:
The statistic is:
This is a lower-tail test, so the p-value is \(P(T_4\le-1.414)\). A t table gives a bound rather than an exact probability: for \(df=4\), a statistic with absolute value \(1.414\) falls between the one-tail critical values for probabilities \(0.15\) and \(0.10\). Thus \(0.10<p<0.15\). The table alone does not justify reporting a more precise p-value. At \(\alpha=0.05\), this result is not statistically significant; it does not provide strong enough evidence for a negative population mean difference.
Why the Paired Calculation Works
The reduction to differences explains why the calculation uses the standard deviation of the differences rather than the standard deviations of the two original measurements. Write the paired measurements in pair \(i\) as \(X_i\) and \(Y_i\). Once the direction is fixed, \(d_i=X_i-Y_i\) is the observation analyzed. The quantity of interest is the average of these \(n\) differences, not the difference between two unrelated sample means.
If the differences are independent and normally distributed with mean \(\mu_d\) and standard deviation \(\sigma_d\), then their sample mean has mean \(\mu_d\) and standard deviation \(\sigma_d/\sqrt{n}\). Replacing the unknown \(\sigma_d\) with \(s_d\) produces the t statistic. The standard one-sample t result then gives a t distribution with \(n-1\) degrees of freedom when the null hypothesis is true.
The second statement relies on the normal-differences model. It is the reason the null value is subtracted from \(\bar{d}\), why the estimated standard error is based on \(s_d\), and why the reference distribution depends on \(n-1\).
Common Mistakes and a Reliable Workflow
A frequent mistake is to calculate a correct statistic and then use the wrong tail. For example, a positive statistic does not automatically call for a two-sided p-value: the alternative hypothesis determines the tail. Another mistake is to calculate a separate standard deviation for each measurement condition and use those values in the paired formula. The paired test requires the standard deviation of the within-pair differences.
Use this sequence to keep the calculation and interpretation aligned:
State exactly which measurement is subtracted from which, and identify the population mean difference \(\mu_d\).
Assess whether pairs are independent and appropriately sampled or assigned. For a small sample, consider the distribution of the differences for approximate normality and severe outliers.
Calculate \(\bar{d}\), \(s_d\), and \(SE=s_d/\sqrt{n}\) from the \(n\) paired differences.
Find \(t=(\bar{d}-\mu_{d,0})/SE\), use \(df=n-1\), and obtain the p-value from the tail specified by \(H_a\). State the conclusion in the original units and context.
A p-value is not the probability that the null hypothesis is true, nor is it the probability that chance alone produced the data. It is calculated under the assumption that the null model is true. A small p-value indicates that the observed result would be relatively unusual under that model; the scientific strength of the conclusion still depends on the study design, the conditions, and the size and practical importance of the estimated difference.
Check Your Understanding
Try these questions without looking back at the worked calculations.
- For six pairs, measurements are recorded as “after minus before.” What does a negative difference mean, and how many degrees of freedom does the paired t test use?
- A study reports \(\bar{d}=3.0\), \(s_d=4.0\), and \(n=16\), with null mean difference zero. Calculate the standard error and test statistic.
- Why is the standard deviation of the paired differences used instead of the separate standard deviations of the two measurements?
- For \(H_a:\mu_d<0\), which tail of the t distribution determines the p-value if the observed statistic is negative?
- What does a two-sided p-value describe when testing \(H_0:\mu_d=0\) against \(H_a:\mu_d\ne0\)?