Paired Samples t-Test
Hypothesis TestingCompares the means of two related measurements taken from the same subjects to determine whether the mean difference is significantly different from zero.
When to Use
Use this test when you have two measurements from the same individuals, such as before and after a treatment, or measurements from matched pairs. For example, comparing patient blood pressure before and after medication, or comparing left-eye and right-eye measurements from the same subjects.
Assumptions
- The differences between paired observations are continuous.
- The differences are approximately normally distributed (or the sample size is large enough for the Central Limit Theorem to apply).
- Observations are paired: each value in one group corresponds to exactly one value in the other group.
- The pairs are independent of each other.
Required Inputs
| Input | Type | Notes |
|---|---|---|
| Before / Group 1 | Numeric | First measurement or pre-treatment values |
| After / Group 2 | Numeric | Second measurement or post-treatment values |
Output Metrics
| Metric | What it means |
|---|---|
| Mean Difference | Average of the pairwise differences (Before - After). |
| Std Dev | Standard deviation of the pairwise differences. |
| Std Error | Standard error of the mean difference. |
| 95% CL Lower | Lower bound of the 95% confidence interval for the mean difference. |
| 95% CL Upper | Upper bound of the 95% confidence interval for the mean difference. |
| t | The t-statistic: mean difference divided by its standard error. |
| DF | Degrees of freedom (N pairs - 1). |
| Pr > |t| | Two-tailed p-value for the null hypothesis that the mean difference is zero. |
Interpretation
- If Pr > |t| is less than your alpha level, the mean difference between conditions is statistically significant.
- A positive mean difference indicates that values in the first condition are, on average, higher than in the second condition (and vice versa).
- The confidence interval for the mean difference shows the range of plausible true differences. If it excludes zero, the result is significant at that confidence level.
- The paired design is more powerful than the independent design because it controls for between-subject variability.
Common Pitfalls
- Treating paired data as independent (using an independent t-test instead) throws away the pairing information and usually reduces statistical power.
- Outliers in the differences can strongly affect the result. Consider the Wilcoxon signed-rank test if differences are non-normal or contain extreme values.
- Carry-over effects in repeated measures designs (e.g., learning or fatigue) can bias the result. Counterbalancing helps address this.
How It Works
- Compute the difference for each pair (d_i = x1_i - x2_i).
- Calculate the mean and standard deviation of these differences.
- Compute the t-statistic as the mean difference divided by the standard error of the differences (SD / sqrt(N)).
- Compare the t-statistic to the t-distribution with N-1 degrees of freedom to obtain the p-value.
Citations
References
- Student (1908). The probable error of a mean. Biometrika, 6(1), 1-25.