Difficulty: Intermediate | Prerequisites: One-sample t-test, basic hypothesis testing (Chapter 7/8 material).
Matched pairs testing sits at the intersection of one-sample and two-sample inference. When two measurements come from the same subjects (or deliberately paired units), you reduce each pair to a single difference and run what amounts to a one-sample t-test on those differences. This lab uses sleep data from 250 Indiana college students to compare weekday and weekend sleep times, a classic paired design. If you are comfortable with one-sample t-tests, the conceptual leap here is small.
A matched pairs t-test compares two measurements taken on the same subjects (or deliberately paired units) by reducing each pair to a single difference. You then test whether the mean of those differences is zero, using the same mechanics as a one-sample t-test. If the resulting p-value falls below your significance level, you conclude the population means differ.
Matched pairs (paired samples)
A study design where two measurements come from the same unit (e.g. the same person measured on weekdays and weekends) or from units deliberately paired by a shared trait. The key feature: there is a natural, one-to-one link between each observation in group 1 and exactly one observation in group 2.
In simple terms, think of it as "same person, two conditions" or "one pair, one difference."
Paired difference (d)
The result of subtracting one measurement from the other within each pair. For example, d = Sleep_time_weekend - Sleep_time_week for each student. The entire matched pairs procedure operates on these differences rather than on the raw scores.
Mean of differences (d-bar)
The sample average of all the paired differences. This single number is the point estimate you test. In the sleep study, d-bar = 0.9187 hours, meaning students slept roughly 55 minutes more on weekends than on weekdays, on average.
Standard deviation of differences (s_d)
Measures how much the individual paired differences vary around d-bar. A large s_d means the pairs are not all shifting by the same amount. In the lab data, s_d = 0.99250.
Standard error of the mean difference (SE)
Equals s_d divided by the square root of n (the number of pairs). It estimates how much d-bar would fluctuate from sample to sample. Smaller SE means a more precise estimate.
t-statistic (paired)
The test statistic for matched pairs: t = d-bar / SE. It measures how many standard errors the observed mean difference sits from the hypothesised value (usually zero). In the lab, t = 14.635.
Degrees of freedom (df)
For a matched pairs test, df = n - 1, where n is the number of pairs. With 250 students, df = 249.
p-value
The probability of observing a test statistic as extreme as (or more extreme than) the one computed, assuming the null hypothesis is true. A small p-value (below alpha) leads you to reject H0.
One-tailed (one-sided) test
A hypothesis test where the alternative hypothesis specifies a direction (greater than or less than), not just "different from." The sleep lab uses a one-tailed test because the research question asks whether weekend sleep is greater than weekday sleep.
Null hypothesis (H0)
The default claim of no effect or no difference. For matched pairs: the population mean difference equals zero (or some other specified value).
Alternative hypothesis (Ha)
The claim the researcher wants to support. It can be one-sided (mu_d > 0 or mu_d < 0) or two-sided (mu_d is not equal to 0).
You have two measurements on the same unit (before/after, left hand/right hand, weekday/weekend for the same person).
Or you have two sets of units deliberately paired by a shared trait (e.g. siblings, twins, matched controls).
The defining feature: each observation in one group has exactly one natural partner in the other group. If there is no valid reason to pair subjects, use a two-sample test instead.
You work with one mean, the mean of the paired differences, not two separate means.
Ask: "Can I pair each row of data with exactly one row in the other column, based on the same subject or a deliberate match?" If yes, matched pairs. If the two columns come from entirely separate groups of people with no pairing, it is a two-sample problem.
In the lab, Sleep_time_week and Sleep_time_weekend are measured on the same 250 students, so each student provides one pair.
Define the order of subtraction first and state it clearly. In the lab:
d = Sleep_time_weekend - Sleep_time_week
H0: mu_d = 0 (no difference in population mean sleep times)
Ha: mu_d > 0 (population weekend sleep exceeds weekday sleep)
This is a one-tailed (right-tailed) test because the research question specifically asks whether weekend sleep is greater, not merely different.
If you had defined d = Sleep_time_week - Sleep_time_weekend, the alternative would flip to Ha: mu_d < 0. The direction of the subtraction changes the sign of d-bar and the direction of the test, but the conclusion is the same.
In SPSS, use Analyze > Compare Means > Paired-Samples T Test. Move both variables into the Paired Variables box. SPSS computes the paired differences, d-bar, s_d, SE, the t-statistic, df, and p-values (one-sided and two-sided) automatically.
From the lab output (weekend - week order):
d-bar = 0.91868
s_d = 0.99250
SE = 0.06277
t = 14.635
df = 249
One-sided p < 0.001
The 95% confidence interval for the population mean difference was (0.7951, 1.0423). This means we are 95% confident the true average difference (weekend minus weekday sleep) falls between about 0.80 and 1.04 hours.
Because the entire interval is above zero, it supports the conclusion that weekend sleep is higher.
Compare the p-value to alpha (0.05):
p < 0.001, which is less than 0.05.
Reject H0.
Conclusion in context: there is sufficient evidence at the 5% significance level that, in the population, college students sleep more on weekends than on weekdays.
Paired difference for each subject:
d_i = x_1i - x_2i
(Define and state which variable is first.)
Sample mean of differences:
d-bar = (sum of all d_i) / n
Standard error of the mean difference:
SE = s_d / sqrt(n)
where s_d is the sample standard deviation of the d_i values.
t-statistic:
t = (d-bar - mu_0) / SE
where mu_0 is the hypothesised population mean difference (usually 0).
Degrees of freedom: df = n - 1.
95% confidence interval for the population mean difference:
d-bar +/- t*(alpha/2, df) x SE
From the lab: 0.91868 +/- (1.970)(0.06277), giving (0.7951, 1.0423).
Matched pairs designs appear whenever you want to control for individual variability. Clinical trials use before-and-after measurements on the same patients to test drug effects. Manufacturing tests the same machine under two settings. Education researchers compare the same students' scores before and after an intervention. Pairing removes subject-to-subject noise and increases the power of the test.
Students often think that having two columns of data automatically means a two-sample test. It does not. The deciding factor is whether each row in column A has a natural partner in column B (same person, same pair). If it does, use matched pairs.
Students sometimes report two separate means and compare them informally instead of computing the paired differences. The matched pairs test operates on the differences, not on the two raw columns independently.
Reversing the order of subtraction and forgetting to flip the direction of the alternative hypothesis is a common error. If you define d = weekend - week and test Ha: mu_d > 0, switching to d = week - weekend means Ha becomes mu_d < 0.
The confidence interval from SPSS is for the mean difference, not for either individual mean. Students sometimes misread it as a CI for the weekday or weekend mean.
Expect a question that gives you two columns and asks you to decide: matched pairs or independent two-sample? The answer depends on whether the data are naturally paired.
You must state the order of subtraction when writing hypotheses. Marks are lost for ambiguity.
When concluding, always say "population" (not "sample"). Hypothesis tests make inferences about the population.
If the 95% CI for the mean difference does not contain zero, that is consistent with rejecting H0 at alpha = 0.05. Exams often ask you to connect the CI to the test decision.
SPSS reports both one-sided and two-sided p-values. Read the correct one for your alternative hypothesis. For a one-tailed test, use the one-sided p.
True or False: In a matched pairs test, the two samples must be independent of each other. (False. The samples are dependent; that is the whole point of pairing.)
Fill in the blank: The degrees of freedom for a matched pairs t-test with 80 pairs is ____. (79)
True or False: If the 95% confidence interval for the mean difference is (0.3, 1.2), you would reject H0: mu_d = 0 at alpha = 0.05. (True. Zero is not in the interval.)
Fill in the blank: The matched pairs t-statistic is calculated as t = ____ / ____. (d-bar / SE, where SE = s_d / sqrt(n))
True or False: If you reverse the subtraction order from (A - B) to (B - A), the magnitude of the t-statistic changes. (False. Only its sign changes.)
Q: A researcher measures blood pressure before and after a new medication for 60 patients. Is this a matched pairs or two-sample problem? Why?
A: Matched pairs. The same 60 patients are measured twice (before and after), so each patient provides a natural pair.
Q: Using the sleep data, the sample mean difference (weekend - week) is 0.9187 hours and the standard error is 0.06277. Calculate the t-statistic.
A: t = 0.9187 / 0.06277 = 14.635.
Q: The 95% CI for the population mean difference is (0.7951, 1.0423). Does this support the claim that weekend sleep exceeds weekday sleep? Explain.
A: Yes. The entire interval is above zero, which means we are 95% confident the true mean difference is positive, so weekend sleep is greater.
Q: A matched pairs test yields t = 2.10, df = 35, and a two-sided p-value of 0.043. If the alternative hypothesis is one-sided (mu_d > 0), what is the one-sided p-value, and what is your decision at alpha = 0.05?
A: The one-sided p-value is 0.043 / 2 = 0.0215. Since 0.0215 < 0.05, reject H0. There is sufficient evidence that the population mean difference is positive.
Q: A student writes "We reject H0 for the sample." What is wrong with this statement?
A: Hypothesis tests draw conclusions about the population, not the sample. The correct phrasing is: "We reject H0 and conclude, for the population, that the mean difference is not zero (or is positive/negative, depending on Ha)." The sample data are what you observe; the inference targets the population.
Matched pairs is a special case of the one-sample t-test applied to the differences. If you understand one-sample inference (Chapter 7/8), you already know the mechanics; matched pairs simply adds the step of computing d_i first.
This connects to the broader theme of controlling variability in experimental design. Blocking (ANOVA) and repeated measures designs generalise the same idea: by accounting for subject-level variation, you get a more sensitive test.
The two-sample independent t-test (covered in the companion study notes) handles the case where pairing is not possible. Knowing when to use each is a core exam skill.
Matched pairs t-test, paired samples t-test, dependent samples t-test, paired difference, mean of differences, d-bar, standard error of mean difference, one-sample t-test on differences, before and after test, repeated measures, paired comparison, STAT 350 Lab 4, Purdue STAT 350, sleep patterns study, SPSS paired samples, confidence interval for mean difference, one-tailed t-test, two-tailed t-test, hypothesis testing