Compare two dependent samples using the paired (dependent) t-test. Compute the t-statistic, p-value, confidence interval, and Cohen's d effect size. Visualize paired differences with a before‑after plot and a difference distribution.
The paired t-test (also known as the dependent t-test, matched-pairs t-test, or repeated-measures t-test) is a statistical procedure used to determine whether the mean difference between two sets of paired observations is significantly different from zero. It is the appropriate test when the data consist of pairs of measurements that are naturally related — for example, measurements taken from the same subject before and after a treatment, or measurements from matched pairs of subjects.
Unlike the independent-samples t-test, the paired t-test accounts for the correlation between the two measurements by analyzing the differences within each pair. This reduces variability and increases statistical power, making it the method of choice for pre-post designs, crossover trials, and matched case-control studies.
For paired observations (xi, yi), define di = xi − yi.
The test statistic is: t = d̄ / (sd / √n)
where d̄ is the mean difference, sd is the standard deviation of the differences, and n is the number of pairs.
For the paired t-test to produce valid results, the following assumptions should be met:
If the normality assumption is severely violated, consider using the Wilcoxon signed-rank test (a non-parametric alternative). Our calculator includes a normality check on the differences via the Shapiro-Wilk test (reported in the results when applicable).
A high school mathematics teacher implements a new interactive teaching method and wants to evaluate its effectiveness. She administers a pre-test and a post-test to 20 students. The pre-test scores (out of 100) and post-test scores are recorded for each student. Using this paired t-test calculator, she enters the 20 pairs of scores and obtains:
Conclusion: The new teaching method is associated with a statistically significant and practically meaningful improvement in test scores. The large effect size (d = 1.17) indicates that the improvement is substantial. The teacher can confidently recommend the new method to her colleagues.
| Feature | Paired t-Test | Independent t-Test |
|---|---|---|
| Data structure | Paired observations (two measurements per subject) | Two independent groups (different subjects) |
| Variance accounted for | Within-subject variability (reduced) | Between-subject variability (larger) |
| Statistical power | Higher (when pairing is effective) | Lower (more noise) |
| Design examples | Pre-post, crossover, matched pairs | Treatment vs. control groups |
| Degrees of freedom | n − 1 | n1 + n2 − 2 |
| Normality assumption | On the differences (di) | On each group separately |
Let (X1, Y1), ..., (Xn, Yn) be n paired observations. Define the differences Di = Xi − Yi. Under the null hypothesis H0: μD = 0, the test statistic:
t = (D̄ − 0) / (sD / √n) ~ t(n−1)
where D̄ = (1/n) Σ Di is the sample mean difference, and sD = √( Σ (Di − D̄)² / (n−1) ) is the sample standard deviation of the differences. Under H0, this statistic follows a t-distribution with n−1 degrees of freedom. The p-value is computed as the probability of observing a t-statistic at least as extreme as the observed value, under the null distribution.
The (1 − α) × 100% confidence interval for the population mean difference μD is:
D̄ ± t(n−1, α/2) × (sD / √n)
where t(n−1, α/2) is the critical value from the t-distribution with n−1 degrees of freedom.