On this page
Loading guide controls…
Continue lessonNew guided lessons are not available yet.
Guided lesson options
You stopped at:
ContinueRevision Mode is on. Questions and activities are hidden.
The linked question or activity is hidden by Revision Mode.
Comparing two groups is one of the most common uses of statistics: before and after a treatment, method A against method B, one school against another. The right test depends on the design. If each observation in one sample is matched with one in the other, the differences form a single sample; if the samples are independent, the test compares two means. This lesson carries out a paired t-test and a two-sample normal test, justifies each from the design and the sample sizes, and shows what goes wrong when the design is misread.
Paired data become one sample
When each observation in one sample is matched with one in the other, such as the same person before and after, the differences d = x after -x before carry the information. Pairing removes the variation between people. Test H₀:μd = 0 with a one-sample t-test on the differences, assuming they come from a normal population:
Worked example 1
Does a training plan raise scores?
Worked example 1
Does a training plan raise scores?
Six athletes were scored before and after a training plan. The improvements (after minus before) were 3, 5, -1, 4, 2, 5. Assuming the improvements are normally distributed, test at the 5% level whether the plan increases the mean score.
Show full solutionHide solution
Hypotheses and statistics
Method
H₀:μd = 0 against H₁:μd > 0, a one-tailed paired t-test.Reason
The same athletes were measured twice, so the pairs are matched.Working
Answer
d bar = 3 and sd² = 26/5 = 5.2, so sd ≈ 2.280 and
t = 3/(2.280/square root of 6) ≈ 3.223.Decide
Method
The one-tailed 5% critical value of t₅ is 2.015.Reason
3.223 > 2.015 (equivalently, p ≈ 0.012).Working
Answer
Reject H₀: there is evidence at the 5% level that the training plan increases the mean score.
Quick check
There are 6 differences, so 5 degrees of freedom, not 10. The conclusion is about the population mean improvement, not about every athlete: one score fell.
Independent samples use a difference of means
For independent samples from two populations, test H₀:μ₁ = μ₂ with
which is standard normal when both populations are normal with known variances. For large samples from any populations, the central limit theorem justifies the same test with the sample variances s₁², s₂² in place of σ₁², σ₂².
Check your understanding 1
Two classes, one test
Check your understanding 1
Two classes, one test
Independent random samples of students from two schools sat the same test. School A: n₁ = 50, x bar ₁ = 72.4, s₁ = 8. School B: n₂ = 60, x bar ₂ = 68.9, s₂ = 10. Test at the 5% level whether the mean scores differ.
Show answerHide answer
H₀:μA = μB, H₁:μA ≠ μB. Both samples are large, so by the central limit theorem the difference of sample means is approximately normal and the sample variances can be used.
2.039 > 1.960 (two-tailed p ≈ 0.041), so reject H₀: there is evidence at the 5% level that the mean scores of the two schools differ.
Spot the mistake 1
The wrong test for the design
Spot the mistake 1
The wrong test for the design
Ten patients each had their blood pressure measured before and after a new drug. A student treats the before and after readings as two independent samples. Explain why this is the wrong design, and what effect it can have.
Write your answer, then compare it with the solution
Show full solutionHide solution
Identify the pairing
Method
Each patient gives one before and one after reading, so the readings are matched.Reason
The two samples are not independent: a patient with high blood pressure before is likely to be high after.Working
Answer
Use a paired t-test on the ten differences. Treating them as independent mixes the large differences between patients into the variance, which can hide a real effect of the drug.
Common mistake
Decide the design before choosing a test: matched pairs give one sample of differences; separate groups give two independent samples.
Common mistakes
- Using a two-sample test on paired data, which mixes the variation between individuals into the standard error.
- Taking the degrees of freedom of a paired test as 2n-2; there are n differences, so n-1 degrees of freedom.
- Defining differences one way (after minus before) and stating H₁ for the other direction.
- Using the two-sample normal test with small samples and unknown variances without a stated justification.
- Concluding that the treatment caused the change when the design does not control for other factors.
Before you move on
Check your understanding 2
Reading speed before and after a course
Check your understanding 2
Reading speed before and after a course
Eight students each read a passage before and after a speed-reading course. The increases in reading speed, in hundreds of words per minute, are
Assuming the increases are normally distributed, test at the 5% level whether the course increases mean reading speed. The one-tailed 5% critical value of t₇ is 1.895.
Show answerHide answer
H₀:μd = 0 and H₁:μd > 0, where μd is the population mean increase. For the differences, d bar = 0.925 and sd ≈ 0.75166, so
Since 3.48 > 1.895 (p ≈ 0.005), reject H₀. There is sufficient evidence at the 5% level that the course increases mean reading speed, assuming the increases are normally distributed.
Loading reading progress…
Lesson done
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Sunday
Checking learning on this device…
Change goal
Progress options
Loading questions…