Calculator
Enter the parameters of the differences to get the t statistic, p-value and test decision.
Explanation
The paired means hypothesis test applies when observations are matched: each individual contributes two measurements (for example, before and after a treatment) or when subjects have been intentionally matched on confounding variables. Instead of comparing two independent groups, the test works directly with the differences \(d_i = x_{i1} - x_{i2}\) within each pair.
This design strategy removes the variability between individuals, which usually translates into greater statistical power compared to the t-test for independent samples, especially when there is positive correlation between the measurements of each pair.
Hypotheses and test statistic
\(H_0: \mu_d = \mu_{d0}\)
\(H_1: \mu_d \neq \mu_{d0}\), \(\mu_d > \mu_{d0}\) or \(\mu_d < \mu_{d0}\)
\( t = \dfrac{\bar{d} - \mu_{d0}}{s_d / \sqrt{n}}, \quad df = n - 1 \)
- \(\bar{d}\): sample mean of the differences.
- \(\mu_{d0}\): value of the mean difference under \(H_0\) (usually 0).
- \(s_d\): sample standard deviation of the differences.
- \(n\): number of pairs.
- \(df = n-1\): degrees of freedom of Student's t.
Quick decision guide
- If the p-value is less than \(\alpha\), \(H_0\) is rejected: there is evidence that the mean difference is not \(\mu_{d0}\).
- If the p-value is greater than or equal to \(\alpha\), there is not enough evidence to reject \(H_0\).
- A non-significant result does not prove that \(H_0\) is true; it may be due to lack of power.
- Always complement with a confidence interval for \(\mu_d\) and the effect size (Cohen's d).
When to use a paired design?
The paired design is especially advantageous when:
- The same experimental units are measured under two conditions (repeated-measures design).
- Subjects are matched by age, sex or other relevant variables before the study.
- Positive correlation is expected between the two measurements of each pair.
If the differences are not normal and the sample is small, consider the nonparametric alternative: the Wilcoxon signed-rank test for paired data.
Assumptions of the test
- The differences \(d_i\) follow an approximately normal distribution (or \(n\) is sufficiently large).
- The observations are independent across pairs (not within each pair).
- The pairs are representative of the population of interest.
Worked example
Researchers measure systolic blood pressure in 25 patients before and after a treatment. The mean of the differences (before − after) is \(\bar{d} = 2.5\) mmHg with standard deviation \(s_d = 8\) mmHg. They test \(H_0\colon \mu_d = 0\) against \(H_1\colon \mu_d \neq 0\) with \(\alpha = 0.05\).
The t statistic is:
\( t = \dfrac{2.5 - 0}{8 / \sqrt{25}} = \dfrac{2.5}{1.6} = 1.5625 \)
With \(df = 24\) degrees of freedom and a two-tailed test, the p-value is \(p \approx 0.131\). Since \(p = 0.131 > \alpha = 0.05\), \(H_0\) is not rejected.
Conclusion: with these data there is not enough statistical evidence to conclude that the treatment produces a significant reduction in blood pressure at the 5% level. It would be advisable to increase the sample size or review the variability of the differences.
How to interpret the result
Rejecting \(H_0\) (p-value < α) implies that the within-pair mean difference \(\bar{d}\) is statistically incompatible with the hypothesized value \(\mu_{d0}\) (usually 0). In practice this means that the treatment, intervention or condition measured twice produces a systematic change in the subjects. Even so, the magnitude of the change is what determines practical relevance: compute the effect size \(d = \bar{d}/s_d\) and assess whether that difference is clinically or substantively important.
Not rejecting \(H_0\) (p-value ≥ α) only indicates that the data are compatible with a mean difference of \(\mu_{d0}\). It does not prove that the effect is null. The most common error is concluding "the treatment doesn't work" when in reality the sample was too small to detect the real effect. Examine the confidence interval for \(\mu_d\): if its upper (or lower, depending on the alternative) end includes clinically relevant differences, the power is insufficient to rule out those differences.
The paired t statistic is distributed under \(H_0\) as a Student's t with \(n-1\) degrees of freedom. In the chart, the green zone is the non-rejection region, the red zones are the rejection regions and the amber line marks the observed statistic. One advantage of the paired design is that by removing between-subject variability, the standard error is generally smaller than in the independent two-sample test, which increases power when the pairs are positively correlated.
Frequently asked questions
- When is the paired t-test used? When each individual is measured twice or when subjects are matched by some relevant characteristic, so that the differences remove the variability between individuals.
- What assumptions does the paired t-test require? The differences \(d_i\) must follow an approximately normal distribution (or \(n\) must be large). The observations must be independent across pairs.
- How does it differ from the independent two-sample t-test? The paired test works with the differences within each pair, removing the variability between individuals and being more powerful when there is positive correlation between pairs.
- What does μ_d0 mean in the null hypothesis? It is the value of the population mean difference under \(H_0\). It is usually set to 0 to test whether there is an effect.
- How is the p-value calculated in this test? From Student's t distribution with \(n-1\) degrees of freedom, evaluating the probability of obtaining a statistic as extreme as the one observed under \(H_0\).
Reference: Dependent t-test for paired samples — Wikipedia