A paired t-test analyzes the differences di=x1i−x2i from matched pairs (like the same subject measured twice) as a single sample, testing whether the mean difference is zero.
t=sd/ndˉ−μd0
Quick Answer
A paired t-test analyzes the differences di=x1i−x2i from matched pairs (like the same subject measured twice) as a single sample, testing whether the mean difference is zero. Use it when the two sets of numbers come in linked pairs: the same student before and after tutoring, the left and right hand of each person, twins split between two treatments. You subtract within each pair, then run a one-sample t-test on those differences with df=n−1, where n counts pairs, not individual measurements.
Why This Matters
People differ from each other far more than they change from one week to the next. Pairing removes those person-to-person differences, so a small but steady change becomes visible: in the find-the-mistake example below, the same 3.75-point gain gives t≈0.42 when treated as two independent groups and t≈7.83 when paired. Without the paired test, well-designed before-and-after studies would look like failures.
Intuitive Explanation
Suppose four runners each time a 400 m lap, then time it again after a month of training. The slowest takes 90 s and the fastest 60 s, so the runners differ by half a minute. But each runner improves by only 2 to 4 seconds. Compare the 'before' column with the 'after' column as two piles of numbers and the 30-second gaps between runners drown out the small improvement.
The paired t-test subtracts within each runner first. The column of differences, say −3,−2,−4,−3, holds only the change; how fast each runner was to begin with has cancelled out. The question becomes: is the average of these differences far from 0, compared with how much the differences themselves vary? That is a one-sample t-test, t=sd/ndˉ−0, with n the number of pairs.
Two columns of equal length do not make data paired. Ten boys' heights and ten girls' heights can be written side by side, but row 3 of one column has nothing to do with row 3 of the other: shuffle either column and nothing is lost. Paired data break when you shuffle, because each row is one person, one twin pair or one matched couple. If shuffling would change the story, subtract within rows; if not, use a two-sample test.
Think of it like this.A paired t-test is like weighing yourself on the same bathroom scale before and after a holiday. Even if that scale reads 2 kg heavy, the error cancels when you subtract, so the change is trustworthy. Comparing your weight with a friend's on a different scale would mix the change up with two different errors.
Core idea.The paired t-test reduces matched before/after pairs to a single column of differences and tests whether their mean is zero.
When to Use
Use it when every value has a partner: before and after on the same subjects, two measurements on the same object (left eye and right eye), or matched pairs such as twins. The question asks about the mean difference. If the groups are different, unlinked people, use a two-sample t-test instead; if the data are yes/no answers rather than measurements, use a test for proportions.
Tip.Ask: Is every value in one group paired with exactly one specific value in the other (so I can form a difference per pair)?
How to Recognize It
Before choosing a paired test, check how the two columns of numbers were collected, whether they are measurements, and what the differences look like.
1.
Were the same people or objects measured twice, such as before and after a training program?
If yes, subtract within each subject and test the mean difference with df=n−1, where n is the number of subjects. If two separate groups of different people were each measured once, use a two-sample t-test.
2.
Do the two columns have the same length, with a clear reason why each row belongs together?
Pairing needs equal-length columns and a real link for each match, such as twins, a person's left and right hands, or two shoe brands worn one on each foot. Unequal group sizes, such as 18 and 25, rule pairing out at once.
3.
Are the measurements numbers, like times or scores, rather than yes-or-no results?
If yes, a paired t-test fits. If each person gives a yes or no before and after, such as passing a driving test, the differences are not measurements, and a different test built for proportions is needed.
4.
Do the differences look roughly symmetric with no extreme outliers, or are there at least about 30 pairs?
If yes, the t procedure is safe. One huge difference can dominate a small sample. Check a dot plot of the differences themselves, not of the two original columns, because the test is about the differences.
Paired t-Test compared with Two-sample t-test, One-sample t-test, and Two-proportion z-test
All four rows compare sets of results, so the choice can look arbitrary. Ask how the data are linked and what they measure: matched numeric pairs (paired t), two unlinked groups (two-sample t), one column against a target (one-sample t), or yes-or-no outcomes (two-proportion z).
Paired t-Test compared with Two-sample t-test, One-sample t-test, and Two-proportion z-test
Type
Meaning
Key test
Formula
Example
Paired t-Test
Use this when each observation in one group is naturally matched to one in the other (same subject twice, or matched pairs).
Is every value in one group paired with exactly one specific value in the other (so I can form a difference per pair)?
t=sd/ndˉ−μd0
Six students score before and after tutoring; the differences (after − before) are 4,2,5,1,3,3 with dˉ=3, sd=1.41. Test H0:μd=0 at α=0.05.
Two-sample t-test
Compares means of two INDEPENDENT groups with no row-by-row link.
Use when the two groups are different, unrelated subjects.
t=s12/n1+s22/n2xˉ1−xˉ2
Comparing two different classes' scores
One-sample t-test
Tests one sample's mean against a fixed value; the paired test IS a one-sample test on the differences.
Use when testing a single column against a target, not pairs.
t=s/nxˉ−μ0
Is mean height equal to 170?
Two-proportion z-test
Compares two proportions, not means of paired measurements.
Use for yes/no outcomes in two groups.
z=SEp^1−p^2
Comparing pass rates of two groups
Paired t-Test
Meaning
Use this when each observation in one group is naturally matched to one in the other (same subject twice, or matched pairs).
Key test
Is every value in one group paired with exactly one specific value in the other (so I can form a difference per pair)?
Formula
t=sd/ndˉ−μd0
Example
Six students score before and after tutoring; the differences (after − before) are 4,2,5,1,3,3 with dˉ=3, sd=1.41. Test H0:μd=0 at α=0.05.
Two-sample t-test
Meaning
Compares means of two INDEPENDENT groups with no row-by-row link.
Key test
Use when the two groups are different, unrelated subjects.
Formula
t=s12/n1+s22/n2xˉ1−xˉ2
Example
Comparing two different classes' scores
One-sample t-test
Meaning
Tests one sample's mean against a fixed value; the paired test IS a one-sample test on the differences.
Key test
Use when testing a single column against a target, not pairs.
Formula
t=s/nxˉ−μ0
Example
Is mean height equal to 170?
Two-proportion z-test
Meaning
Compares two proportions, not means of paired measurements.
Key test
Use for yes/no outcomes in two groups.
Formula
z=SEp^1−p^2
Example
Comparing pass rates of two groups
Formula & Notation
t=sd/ndˉ−μd0
t=sd/ndˉ−μd0 with df=n−1 where di=x1i−x2i and dˉ=n1∑di
How to read it:dˉ = mean of differences, sd = standard deviation of differences, n = number of pairs, df=n−1. Usually H0:μd=0.
Worked Examples
Example 1 — Tutoring effect
Easy
Six students score before and after tutoring; the differences (after − before) are 4,2,5,1,3,3 with dˉ=3, sd=1.41. Test H0:μd=0 at α=0.05.
Show the steps and the answer
Treat the six differences as one sample: n=6 pairs, dˉ=3, sd=1.41.
Each difference compares a student with themself, so differences in ability between students drop out.
Standard error: sd/n=1.41/6=1.41/2.449≈0.576.
This is how much dˉ would wobble from sample to sample if tutoring did nothing.
Test statistic: t=0.5763−0≈5.21 with df=6−1=5.
The degrees of freedom count pairs: 6 pairs, not 12 scores.
Compare: for df=5 at α=0.05 the critical value is 2.571 two-sided (2.015 one-sided), and 5.21 is beyond both, so p<0.01.
A mean gain of 3 points sits more than 5 standard errors above 0, far too large to be chance.
Takeaway:Subtract within each pair first; after that, the paired t-test is an ordinary one-sample t-test on the differences with df=n−1.
Example 2 — Two different classes
Standard
Instead, Class A and Class B are different students, and you compare their mean scores. Is this paired?
Show the steps and the answer
Try to pair them: which Class B student belongs with a given Class A student?
There is no answer; any pairing would be arbitrary, and a different arbitrary pairing would give different differences.
Notice that the classes need not even be the same size, say 24 and 27 students.
Paired data always come in equal numbers, because each pair holds one value from each side.
Compare the two means with SE=sA2/nA+sB2/nB in a two-sample t-test.
Independent groups each add their own variation to the gap between means, so both variances appear.
Answer:No — use a two-sample t-test
Takeaway:Pairing needs a real link (the same person, a twin, a matched partner); two separate classes are independent groups.
Example 3 — Find the mistake: paired data tested as independent
Application
Four students' quiz scores (before, after) a study program are (60,64), (75,78), (82,87), (90,93). Maya writes: "Before mean 76.75, after mean 80.5. Two-sample t=162.25/4+159/43.75≈0.42, so the program made no significant difference." Find the mistake and correct it.
Show the steps and the answer
Spot the design: each pair of scores belongs to one student, so the data are paired.
Maya's formula treats the columns as unrelated groups, so the 30-point gaps between students (60 versus 90) count as noise.
Form the differences: 4,3,5,3, so dˉ=415=3.75.
Subtracting within each student removes who is strong or weak and keeps only the change.
Find sd: deviations 0.25,−0.75,1.25,−0.75; squares sum to 2.75; sd=2.75/3≈0.957.
The differences barely vary, which is why the paired standard error is so small.
Compute t=0.957/43.75=0.4793.75≈7.83 with df=4−1=3.
With 4 pairs the critical value at α=0.05 is 3.182, and 7.83 is far past it.
Answer:Paired t≈7.83 with df=3: reject H0; the program raised scores by about 3.75 points on average.
Takeaway:When the same subjects appear in both columns, subtract first. Here the same 3.75-point gain gives t≈0.42 unpaired but t≈7.83 paired.
Where You'll See It
Testing new running shoes
A shoe company has 20 runners each run 5 km in old shoes and in new ones. Their times range from 18 to 35 minutes, but each runner's difference between the two shoes is a matter of seconds. Subtracting per runner removes the 17-minute spread between people, so a steady 20-second gain can be detected.
Twin studies of a reading program
Researchers give a reading program to one twin from each pair and not the other. Twins share a home, a school and genes, so the within-pair difference isolates the program's effect. The test uses n = number of twin pairs, and df=n−1.
Scores before and after tutoring
Five students gain 8, 3, 12, 5 and 7 points. Then dˉ=7, sd≈3.39 and t=3.39/57≈4.6 with df=4, strong evidence that the tutoring helped.
Common Mistakes
The slip:Treating paired data as two independent samples
Instead:form the per-pair differences and run a one-sample test on them.
The slip:Using df=n1+n2−2
Instead:the paired test uses df=n−1 where n is the number of PAIRS.
The slip:Using s of one group instead of sd
Instead:the test uses the standard deviation of the differences, not of either original column.
Mini Practice
Try these on your own. Tap Reveal when you want to check.
1.
Five people are weighed before and after a fitness program: before 70, 82, 65, 90, 75 kg; after 68, 79, 66, 86, 71 kg. Find each difference (before − after) and dˉ.
Hint:Subtract within each person first, then average the five differences.
2.
For 16 matched pairs, dˉ=3 and sd=4. Find t for H0:μd=0 and the degrees of freedom.
Hint:The standard error is sd/n, with n the number of pairs.
3.
Five plants grow 1, 3, 2, 4 and 5 cm in a week under a grow light (after − before). Find dˉ, sd and t for H0:μd=0.
Hint:For sd, add the squared deviations from dˉ and divide by n−1 before taking the square root.
4.
Ten pairs of twins join a reading study. In each pair, one twin is randomly given a new program and the other the old one. Paired t-test or two-sample t-test?
Hint:Is each score in one group linked to a specific score in the other?
5.
Eight students take a test before and after a review session. Nia uses df=8+8−2=14. Correct her degrees of freedom.
Hint:In a paired test, what is n counting?
Want the full set?
50 practice questions for this concept — free to try, every one with a complete worked
solution showing the why, not just the answer.
Why is pairing more powerful than comparing two separate groups?
Because each subject acts as their own control. People differ a lot: some read fast and some slowly. In a two-sample test, those differences between people add noise that can hide the treatment effect. Subtracting within each pair removes everything that stays the same for that person, so the standard deviation of the differences, sd, is usually much smaller than the spread of either column, and a smaller effect becomes detectable.
Does it matter whether I compute after minus before or before minus after?
Not for the conclusion, as long as you stay consistent. Switching the order flips the sign of every difference, so dˉ and t change sign while sd and a two-sided p-value stay the same. Pick the order that reads easily: with after minus before, a positive mean difference means improvement. Then write the alternative hypothesis in the same direction.
What if some subjects drop out before the second measurement?
A subject with only one measurement has no difference, so they leave the paired analysis. If a few drop out for unrelated reasons, the test still works with fewer pairs. But if the dropouts are not random, say the students who struggled most quit the program, the remaining pairs make the program look better than it is. Report how many dropped out and why, because the test cannot correct that bias.
Is a before-and-after study an experiment?
Not by itself. If everyone gets the treatment and is measured before and after, the change could come from time passing, practice with the test, or something else that happened in between, such as a school holiday. A stronger design pairs subjects and randomly assigns the treatments within each pair, or randomly decides which of two treatments each subject tries first. Then a significant paired result supports a claim about the treatment.
Start with Mean and Standard Deviation (you compute both for the differences), then Sampling Distribution, Confidence Interval and Hypothesis Testing, which supply the t statistic and its decision rule. The paired test adds one move: subtract within each pair to get a single sample. Next, Two-Sample Tests handle groups that are independent, where no subtraction is possible.