AP Statistics · Inference for quantitative data: means
Confidence intervals for means
1One-sample t-interval
$$\bar{x} \pm t^*\frac{s}{\sqrt{n}}, \qquad df = n - 1$$
Conditions: random, 10%, Normal/Large Sample.
a random sample of 16 bags of rice has $\bar{x} = 52.3$ g of protein per kg and $s = 6.4$ g. Construct a 95% interval for the mean.
- Conditions: random sample; 16 bags < 10% of all bags; a dotplot shows no strong skew or outliers.
- $SE = \frac{6.4}{\sqrt{16}} = 1.6$; $df = 15$, $t^* = 2.131$.
- $ME = 2.131 \times 1.6 \approx 3.41$.
- Interval: $(48.89, 55.71)$ g.
- "We are 95% confident that the interval from 48.89 to 55.71 g captures the true mean protein content of all bags of this rice."
Check yourself
For n = 25, x̄ = 40, s = 10, the SE is:
Show the answer
2
10/5.
2Paired data
When each individual gives two measurements (before/after, left/right), or individuals are matched in pairs, analyse the differences:
$$\bar{x}_d \pm t^*\frac{s_d}{\sqrt{n}}, \qquad df = n - 1$$
where $n$ is the number of pairs. The parameter is $\mu_d$, the true mean difference.
10 runners time a 5 km run with old shoes and new shoes. The differences (old − new) have $\bar{x}_d = 18$ s and $s_d = 12$ s.
- $SE = \frac{12}{\sqrt{10}} \approx 3.79$; $df = 9$, $t^* = 2.262$.
- $ME \approx 8.58$; interval $(9.4, 26.6)$ s.
- Since 0 is not in the interval, the new shoes appear to reduce times by between about 9 and 27 seconds on average.
Check yourself
Paired t procedures analyse:
Show the answer
The differences within each pair
One sample of differences.
3Two-sample t-interval for μ₁ − μ₂
For two independent groups:
$$(\bar{x}_1 - \bar{x}_2) \pm t^*\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}$$
Use technology for $df$ (Welch's formula), or conservatively $df = \min(n_1 - 1, n_2 - 1)$.
Class A ($n = 20$, $\bar{x} = 74$, $s = 8$); Class B ($n = 25$, $\bar{x} = 68$, $s = 10$).
- Difference $6$; $SE = \sqrt{\frac{64}{20} + \frac{100}{25}} = \sqrt{3.2 + 4} \approx 2.68$.
- Conservative $df = 19$, $t^* = 2.093$: $ME \approx 5.62$.
- Interval $(0.38, 11.62)$: Class A's mean appears higher.
Is 0 inside the interval for μ₁ − μ₂? That decides whether a difference is convincing
Check yourself
Paired or two-sample? The same 30 students take a test before and after a course.
Show the answer
Paired
Same individuals measured twice.
4Interpreting and using intervals
- The interval estimates the population mean, not individual values.
- A wider interval comes from: larger $s$, smaller $n$, higher confidence.
- To use an interval to judge a claim: if the claimed value lies outside the interval, the data contradict it.
a manufacturer claims bolts are 10.0 mm on average. A 95% interval is (10.04, 10.18) mm. Since 10.0 is not in the interval, the claim is not plausible: the bolts appear slightly too long.
Check yourself
A 95% interval for μ is (12.1, 14.3). Is μ = 13 plausible?
Show the answer
Yes, it lies inside the interval
Inside → plausible.
5Going deeper: one-sample, paired and two-sample intervals
One-sample t interval for a mean
$$\bar{x} \pm t^*\frac{s}{\sqrt{n}}, \qquad \text{df} = n - 1$$
Conditions: Random; 10%; Normal / large sample (population normal, or n ≥ 30, or a graph of the data showing no strong skewness or outliers).
a random sample of 25 students at a large school has a mean score of 82.4 on a standardized test, with standard deviation 6.0. A dotplot shows no strong skewness or outliers. Construct a 95% confidence interval for the school's mean score.
- State: μ = the true mean score of all students at the school; 95% confidence.
- Plan: one-sample t interval. Random: stated. 10%: 25 is less than 10% of a large school. Normal: n < 30, but the dotplot shows no strong skewness or outliers.
- Do: df = 24; t* = 2.064. Standard error = 6.0 ÷ √25 = 1.2. Margin of error = 2.064 × 1.2 = 2.48. Interval: (79.9, 84.9).
- Conclude: We are 95% confident that the interval from 79.9 to 84.9 captures the true mean score of all students at the school.
Using the interval: a claim that the school's mean is 85 is not supported: 85 lies outside the interval. A claim of 80 is plausible.
Paired data: the paired t interval: when two measurements are taken on the same individuals (before and after) or on matched pairs, the two sets are not independent. Compute the difference for each pair and use one-sample methods on the differences:
$$\bar{x}_{\text{diff}} \pm t^*\frac{s_{\text{diff}}}{\sqrt{n}}, \qquad \text{df} = (\text{number of pairs}) - 1$$
The normality condition applies to the differences.
ten runners' times for a mile are recorded in old shoes and in new shoes. The differences (old − new) have mean 2.4 seconds and standard deviation 3.0 seconds, with no strong skewness or outliers.
- df = 9; t* = 2.262.
- Standard error = 3.0 ÷ √10 = 0.949.
- Interval: 2.4 ± 2.262(0.949) = 2.4 ± 2.15 = (0.25, 4.55) seconds.
- We are 95% confident that the true mean improvement with the new shoes is between 0.25 and 4.55 seconds. Since 0 is not in the interval, there is evidence of an improvement.
Two independent samples: the two-sample t interval
$$(\bar{x}_1 - \bar{x}_2) \pm t^*\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}$$
- Degrees of freedom: from technology; or, conservatively, the smaller of n₁ − 1 and n₂ − 1.
- Conditions: two independent random samples or two randomly assigned groups; 10% for each; normal / large sample for each group.
a random sample of 40 students who eat breakfast has a mean test score of 78 (s = 8); an independent sample of 35 who do not has a mean of 73 (s = 10).
- Difference = 5.
- Standard error = √(64 ÷ 40 + 100 ÷ 35) = √(1.60 + 2.857) = 2.11.
- Conservative df = 34; t* ≈ 2.032.
- Interval: 5 ± 2.032(2.11) = 5 ± 4.29 = (0.7, 9.3).
- We are 95% confident that the true mean score of breakfast-eaters is between 0.7 and 9.3 points higher than that of students who skip it.
- This was an observational study: it shows a difference, not that breakfast causes higher scores.
Paired or two-sample?
- Paired: each value in one group is linked to a specific value in the other: the same person twice, twins, or matched pairs.
- Two-sample: the two groups are separate and unrelated.
Using two-sample methods on paired data wastes the pairing and usually gives a much wider interval.
What changes the margin of error?
- Higher confidence: larger t*: wider.
- Larger n: smaller standard error (and slightly smaller t*): narrower.
- More variable data (larger s): wider.
Choosing a sample size for a mean: $n = \left(\frac{z^*\sigma}{ME}\right)^2$, using a prior estimate of σ; round up.
σ is thought to be about 6. To estimate a mean within 1 point at 95% confidence:
- n = (1.96 × 6 ÷ 1)² = 138.3.
- Use 139.
Interpreting the confidence level: about 95% of intervals built this way from repeated random samples would capture the true mean. It is not the probability that this interval contains μ, and it is not a statement that 95% of individuals fall in the interval.
Common mistakes
- Using z* in place of t*.
- Treating paired data as two independent samples.
- Saying "95% of students scored between 79.9 and 84.9."
- Defining the parameter as the sample mean.
- Checking normality of the two separate columns in a paired design, not the differences.
- Not stating the direction of subtraction for a difference.
Check yourself
Blood pressure is measured for the same 20 patients before and after a treatment. Which procedure estimates the mean change?
Show the answer
A paired t interval using the 20 differences
The two measurements come from the same individuals, so the differences are analyzed as one sample.
6For top marks
- Name the procedure exactly: "one-sample t-interval for $\mu$", "paired t-interval for $\mu_d$", "two-sample t-interval for $\mu_1 - \mu_2$".
- Recognise paired designs: the same subjects, matched pairs, before/after.
- Interpret in context with units and the population.
- Do not say "95% of values lie in the interval".
"We are 95% confident that the interval from 0.38 to 11.62 points captures the true difference in mean scores (A − B) for all students taught by these methods."
Check yourself
Which is a correct interpretation?
Show the answer
We are 95% confident the interval captures the true mean
About the parameter.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera