Comparing populations
What this lesson covers
- The interval is for the difference between groups.
- An interval that excludes zero supports a difference.
- Experiments use randomisation tests.
Look for zero
- Each line is an interval for mean A minus mean B.
- Where zero falls tells you what you can claim.
Reading the difference
- Mean of A minus mean of B.
| Interval | Contains 0? | Conclusion |
|---|---|---|
| 1.2 to 5.8 | No | A is likely higher |
| −1.1 to 3.4 | Yes | No clear difference |
Observational or experimental
- Observational data can suggest a difference between groups.
- A randomised experiment can support a claim about cause.
- A randomisation test asks how often chance alone gives so large a difference.
Statistics explorer
Building a difference interval
- Group A: mean 52, s = 10, n = 100. Group B: mean 47, s = 10, n = 100.
- difference = 52 − 47 = 5
- standard error = √(100/100 + 100/100) = √2
- margin = 1.96 × 1.414 = 2.77
- 2.23 to 7.77
Try it: bootstrap the difference
A randomisation test
- An experiment shows a difference of 6 between groups. Shuffle the labels 1000 times and count how often chance gives a difference of 6 or more.
- 12 of 1000 shuffles reach 6
- tail proportion = 12 ÷ 1000 = 0.012
- Chance alone rarely does this
- Evidence the treatment made a difference
Try it: a randomisation test
Common mistakes
- Saying zero in the interval proves no difference.It means the data cannot show one.
- Claiming cause from a survey.Only random allocation supports cause.
Your turn
The difference interval is 2.1 to 6.3. What can you say?
The difference interval is −1 to 3. What can you say?
A tail proportion is 0.01. What does it suggest?
Which study can support a claim of cause?
Show answer
1. The first group is likely higher 2. No clear difference 3. Chance is an unlikely explanation 4. A randomised experiment
Sample question: Achieved
Random samples of Year 13 students in Whangārei (A) and Invercargill (B) are asked how many hours of screen time they have on a Saturday. The 95% confidence interval for mean A − mean B is −3.2 to −0.8 hours. What can you conclude?
Hint
Check whether zero is inside the interval, and which way round the subtraction goes.
Answer
Zero is not in the interval and the whole interval is negative, so Invercargill's mean is likely higher, by between 0.8 and 3.2 hours.
Step by step
- The interval is for mean A minus mean B, so read the sign carefully.
- Is zero inside −3.2 to −0.8? No. Both ends are below zero.
- Every believable value of A − B is negative, so A is smaller than B.
- That means Invercargill (B) students likely have a higher mean Saturday screen time.
- Turn the numbers round for B − A: B is higher by between 0.8 and 3.2 hours.
- Classic mistake: reading the negative interval as A being higher. A negative difference means the second group is bigger.
Full working
- interval for A − B: −3.2 to −0.8
- 0 not inside; all negativeA − B < 0
- B − A: 0.8 to 3.2 hours
- Invercargill mean likely higher by 0.8 to 3.2 hours
Sample questions: Merit
Random samples of households in Hamilton and Tauranga record weekly electricity use. Hamilton: n = 50, mean 135 kWh, s = 20 kWh. Tauranga: n = 80, mean 128 kWh, s = 24 kWh. Build a 95% confidence interval for the difference in means (Hamilton − Tauranga) using difference ± 1.96 × √(s₁²n₁ + s₂²n₂), and state what it shows.
Hint
Square each standard deviation and divide by its own sample size before adding.
Answer
−0.64 to 14.64 kWh. Zero is inside the interval, so the data do not show a difference in mean weekly use between Hamilton and Tauranga households.
Step by step
- Start with the difference in sample means: 135 − 128 = 7 kWh.
- The standard error combines the variation of both samples: √(s₁²n₁ + s₂²n₂).
- Hamilton part: 20² ÷ 50 = 400 ÷ 50 = 8.
- Tauranga part: 24² ÷ 80 = 576 ÷ 80 = 7.2.
- Add, then take the square root: √(8 + 7.2) = √15.2 = 3.899.
- Classic mistake: adding the standard deviations, 20 + 24. You add the variances divided by n.
- Margin: 1.96 × 3.899 = 7.64 kWh.
- Interval: 7 − 7.64 = −0.64 and 7 + 7.64 = 14.64.
- Zero is inside −0.64 to 14.64. So a mean difference of zero is believable.
- Conclusion: the data cannot show a difference. That is not the same as proving the means are equal.
Full working
- difference = 135 − 128 = 7
- SE = √(40050 + 57680) = √15.2 = 3.899variances over n, added
- margin = 1.96 × 3.899 = 7.64
- 7 − 7.64 = −0.64, 7 + 7.64 = 14.64
- 0 is insideno clear difference
- −0.64 to 14.64 kWh; no clear difference
24 volunteers are randomly allocated, 12 to solve a puzzle with music playing and 12 in silence. The mean time in silence is 52 s and with music 58 s. The group labels are re-randomised 1000 times, and 214 of the re-randomised differences are 6 s or more. Find the tail proportion and write a conclusion.
Hint
The tail proportion is the fraction of re-randomisations at least as large as the real difference; a large one means chance alone could explain it.
Answer
Tail proportion 0.214. Chance alone gave a difference of 6 s or more about 1 time in 5, so chance is a plausible explanation and the experiment does not give evidence that music slows these volunteers down.
Step by step
- The observed difference is 58 − 52 = 6 seconds, music slower.
- The re-randomisation asks: if music made no difference, how often would shuffling the labels give a difference this big?
- Tail proportion = 214 ÷ 1000 = 0.214.
- That is about 1 in 5. Chance alone produces a gap of 6 s quite often.
- Small tail proportions, usually under about 0.1, are taken as evidence. 0.214 is well above that.
- So chance is a plausible explanation for the 6 s difference.
- Write it in context: the experiment does not provide evidence that music increases puzzle time for these volunteers.
- Classic mistake: saying the experiment proves music has no effect. The test just cannot rule chance out.
- Had the tail proportion been small, random allocation would have let us claim music caused the slower times, but only for these volunteers.
Full working
- observed difference = 58 − 52 = 6 s
- tail proportion = 214 ÷ 1000 = 0.214
- 0.214 is largechance often gives 6 s or more
- chance is a plausible explanation
- 0.214; no evidence that music changes puzzle time
Sample questions: Excellence
Two populations have about the same standard deviation, 15, and equal-sized random samples of n are taken from each. The difference in sample means turns out to be 4. Using difference ± 1.96 × √(s₁²n₁ + s₂²n₂), find the smallest n for which the 95% interval would exclude zero. If the samples come from a survey, explain what could and could not then be claimed.
Hint
The interval excludes zero when the margin is less than the difference, so solve 1.96 × √(450 ÷ n) < 4.
Answer
n = 109 in each group. Then the interval excludes zero and supports a difference between the population means, but a survey is observational, so it cannot show that the grouping variable causes the difference.
Step by step
- The interval is 4 ± margin. It leaves out zero only if the margin is less than 4.
- With s = 15 in both groups and n in each, the standard error is √(225n + 225n) = √(450 ÷ n).
- So we need 1.96 × √(450 ÷ n) < 4.
- Divide by 1.96: √(450 ÷ n) < 2.0408.
- Square: 450 ÷ n < 4.1649, so n > 450 ÷ 4.1649 = 108.05.
- n must be a whole number bigger than 108.05, so n = 109.
- Check n = 108: margin = 4.0008, a hair over 4, so the interval just reaches zero. Check n = 109: margin = 3.98, under 4.
- Now the claim. With n = 109 the interval is about 0.02 to 7.98, all above zero. That supports a real difference between the population means.
- But a survey only observes the groups. Nobody allocated people to them, so other variables could explain the difference.
- So the survey supports a difference, not a cause. Only a randomised experiment could support cause.
Full working
- need 1.96 × √(450 ÷ n) < 4margin smaller than the difference
- √(450 ÷ n) < 2.0408
- n > 450 ÷ 4.1649 = 108.05
- n = 108: margin 4.0008; n = 109: margin 3.98round up
- survey: a difference, not a causeno random allocation
- n = 109 in each group
Study 1: a random sample of 200 Year 12 students in Otago finds those who play sport daily sleep a mean of 8.1 hours and others 7.6 hours; the 95% interval for the difference is 0.2 to 0.8 hours. Study 2: 40 volunteers at one Dunedin school are randomly allocated to a 20-minute daily exercise routine or none for a month; the exercise group sleeps 0.4 hours more, and a randomisation test gives a tail proportion of 0.03. A headline says "Exercise makes New Zealand teenagers sleep longer". Use both studies to evaluate the headline.
Hint
Random selection lets you extend to a population; random allocation lets you claim a cause. Check which study has which.
Answer
Neither study supports the headline on its own. Study 1 was randomly selected, so it supports a difference for Otago Year 12 students, but it is observational, so other variables could explain it. Study 2 used random allocation and a small tail proportion, so it supports exercise causing longer sleep, but only for these 40 volunteers. Together they suggest exercise may help, but the claim about all NZ teenagers goes beyond both.
Step by step
- Split the headline into two parts: a cause (makes) and a population (New Zealand teenagers).
- Study 1. The difference interval 0.2 to 0.8 is all above zero, so it supports a real difference in mean sleep.
- Study 1 was a random sample, so the result extends to Otago Year 12 students.
- But Study 1 is observational: students chose whether to play sport. A confounder could explain it, for example students who play sport may have less late-night screen time.
- So Study 1 gives an association for Otago Year 12s, not a cause.
- Study 2. The tail proportion 0.03 is small, so chance is not a plausible explanation of the 0.4-hour gap.
- Study 2 used random allocation, which tends to balance confounders. So it supports exercise causing longer sleep.
- But Study 2 used 40 volunteers from one school. Volunteers may differ from other teenagers, so the cause claim applies to them.
- Neither study had both random selection from all NZ teenagers and random allocation.
- Judgement: the headline goes too far. The studies together suggest exercise may help sleep, but a randomised experiment on a random sample of NZ teenagers would be needed.
Full working
- headline: a cause, for all NZ teenagers
- Study 1: 0.2 to 0.8, excludes 0difference supported
- Study 1: random selection, observationalassociation, Otago Year 12s
- Study 2: tail proportion 0.03chance unlikely
- Study 2: random allocation, volunteerscause, these 40 only
- headline not supported by either study alone
What to take away
- Look for zero.
- Design decides what you can claim.
Where science uses this
Report a mistake
More in AS 91582
Is your child on track?
Take the free placement test


