Difficulty: Introductory to Intermediate | Prerequisites: Basic probability, sampling distributions, normal distribution.
Confidence intervals sit at the heart of inferential statistics. They let you move from a single sample to a statement about the population it came from, with a quantified level of uncertainty. If you are comfortable with means, standard deviations, and the idea that a sample is a subset of a population, you have what you need. This topic matters because almost every published study reports CIs, and exam questions test both construction and interpretation.
A confidence interval is a range of values, calculated from sample data, that is likely to contain the true population parameter. The width of that range depends on three things: how variable the data are, how large the sample is, and what confidence level you choose. A 95% CI means that if you repeated the sampling process many times, about 95% of the intervals you built would capture the true value.
Population
The entire group of individuals, items, or observations you want to draw conclusions about. Think of it as the full set of data you would have if you could measure everything.
Sample
A subset of the population that you collect and analyse. In simple terms, it is the data you can get your hands on.
Point estimate (x̄)
A single value calculated from the sample that serves as your best guess for the population parameter (e.g. the sample mean as an estimate of the population mean μ). Think of it as your one-number answer before you add any uncertainty around it.
Confidence interval (CI)
A range of values, centred on the point estimate, within which the true population parameter is expected to fall at a stated confidence level. In simple terms, it is the "plus or minus" zone around your estimate.
Margin of error (ME)
The amount added to and subtracted from the point estimate to create the confidence interval. It combines the critical value, the standard deviation, and the sample size into a single measure of precision.
Standard deviation (σ or s)
σ is the population standard deviation (rarely known). s is the sample standard deviation (what you usually calculate). Both measure how spread out the data are. More spread means a wider CI.
Confidence level
The probability (commonly 90%, 95%, or 99%) that the interval procedure will capture the true parameter if repeated many times. A higher confidence level produces a wider interval.
Degrees of freedom (df)
Typically n – 1 for a single sample, where n is the sample size. Degrees of freedom determine which t-distribution to use when σ is unknown. Think of it as the number of independent pieces of information in your sample after estimating the mean.
Critical value (z or t)**
The number of standard errors you go out from the estimate to reach the desired confidence level. z* comes from the standard normal distribution (when σ is known or n is large); t* comes from the t-distribution (when σ is unknown).
Every CI follows the same template:
Estimate ± Margin of Error
The margin of error depends on three inputs: the critical value (z* or t*), the standard deviation (σ or s), and the sample size (n).
More variability in the data (larger σ or s) – wider interval
Smaller sample size (smaller n) – wider interval
Higher confidence level (e.g. 99% instead of 95%) – wider interval
Larger sample size – narrower interval
Lower confidence level – narrower interval
Used when the population standard deviation σ is known and the sample is large (or the population is normal).
Formula: x̄ ± z*(α/2) × (σ / √n)
Example: if x̄ = 50, σ = 10, n = 100, and you want 95% confidence, z* = 1.96, so the CI is 50 ± 1.96 × (10/10) = 50 ± 1.96, giving (48.04, 51.96).
Used when σ is unknown and you substitute the sample standard deviation s. The t-distribution has heavier tails than the normal, which makes the interval a bit wider to account for extra uncertainty.
Formula: x̄ ± t*(α/2, df) × (s / √n)
Degrees of freedom: df = n – 1.
As n grows, the t-distribution approaches the z-distribution, so for large samples the two intervals are nearly identical.
Used when observations come in natural pairs (before/after, matched subjects). You compute the difference d for each pair, then build a CI for the mean difference.
Formula: d̄ ± t*(α/2, df) × (s_d / √n)
where d̄ is the mean of the differences, s_d is the standard deviation of the differences, and df = n – 1.
Used when comparing means from two separate groups (μ₁ – μ₂).
Formula: (x̄₁ – x̄₂) ± z*(α/2) × √(s²₁/n₁ + s²₂/n₂)
When σ is unknown for both groups (the usual case), you may use a t-distribution with degrees of freedom calculated via Welch's approximation or the pooled method.
Used for categorical data where you are estimating a population proportion p.
Formula: p̂ ± z*(α/2) × √(p̂(1 – p̂) / n)
where p̂ is the sample proportion.
The correct phrasing matters on exams:
For means: "We are 95% confident that the true population mean μ lies between [lower] and [upper]."
For proportions: "We are 95% confident that the true population proportion p lies between [lower] and [upper]."
What this means, precisely: if you repeated the study many times and built a 95% CI each time, about 95% of those intervals would contain the true parameter. Any single interval either does or does not contain it.
Scenario | Formula | Use when |
|---|---|---|
One mean, σ known | x̄ ± z*(α/2) × (σ / √n) | Population SD is known, large n |
One mean, σ unknown | x̄ ± t*(α/2, df) × (s / √n) | Population SD is unknown, df = n – 1 |
Paired samples | d̄ ± t*(α/2, df) × (s_d / √n) | Before/after or matched pairs |
Two independent means | (x̄₁ – x̄₂) ± z or t × √(s²₁/n₁ + s²₂/n₂) | Comparing two separate groups |
One proportion | p̂ ± z*(α/2) × √(p̂(1 – p̂)/n) | Categorical data, estimating p |
Polling firms report election results as "48% ± 3%" – that ±3% is the margin of error of a confidence interval for a proportion. Clinical trials report CIs for the difference in recovery rates between a drug and a placebo; regulators use these to decide whether the drug works. Quality-control engineers build CIs around the mean diameter of manufactured parts to check whether a production line is within specification.
Students often say "there is a 95% probability that μ is in this interval." That is incorrect. The interval either contains μ or it does not. The 95% refers to the long-run success rate of the procedure, not to any single interval.
Students sometimes believe that increasing the confidence level makes the estimate more precise. It does the opposite: a higher confidence level widens the interval, trading precision for greater certainty.
Confusing standard deviation with standard error is common. The standard deviation (s) measures spread in the raw data. The standard error (s / √n) measures spread of the sampling distribution of the mean. The CI formula uses the standard error.
Students sometimes use a z-value when they should use a t-value. If σ is unknown and you are using s, the correct distribution is t with df = n – 1, not z.
⚠️ You will almost certainly be asked to interpret a CI in words. Practise the standard phrasing: "We are [confidence level]% confident that the true [parameter] lies between [lower] and [upper]."
⚠️ Expect a question that asks what happens to the width of the CI when you change one factor (sample size, confidence level, or variability) while holding the others constant.
⚠️ Know when to use z vs. t. If the question says σ is known, use z. If it gives you s or says σ is unknown, use t with df = n – 1.
⚠️ Paired vs. independent samples: if the data are naturally linked (same subjects measured twice, matched pairs), it is a paired design. If the two groups are separate, it is independent.
True or False: A 99% confidence interval is narrower than a 95% confidence interval, all else equal.
Answer: False. Higher confidence = wider interval.
Fill in the blank: When σ is unknown, we use the ______ distribution instead of the normal distribution.
Answer: t-distribution.
True or False: Doubling the sample size cuts the margin of error in half.
Answer: False. Doubling n divides the margin of error by √2 (approximately 1.41), not by 2.
Fill in the blank: For a single-sample t-interval, the degrees of freedom equal ______.
Answer: n – 1.
True or False: A 95% CI means there is a 95% probability that the true mean lies inside your particular interval.
Answer: False. The 95% refers to the procedure's long-run capture rate, not the probability for any single interval.
Q: A sample of 36 students has a mean test score of 78 with a known population standard deviation of 12. Construct a 95% confidence interval for the population mean.
A: ME = 1.96 × (12 / √36) = 1.96 × 2 = 3.92. The 95% CI is 78 ± 3.92, which gives (74.08, 81.92).
Q: Explain what it means to say "we are 95% confident that the true mean lies between 74.08 and 81.92."
A: If we repeated the sampling process many times and constructed a 95% CI each time, approximately 95% of those intervals would contain the true population mean. This particular interval either contains it or does not.
Q: A researcher increases her confidence level from 90% to 99% while keeping sample size and standard deviation the same. What happens to the width of the CI, and why?
A: The CI becomes wider. A higher confidence level requires a larger critical value, which increases the margin of error.
Q: You have paired data (before and after measurements) for 25 subjects. The mean difference is 4.2 with a standard deviation of differences of 3.5. What formula and distribution do you use?
A: Use the paired-sample CI: d̄ ± t*(α/2, 24) × (3.5 / √25). The t-distribution with df = 24 is appropriate because σ is unknown.
Q: When should you use a z-interval rather than a t-interval?
A: Use a z-interval when the population standard deviation σ is known. In practice this is rare, so most problems use the t-interval. For very large samples the two give nearly the same result.
Confidence intervals depend on the Central Limit Theorem, which guarantees that the sampling distribution of the mean is approximately normal for large n, regardless of the population's shape. If CLT is not yet solid in your notes, review it before going deeper here.
Hypothesis testing is the mirror image of confidence intervals. A 95% CI that does not contain the null-hypothesis value corresponds to rejecting H₀ at the 0.05 significance level. Understanding CIs makes the logic of hypothesis tests far more intuitive.
Sampling distributions connect the two: the standard error (s / √n) is the standard deviation of the sampling distribution, and it sits inside every CI formula.
confidence interval, CI, margin of error, point estimate, sample mean, population mean, z-interval, t-interval, critical value, z-score, t-score, standard error, standard deviation, degrees of freedom, paired samples, independent samples, proportion CI, confidence level, alpha level, inferential statistics, interval estimation, sampling distribution, Central Limit Theorem, CLT, STAT 101, introduction to statistics, Purdue statistics