Confidence intervals, explained with examples
A confidence interval gives a range of plausible values for a population parameter, based on a sample. It is one of the two main tools of statistical inference in AP Statistics, alongside significance tests.
On this page
- The big idea
- Interval for a population proportion
- Interval for a population mean
- The four steps (PANIC or State-Plan-Do-Conclude)
- How to interpret the interval
- What the confidence level means
- Margin of error and sample size
- Intervals for a difference
- Using an interval to judge a claim
- Common mistakes
- Practice questions
- Frequently asked questions
- Key takeaways
- Related guides
The big idea
A sample statistic, such as the proportion of 500 voters who support a policy, is our best single estimate of the population value. But a different sample would give a slightly different answer. A confidence interval reflects that uncertainty by giving a range instead of a single number.
Every confidence interval in AP Statistics has the same structure:
statistic ± (critical value) × (standard error)
The part after ± is the margin of error. The critical value depends on the confidence level, and the standard error measures how much the statistic typically varies from sample to sample.
Interval for a population proportion
p̂ ± z* √(p̂(1 − p̂)/n)
Common critical values: z* = 1.645 for 90%, 1.96 for 95% and 2.576 for 99% confidence.
Example 1: a proportion
In a random sample of 400 students, 248 say they use a revision app. Construct a 95% confidence interval for the proportion of all students who use one.
- p̂ = 248/400 = 0.62.
- Conditions: random sample; 400 is less than 10% of all students; np̂ = 248 and n(1 − p̂) = 152 are both at least 10.
- SE = √(0.62 × 0.38/400) ≈ 0.0243. Margin = 1.96 × 0.0243 ≈ 0.048.
- Interval: (0.572, 0.668).
Interval for a population mean
When the population standard deviation is unknown, which is almost always, use the t distribution:
x̄ ± t* (s/√n), with degrees of freedom n − 1.
The t distribution has heavier tails than the normal, so t* is a little larger than z*, especially for small samples. As n grows, t* gets closer to z*.
Example 2: a mean
A random sample of 25 batteries has mean life 41.2 hours and standard deviation 3.5 hours. Construct a 95% confidence interval for the mean life of all such batteries.
- df = 24, so t* ≈ 2.064.
- Conditions: random sample; 25 is less than 10% of all batteries; the sample size is small, so check that the sample data show no strong skewness or outliers.
- Margin = 2.064 × 3.5/√25 = 2.064 × 0.7 ≈ 1.44.
- Interval: (39.76, 42.64) hours.
The four steps (PANIC or State-Plan-Do-Conclude)
- State the parameter and confidence level in context.
- Plan: name the procedure, such as a one-sample z interval for p, and check the conditions: random, 10%, and large counts or normality.
- Do the calculation.
- Conclude with an interpretation in context.
How to interpret the interval
A correct interpretation: “We are 95% confident that the interval from 0.572 to 0.668 captures the true proportion of all students who use a revision app.”
Avoid saying “there is a 95% probability that the true proportion is in this interval”. Once the interval is calculated, the true value is either in it or not; the 95% describes how reliable the method is.
What the confidence level means
The confidence level describes the method, not a single interval. If we took many random samples and built a 95% interval from each one, about 95% of those intervals would capture the true parameter. AP questions frequently ask for this interpretation separately, so learn both.
Margin of error and sample size
- Higher confidence means a larger critical value and a wider interval.
- Larger sample size means a smaller standard error and a narrower interval. To halve the margin of error, you need four times the sample size, because n is under a square root.
- The margin of error covers only random sampling variability. It does not account for bias from poor sampling or wording.
Example 3: choosing a sample size
How large a sample is needed to estimate a proportion within ±0.03 at 95% confidence, with no prior estimate?
- Use p̂ = 0.5, which gives the largest possible margin: 1.96√(0.25/n) ≤ 0.03.
- n ≥ (1.96/0.03)² × 0.25 ≈ 1067.1, so round up to 1068.
Intervals for a difference
AP Statistics also uses intervals to compare two groups. For two proportions, the interval is (p̂1 − p̂2) ± z*√(p̂1(1 − p̂1)/n1 + p̂2(1 − p̂2)/n2). For two means, it uses x̄1 − x̄2 with a t critical value. Check the conditions for each sample separately, and make sure the samples are independent of each other.
The key interpretation skill is looking at zero. If the interval for a difference contains 0, there is no convincing evidence of a difference between the groups. If the whole interval is above 0, the first group's parameter appears larger; if it is entirely below 0, it appears smaller. For paired data, such as before-and-after scores for the same students, do not use two-sample methods: work with the differences and build a one-sample t interval.
Using an interval to judge a claim
If a claimed value lies outside a 95% interval, the data give convincing evidence against it at the 5% significance level (for a two-sided test). If it lies inside, the claimed value is plausible. In Example 1, a claim that half of all students use an app is not supported, because 0.5 is below the interval.
Common mistakes
- Saying there is a 95% probability that the parameter is in a specific interval.
- Checking large counts with the claimed p instead of p̂ for an interval.
- Using z* instead of t* for a mean when σ is unknown.
- Forgetting that a larger sample narrows the interval, while higher confidence widens it.
- Rounding the required sample size down instead of up.
Practice questions
Try each one before opening the answer.
Q1. What is z* for a 99% confidence interval?
Show answer
Q2. p̂ = 0.3 and n = 100. Find the 95% margin of error.
Show answer
Q3. An interval for a mean is (12.1, 15.9). What are the sample mean and margin of error?
Show answer
Q4. What happens to a confidence interval if the sample size is multiplied by 4?
Show answer
Frequently asked questions
Are confidence intervals on the AP Statistics exam?
Yes. They appear in Units 6 and 7 for proportions and means, and in Unit 9 for slopes, and they almost always appear on the free-response section.
Are confidence intervals in A level Maths?
Not in A level Maths. They appear in some A level Further Maths statistics options.
Key takeaways
- Interval = statistic ± critical value × standard error.
- Use z* for proportions and t* with n − 1 df for means.
- Check random, 10% and large counts or normality conditions.
- Interpret: we are C% confident the interval captures the true parameter.
- Bigger samples narrow the interval; higher confidence widens it.