Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A paired t-test is used when two quantitative measurements are linked, such as before-and-after scores from the same students or measurements from matched pairs. This cheat sheet helps students organize the test from raw paired data to a final conclusion. It focuses on creating differences, checking conditions, computing the test statistic, and interpreting the result in context.

The paired t-test is important because it analyzes change within pairs instead of treating the two samples as unrelated.

The key idea is to subtract within each pair and then run a one-sample t-test on the list of differences. The main formulas are the sample mean difference dˉ\bar{d}, the sample standard deviation of differences sds_d, the standard error SE=sdnSE = \frac{s_d}{\sqrt{n}}, and the test statistic t=dˉμd,0sd/nt = \frac{\bar{d} - \mu_{d,0}}{s_d / \sqrt{n}}. The degrees of freedom are df=n1df = n - 1, where nn is the number of pairs.

A confidence interval for the mean difference is dˉ±tsdn\bar{d} \pm t^{*}\frac{s_d}{\sqrt{n}}.

Key Facts

  • A paired t-test uses differences di=xi,2xi,1d_i = x_{i,2} - x_{i,1} from matched measurements or the same subject measured twice.
  • The null hypothesis is usually H0:μd=0H_0: \mu_d = 0, meaning the true mean difference is zero.
  • The alternative hypothesis can be Ha:μd>0H_a: \mu_d > 0, Ha:μd<0H_a: \mu_d < 0, or Ha:μd0H_a: \mu_d \ne 0 depending on the question.
  • The sample mean difference is dˉ=din\bar{d} = \frac{\sum d_i}{n}, where nn is the number of paired differences.
  • The standard error of the mean difference is SE=sdnSE = \frac{s_d}{\sqrt{n}}, where sds_d is the sample standard deviation of the differences.
  • The paired t-test statistic is t=dˉμd,0sd/nt = \frac{\bar{d} - \mu_{d,0}}{s_d / \sqrt{n}}, where μd,0\mu_{d,0} is the hypothesized mean difference.
  • The degrees of freedom for a paired t-test are df=n1df = n - 1.
  • A confidence interval for the true mean difference is dˉ±tsdn\bar{d} \pm t^{*}\frac{s_d}{\sqrt{n}}.

Vocabulary

Paired data
Paired data are two related measurements that belong together, such as pretest and posttest scores for the same person.
Difference
A difference is the value found by subtracting one measurement in a pair from the other, written as di=xi,2xi,1d_i = x_{i,2} - x_{i,1}.
Mean difference
The mean difference dˉ\bar{d} is the average of all paired differences in the sample.
Standard error
The standard error SE=sdnSE = \frac{s_d}{\sqrt{n}} estimates how much the sample mean difference varies from sample to sample.
Degrees of freedom
Degrees of freedom for a paired t-test are df=n1df = n - 1, based on the number of paired differences.
P-value
A p-value is the probability of getting a test statistic as extreme as the observed one if the null hypothesis is true.

Common Mistakes to Avoid

  • Treating paired data as independent samples is wrong because the two measurements in each pair are related. Use the differences did_i and perform a one-sample t-test on those differences.
  • Subtracting in an inconsistent order is wrong because it can reverse the sign of dˉ\bar{d} and change the interpretation. Choose one order, such as di=afterbefored_i = \text{after} - \text{before}, and use it throughout.
  • Using nn as the number of individual measurements is wrong because nn is the number of pairs. If there are 1212 people measured twice, then n=12n = 12, not n=24n = 24.
  • Using df=ndf = n is wrong because one degree of freedom is lost when estimating dˉ\bar{d}. For a paired t-test, always use df=n1df = n - 1.
  • Interpreting the result without context is incomplete because the test is about the mean difference, not just a generic mean. State the conclusion using the variable, direction of subtraction, and population.

Practice Questions

  1. 1 A teacher records quiz scores before and after a study strategy for 1010 students. The differences are defined as di=afterbefored_i = \text{after} - \text{before}, with dˉ=4.2\bar{d} = 4.2 and sd=3.0s_d = 3.0. Test H0:μd=0H_0: \mu_d = 0 using the test statistic formula and find tt.
  2. 2 For a paired t-test with n=16n = 16 pairs, dˉ=2.5\bar{d} = -2.5, sd=5.0s_d = 5.0, and μd,0=0\mu_{d,0} = 0, compute SE=sdnSE = \frac{s_d}{\sqrt{n}} and t=dˉμd,0SEt = \frac{\bar{d} - \mu_{d,0}}{SE}.
  3. 3 A sample of 2525 matched pairs has dˉ=1.8\bar{d} = 1.8 and sd=4.5s_d = 4.5. Find the degrees of freedom and write the form of a 95%95\% confidence interval as dˉ±tsdn\bar{d} \pm t^{*}\frac{s_d}{\sqrt{n}}.
  4. 4 A researcher measures blood pressure before and after a new exercise program for the same people. Explain why a paired t-test is more appropriate than a two-sample t-test.

Understanding Paired t-Test Walkthrough

A pairing is useful only when there is a real connection between the two values in each row. The connection may come from the same person, the same machine, the same location, or two people deliberately matched on important traits. Good matching removes some background variation.

For example, students can differ greatly in their usual test performance. Comparing each student with their own earlier score avoids treating those natural differences as evidence of a teaching effect. The order used for subtraction must be chosen before examining the results.

If later score minus earlier score defines improvement, a positive average means scores tended to rise. Reversing that order reverses every sign and changes the wording of the conclusion.

The important independence condition applies to pairs, not to the two measurements inside one pair. A class of students sampled from one school may not represent all students, especially if the class was chosen for convenience. Repeated pairs from the same person can create another problem.

For instance, daily measurements from one athlete are related across days, so they cannot automatically be treated as separate independent pairs. The distribution to examine is the distribution of differences. Make a dotplot or histogram of those differences.

Look for strong skew, separate clusters, or unusual values. With a small number of pairs, one extreme difference can heavily affect the average and the test result. Check whether it came from a recording mistake, but do not remove it merely because it is inconvenient.

The t statistic measures the observed average change in units of its estimated random variation. A large positive value means the average difference is well above the value predicted by the null model relative to the scatter in differences. A large negative value points in the opposite direction.

More pairs usually reduce uncertainty, but only when the new pairs provide genuinely new information. The degrees of freedom reflect that the variability estimate comes from the differences in the sample. A confidence interval gives a useful range of plausible long-run average changes.

If an interval for a two-sided test does not include zero, the matching result agrees with rejecting a zero average change at the related significance level. A p value does not give the probability that the null hypothesis is true. It describes how unusual results at least this extreme would be if the null model were true.

Statistical evidence is not the same as practical importance. A very small average improvement can be statistically convincing in a large study yet matter little in daily life. Report the average difference with units, such as points, seconds, or millimeters of mercury, along with an interval that shows its uncertainty.

The study design controls what conclusion is justified. Random assignment to two treatments can support a causal claim when the pairing and measurement process are sound. An observational comparison can show an association, but other differences between conditions may explain the result.

Common errors include pairing rows incorrectly, mixing up the subtraction direction, analyzing the two columns as independent samples, and choosing a one-sided alternative only after seeing the signs. Careful labels and a quick check of every pair prevent many of these mistakes.