Why Matched Observations Need a Different Analysis
Suppose a study records a measurement on each participant before and after a program. The two measurements from one participant are related: they share the same person, and that person's characteristics may affect both values. A comparison that keeps each participant's two measurements together can account for that relationship. An analysis that treats all before and after measurements as independent discards it.
The basic paired-sample method is to replace each pair with one within-pair difference. The resulting differences form a single sample. The question is then whether a confidence interval for the mean of that sample is an appropriate way to estimate the population's mean change.
The subtraction order determines the meaning of the estimate. If \(X_i\) is the after measurement and \(Y_i\) is the before measurement, then positive \(D_i\) means an increase. Reversing the order reverses every difference and the signs of the mean and interval endpoints. The uncertainty is unchanged, but the interpretation changes.
When the Mean Difference Is the Right Target
A paired interval is appropriate when the study question concerns the average within-pair change and the observations are genuinely linked. Typical designs include before-and-after measurements on the same subjects, two methods applied to the same items, or treatments compared within matched blocks. Pairing is a feature of the sampling design; merely having two columns of measurements does not make the samples paired.
For inference about \(\mu_D\), the relevant sample is the set of differences. The paired t interval is the one-sample t interval applied to those differences:
Here, \(1-\alpha\) is the confidence level, and \(t_{1-\alpha/2,\,n-1}\) is the Student t critical value with \(n-1\) degrees of freedom. The formula requires independent pairs. For an exact t interval, the differences must come from a normal population; with a sufficiently large sample, the interval may be a useful approximation when the difference distribution is not severely skewed or dominated by outliers. Small samples with strong skewness or influential outliers call for caution. The normality condition concerns the differences, not separate normality of the two measurement columns.
This method estimates a mean. If the question concerns a median change, a proportion of pairs that improved, or a complex pattern of changes, a t interval for \(\mu_D\) may not answer the question. Nor does a paired interval alone establish that a program caused a change: time trends, other interventions, and the study design still matter.
Why Keeping Each Pair Together Matters
Within a pair, the two measurements can be dependent. This is not a violation of the paired method; it is the reason to form differences. The variance identity for a difference makes the role of that dependence explicit:
To justify the identity, expand the variance of a linear combination. For constants \(a\) and \(b\), \(\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)+2ab\operatorname{Cov}(X,Y)\). Taking \(a=1\) and \(b=-1\) gives the displayed result. When measurements within a pair have positive covariance, the variance of their difference can be smaller than the sum of their separate variances. That can make the mean-difference interval more precise than a calculation that ignores the matching. The amount of improvement depends on the data; pairing does not guarantee a narrower interval in every sample.
Pairs should also be independent of other pairs for the ordinary one-sample t interval. Repeated measurements on one person may be dependent within that person, as intended, but the resulting differences from different people should be independent under the sampling model. If participants are clustered or the design otherwise links pairs, the simple interval may not apply.
Constructing and Checking the Difference Sample
A reliable workflow is to confirm the matching, choose a sign convention, calculate one difference for each complete pair, and inspect the differences before making an interval. Keep the paired rows intact while calculating: sorting the two columns separately or matching observations by their row position after one column has been reordered destroys the intended pairs.
Identify what links the two observations in each row. If the units are unrelated and were not matched by design, this is not a paired analysis.
For example, define \(D_i=\text{after}_i-\text{before}_i\). This makes the direction of positive and negative differences unambiguous.
Use the number of complete pairs as \(n\), calculate \(\bar{D}\) and \(s_D\), and assess whether a t interval for the mean difference is justified.
Worked Applications
Worked Example: A Before-and-After Program
In a hypothetical evaluation, five participants have measurements recorded before and after a program. Define \(D_i=\text{after}_i-\text{before}_i\). The before measurements are \(10,12,11,13,14\), and the after measurements, in the same participant order, are \(12,13,14,13,18\). Assume the five pair differences are independent observations from a normal population. Find a 95% t interval for the population mean change.
Method. This is a matched before-and-after design, so form one after-minus-before difference per participant: \(D=(2,1,3,0,4)\). There are \(n=5\) pairs, not 10 independent observations.
Calculate the mean. The sum is \(2+1+3+0+4=10\), so \(\bar{D}=10/5=2\).
Calculate the sample standard deviation. The deviations from 2 are \(0,-1,1,-2,2\). Their squared values sum to \(0+1+1+4+4=10\). Thus \(s_D^2=10/(5-1)=2.5\), and \(s_D=\sqrt{2.5}=1.5811\).
For 95% confidence with \(4\) degrees of freedom, \(t_{0.975,4}=2.776\). The standard error is \(1.5811/\sqrt{5}=0.7071\), and the margin is \(2.776(0.7071)=1.963\). The interval is \(2\pm1.963=(0.037,3.963)\), rounded to three decimals. Under the stated model, the interval estimates the mean after-minus-before change.
Check and common mistake. The five differences average to 2, which is also the after mean \(14\) minus the before mean \(12\). But the independent-samples standard error would be wrong here. The before sample variance is \(10/4=2.5\); the after sample variance is \(22/4=5.5\). Treating the columns as independent gives \(\sqrt{(2.5+5.5)/5}=1.265\), instead of the paired standard error \(0.7071\). It ignores the matching and does not estimate uncertainty using the observed within-person changes.
Worked Example: Comparing Two Measurement Methods
A hypothetical quality study applies a reference method and a new device to each of six specimens. Let \(D_i=\text{reference}_i-\text{device}_i\). The six differences, in measurement units, are \(1,2,2,3,4,0\). Assume independent pairs and normally distributed differences. Find a 95% t interval for the mean reference-minus-device difference.
Method and direction. Each specimen receives both measurements, so the observations are paired. A positive difference means the reference reading is higher. There are six differences, so \(n=6\).
Mean and spread. Their sum is \(1+2+2+3+4+0=12\), giving \(\bar{D}=12/6=2\). The deviations from 2 are \(-1,0,0,1,2,-2\), whose squares sum to \(1+0+0+1+4+4=10\). Therefore \(s_D^2=10/5=2\), \(s_D=\sqrt{2}=1.4142\), and the standard error is \(\sqrt{2}/\sqrt{6}=\sqrt{1/3}=0.5774\).
For 95% confidence with \(5\) degrees of freedom, \(t_{0.975,5}=2.571\). The margin is \(2.571(0.5774)=1.484\). The interval is \(2\pm1.484=(0.516,3.484)\), rounded to three decimals. Its positive endpoints indicate that the estimated mean difference is above zero, subject to the model assumptions.
Check and common mistake. The mean is based on six specimen-level differences, not on twelve unrelated readings. Calculating the two column means and subtracting them gives the same point estimate, but using an independent-samples standard error would discard the within-specimen pairing.
Worked Example: Matching Measurements on the Same Workers
In a hypothetical study, eight workers each complete a task using an old procedure and a revised procedure. Let \(D_i=\text{old time}_i-\text{revised time}_i\), so a positive difference means a time reduction. The eight differences are \(3,2,4,1,3,2,5,4\) minutes. Assume the pairs are independent and that the difference distribution is normal. Find a 95% t interval for the mean reduction.
Method. Each worker is their own match, so analyze the eight differences as one sample. Their sum is \(3+2+4+1+3+2+5+4=24\), giving \(\bar{D}=24/8=3\) minutes.
The deviations from 3 are \(0,-1,1,-2,0,-1,2,1\). Their squared values sum to \(0+1+1+4+0+1+4+1=12\). Hence \(s_D^2=12/(8-1)=12/7=1.7143\), \(s_D=\sqrt{12/7}=1.3093\), and the standard error is \(1.3093/\sqrt{8}=0.4629\).
With \(7\) degrees of freedom, \(t_{0.975,7}=2.365\). The margin is \(2.365(0.4629)=1.095\). Therefore, the 95% interval is \(3\pm1.095=(1.905,4.095)\) minutes, rounded to three decimals. The interval is for the population mean old-minus-revised time difference, not for the mean time under either procedure separately.
Check and common mistake. Positive values consistently represent time reductions because the order was stated as old minus revised. Subtracting revised minus old instead would give an interval with endpoints \(-4.095\) and \(-1.905\), expressing the same result with the opposite sign convention.
When This Analysis Is Not Appropriate
Do not use a paired interval simply because two samples have the same size. If two unrelated groups are sampled independently, there is no meaningful within-pair difference; use an independent-samples method instead. Conversely, when observations are matched, do not discard the matching and proceed as if the two columns were independent. Confirm the design before selecting a standard error.
Also check whether each pair has both measurements. A pair missing one value cannot supply a difference without additional modeling or assumptions. The complete pairs determine the simple analysis's sample size. If missingness changes which units are represented, that may also limit what population the interval can describe.
Check Your Understanding
For each question, decide what the paired differences represent and which sample size or interval method is appropriate.
- A technician measures the same seven valves before and after a hypothetical adjustment. Define \(D_i=\text{after}_i-\text{before}_i\). If the differences are \(1,0,2,3,1,2,5\), how many observations enter the one-sample analysis, and what is \(\bar{D}\)? (Answer: \(n=7\) differences; \(\bar{D}=2\).)
- A study measures two unrelated groups of 18 customers each, one using each of two hypothetical service designs. Is a paired interval for within-customer differences appropriate? (Answer: No; the customers are not matched, so there are no within-pair differences.)
- Six samples each receive two laboratory methods. The method A minus method B differences are \(2,1,0,3,2,4\). Find \(\bar{D}\) and \(s_D\). (Answer: \(\bar{D}=2\), \(s_D=\sqrt{2}=1.4142\).)
- For the six differences in Question 3, assume independent pairs and normal differences. Using \(t_{0.975,5}=2.571\), find the 95% t interval for the mean difference. (Answer: \((0.516,3.484)\), to three decimals.)
- A matched study records both measurements for 12 units, but one unit is missing its second measurement. For the ordinary complete-pair difference analysis, what is the sample size? (Answer: \(n=11\) complete pairs.)