You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
A confidence interval (CI) turns a single point estimate into an honest range of plausible values for an unknown population parameter, together with a stated level of reliability. Where a hypothesis test answers a yes/no question, a confidence interval reports the precision of an estimate — and the two are deeply connected. This lesson builds confidence intervals for a mean (with σ known and unknown), for a difference of means, and for a proportion; analyses the width of an interval and how to control it; and stresses the correct interpretation, which is the most frequently misstated idea in the whole topic.
This is Paper 3 Statistics (7367/3S) content (Paper 3: 2 h, 100 marks, AO1 40% / AO2 25% / AO3 35%). Confidence intervals are the estimation counterpart to hypothesis testing and sit naturally after the t-distribution, reusing its critical values. The construction is AO1 (substitute into xˉ±zσ/n and read tables), but the marks that separate candidates are AO2 — the interpretation of the interval and the link to significance tests. It builds directly on the sampling distribution Xˉ∼N(μ,σ2/n) and on the t-distribution from the previous two lessons.
A 95% confidence interval for a parameter θ is a procedure: if the sampling process were repeated many times, building an interval the same way each time, about 95% of those intervals would contain the true θ. The confidence level describes the long-run success rate of the method, not the probability for one particular interval.
This distinction is essential. Once you have computed an interval such as (500.0,504.0), the parameter θ is a fixed (if unknown) constant and the interval is fixed too — so θ either is or is not inside it; there is no "95% probability" about a settled fact. The randomness lives in the sampling, before the interval is drawn. The correct phrasing is therefore "we are 95% confident that θ lies in (a,b)," meaning "this interval was produced by a method that works 95% of the time."
The general shape of every interval below is
estimate±(critical value)×(standard error),
where the critical value comes from the normal or t-distribution at the required level and the standard error measures the estimate's variability.
If X1,…,Xn∼N(μ,σ2) with σ known, then Xˉ∼N(μ,σ2/n), so standardising and inverting the central (1−α) probability gives
xˉ±zα/2nσ,
where zα/2 leaves α/2 in each tail of N(0,1).
It is worth seeing exactly where the ±zα/2σ/n comes from, because the same argument produces every interval in the topic. Start from the standardised sample mean — a pivot, a quantity whose distribution is known and free of the unknown μ:
Z=σ/nXˉ−μ∼N(0,1).
By definition of zα/2, the central probability is
P(−zα/2≤σ/nXˉ−μ≤zα/2)=1−α.
Now rearrange the inequality to isolate μ in the middle. Multiplying through by σ/n and then subtracting Xˉ and negating (which flips the inequalities) gives
P(Xˉ−zα/2nσ≤μ≤Xˉ+zα/2nσ)=1−α.
The random endpoints Xˉ±zα/2σ/n bracket the fixed μ with probability 1−α. Replacing the random Xˉ by its observed value xˉ yields the computed interval — and shows precisely why "95%" attaches to the procedure (the random endpoints) and not to the fixed μ. This pivot-and-rearrange recipe is the single idea behind the mean, difference and (after the test-inversion of Going further) proportion intervals alike.
| Confidence level | zα/2 |
|---|---|
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
These three values are worth memorising — 1.645, 1.960, 2.576 recur throughout inference.
A machine fills bottles with mean volume μ and known standard deviation σ=5 ml. A random sample of 25 bottles has xˉ=502 ml. Construct a 95% CI for μ.
SE=nσ=255=1.(M1 standard error) 502±1.960×1=502±1.96.(M1 form; A1)
So the 95% CI is (500.04, 503.96) ml. (M1 SE; M1 xˉ±zSE with z=1.96; A1 endpoints. Interpretation: we are 95% confident the mean fill volume lies between 500.04 and 503.96 ml.)
When σ is unknown, replace it with the sample standard deviation s and use the t-distribution with n−1 degrees of freedom — exactly as in the t-test:
xˉ±tn−1,α/2ns.
Because the t critical value exceeds the matching z, the interval is wider than the σ-known case — the price of not knowing σ.
A sample of 10 measurements gives xˉ=48.3 and s=2.1. Construct a 95% CI for μ.
t9,0.025=2.262,SE=102.1=0.6641.(B1 critical value; M1 SE) 48.3±2.262×0.6641=48.3±1.502.(M1; A1)
So the 95% CI is (46.80, 49.80). (B1 t9,0.025; M1 SE; M1 xˉ±tSE; A1 endpoints. Using z=1.96 here would wrongly give ±1.30 — too narrow.)
To see the cost of not knowing σ concretely, compare the two cases for this sample. With σ known and equal to 2.1, the half-width would be 1.96×0.6641=1.302, giving (47.00,49.60). With σ unknown the t-multiplier 2.262 widens this to ±1.502. The interval is about 15% wider — the penalty for having to estimate the spread from only ten observations. As n grows, tn−1,0.025 falls towards 1.96 and the two intervals converge; for n=100 the difference is negligible. This is the estimation counterpart of the heavier-tailed t-distribution from the previous lesson: less certainty about σ means a wider net for μ.
The full width of a (σ-known) interval is
wfull=2zα/2nσ,
so the interval narrows if you increase n (the only practical lever), lower the confidence level (smaller z, but less reliable), or have a smaller σ (rarely in your control). The dependence on n is important: to halve the width you must quadruple the sample, since 1/n halves only when n is multiplied by 4. This diminishing return is why precision is expensive — going from n=100 to a half-width that is one-tenth as large demands n=10000, a hundredfold increase in data. The confidence level enters only through the multiplier zα/2, so raising confidence from 95% to 99% widens every interval by the factor 2.576/1.960=1.31, a fixed 31% inflation regardless of the data.
To achieve a half-width (margin of error) w, rearrange zα/2σ/n≤w:
n≥(wzα/2σ)2.
Worked example. How large a sample gives a 95% CI with half-width 2 ml when σ=5?
n≥(21.96×5)2=(4.9)2=24.01⇒n=25.
Always round up to the next integer — rounding down would leave the interval slightly too wide.
For independent samples from N(μ1,σ12) and N(μ2,σ22), the estimator Xˉ1−Xˉ2 has variance σ12/n1+σ22/n2 (variances add), giving:
Known variances: (xˉ1−xˉ2)±zα/2n1σ12+n2σ22.
Unknown but equal variances (pooled sp): (xˉ1−xˉ2)±tn1+n2−2,α/2spn11+n21.
A key reading: if this interval excludes 0, then 0 is not a plausible value for μ1−μ2, which is evidence of a genuine difference (equivalent to rejecting H0:μ1=μ2 in a two-tailed test at level α).
Two production lines have known standard deviations σ1=3, σ2=4 (mm). Samples give line 1: n1=36, xˉ1=50.2; line 2: n2=64, xˉ2=48.7. Construct a 95% CI for μ1−μ2 and state whether the lines differ.
xˉ1−xˉ2=50.2−48.7=1.5.(B1 point estimate) SE=n1σ12+n2σ22=369+6416=0.25+0.25=0.5=0.7071.(M1 SE; variances added) 1.5±1.96×0.7071=1.5±1.386.(M1; A1)
So the 95% CI is (0.114, 2.886) mm. Since the interval excludes 0, there is evidence at the 5% level that the line means differ (line 1 produces larger items). (B1 estimate; M1 SE adding the two variances; M1 ±zSE; A1 endpoints and the "excludes 0" conclusion.)
For a large sample the sample proportion p^ is approximately normal,
p^∼N(p, np(1−p)),
and estimating the standard error with p^ gives the 95% (or general) interval
p^±zα/2np^(1−p^),
valid when np^>5 and n(1−p^)>5 (so the normal approximation to the binomial holds).
In a survey of 400 voters, 220 support a policy. Construct a 95% CI for the true proportion p.
p^=400220=0.55,SE=4000.55×0.45=0.00061875=0.024875.(M1 p^; M1 SE) 0.55±1.96×0.024875=0.55±0.0488.(M1; A1)
So the 95% CI is (0.501, 0.599). (M1 p^; M1 SE with p^(1−p^)/n; M1 p^±zSE; A1 endpoints. Since the interval lies entirely above 0.5, there is evidence of majority support.)
Notice that the entire interval lies above 0.5, which is the proportion corresponding to "no majority." Because 0.5 is not a plausible value, the data support a genuine majority — the same conclusion a two-tailed test of H0:p=0.5 would reach, illustrating the duality once more. Had the interval straddled 0.5 (for example if the sample had been smaller and hence the interval wider), we could not claim a majority, because values below 0.5 would remain plausible.
Sometimes only one direction matters — a minimum guaranteed lifetime, or an upper bound on a contaminant. A one-sided interval places the whole error probability α in a single tail, using zα (e.g. 1.645 at 95%) rather than zα/2:
lower bound: μ≥xˉ−zαnσ,upper bound: μ≤xˉ+zαnσ.
For instance, with xˉ=1020 hours, σ=40, n=25, a one-sided 95% lower confidence bound for the mean lifetime is
μ≥1020−1.645×2540=1020−1.645×8=1020−13.16=1006.84 hours,
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.