• Understand the basic concept of a confidence interval and how to interpret it
Deeper study
• Compute confidence intervals in a variety of situations
Real-world practice
• Construct and interpret confidence intervals for complex parameters
At a glance
A confidence interval is an interval estimate constructed so that, if the same sampling procedure were repeated many times, a specified proportion of the resulting intervals (the confidence level, usually 95%) would contain the fixed population parameter (Neyman 1937).
The margin of error of a 95% confidence interval is about 1.96 × the standard error — the "sampling error of ±3.1 percentage points" quoted for a poll of roughly 1,000 people is exactly this number
The width of the interval is inversely proportional to √n — quadruple the sample size and the interval becomes half as wide
It does not mean "there is a 95% probability the parameter lies in this interval"; it means "if this procedure is repeated, about 95% of the intervals will contain the true value" — the probability belongs to the procedure, not to any single interval
Building a confidence interval relies on the theory of the normal distribution
Central Limit Theorem
The theoretical foundation for building intervals from the distribution of the sample mean
Basic: What Is a Confidence Interval?
Difficulty 3/5
About 25 min
A confidence interval is a range of values that is expected to contain a population parameter. A 95% confidence interval means that if you built an interval the same way 100 times, about 95 of those intervals would contain the true parameter.
Think of a confidence interval as casting a net. A fish (the true value μ) sits perfectly still in a lake, and every time you draw a sample you throw a net (the confidence interval) at a slightly different spot. A 95% confidence interval is a way of throwing the net such that "if you throw it 100 times using this method, the fish ends up inside the net about 95 times." The most important point here: it is the net (the interval) that moves, not the fish (the true value). The true value is fixed; the interval changes each time the sample changes.
Key points
•
A range of values expected to contain the parameter
•
Certainty is expressed by the confidence level (usually 95%)
•
A narrower interval means a more precise estimate
•
Larger samples produce narrower intervals
A simple example
If you measure 100 people and find a mean height of 170 cm with a standard deviation of 5 cm, the 95% confidence interval for the population mean is about 169 to 171 cm.
Want to see it for yourself? Click the "Try this concept yourself — Confidence Interval Simulator" button at the top of this page. It throws 100 confidence intervals like nets and lets you count how many of them catch the true value.
Check your understanding
Answer:
If you construct a confidence interval the same way 100 times, about 95 of those intervals will contain the true population parameter.
Answer:
Strictly speaking, no. The population mean is a fixed number, so it is either inside a given interval (100%) or not (0%). The 95% is a property of the method used to build intervals, not of any single interval: if you repeat the method, about 95% of the intervals you produce will contain the true value.
Answer:
It shrinks by half. The width is inversely proportional to √n, so quadrupling the sample makes the estimate √4 = 2 times more precise. In other words, doubling your precision costs four times as much data collection.
At the Basic level you learned that a confidence interval is a "net for catching the true value." Now let's see how the size of that net is determined. A confidence interval is built as point estimate ± margin of error.
Why the ±? By the central limit theorem, the sample mean x̄ scatters around the true value μ in a symmetric, bell-shaped pattern. So we center the interval on x̄ and add and subtract the same width on both sides.
Why divide by √n? When you average several values, their random errors partially cancel out, so the wobble of the sample mean (its standard error) is σ/√n — smaller than the standard deviation σ of the individual data points. This is why quadrupling the sample halves the interval width.
Margin of error = critical value × standard error. If the population variance is known you use a critical value from the Z (standard normal) distribution; if it is unknown, you use the t distribution.
Mathematical formula
x̄ is the sample mean, z is the Z critical value, t is the t critical value, σ is the population standard deviation, s is the sample standard deviation, and n is the sample size. The t critical value depends on the degrees of freedom (n−1); for example, with n=25 you have 24 degrees of freedom and t₀.₀₂₅ = 2.064.
The 95% confidence interval is [115.9, 124.1] hours. This does not mean "there is a 95% chance the population mean is in this interval." It means that if you repeated the study the same way, about 95% of the intervals you produced would contain the true mean lifetime. (Note: 2.064 is the upper 2.5% point of the t distribution with 24 degrees of freedom.)
When the population standard deviation is unknown and the sample is small (n=25), use the t distribution. Using the Z critical value 1.96 on the same data gives a narrower interval, [116.1, 123.9], which overstates your precision. The smaller the sample, the larger the t critical value — and the wider interval that results is the honest representation of your uncertainty.
The 95% confidence interval for the candidate's support is [48.9%, 55.1%]. Because the interval straddles 50%, this poll alone cannot establish that the candidate has a majority. The "sampling error of ±3.1 percentage points (95% confidence level)" you see in news reports is exactly the margin of error of this interval.
If the gap between two candidates is within the margin of error (±3.1 points), the race should be described as "a statistical tie." The standard error of a proportion, √(p̂(1−p̂)/n), is largest near p̂=0.5, so the closer the race, the harder it is to call with the same sample size.
Common mistakes
Mistake:
Interpreting the confidence interval as a probability statement about the parameter
Why is it wrong?
Saying "the parameter is in this interval with 95% probability" is incorrect. The parameter is a fixed value; it is the confidence interval that is the random variable
Correct approach:
Interpret it as: "if I construct confidence intervals this way 100 times, about 95 of them will contain the true parameter."
Mistake:
Confusing when to use the Z distribution versus the t distribution
Why is it wrong?
The Z distribution applies when the population variance is known and the t distribution when it is unknown; failing to distinguish the two produces an inaccurate interval
Correct approach:
The population variance is almost never known, so in practice use the t distribution by default, and consider the Z approximation only when the sample is large enough (n≥30).
Mistake:
Misunderstanding the relationship between sample size and confidence level
Why is it wrong?
People assume that a larger sample automatically raises the confidence level, or that a higher confidence level always means better accuracy
Correct approach:
A larger sample makes the interval narrower (higher precision); a higher confidence level makes the interval wider. You need to understand the trade-off between the two.
Mistake:
Building a confidence interval without checking the normality assumption
Why is it wrong?
If the data do not follow a normal distribution, the classical confidence interval formula can be inaccurate
Correct approach:
Check normality with a histogram, Q-Q plot, or Shapiro-Wilk test, and if it is violated consider a bootstrap interval or a transformation.
Mistake:
Mixing up one-sided and two-sided critical values
Why is it wrong?
A 95% confidence interval requires α/2 = 0.025; using α = 0.05 gives the wrong interval
Correct approach:
A two-sided interval cuts off α/2 from each tail, so for a 95% confidence interval use Z₀.₀₂₅ = 1.96.
You learned what a confidence interval means at the Basic level and how to compute one at the Intermediate level. Now we look at how it is actually used to make decisions. In practice, confidence intervals go far beyond a simple calculation — they are a core tool of business decision-making. They connect to more advanced techniques: understanding how they differ from Bayesian credible intervals, estimating effect sizes in meta-analysis, and power analysis in experimental design. Nonparametric methods such as the bootstrap offer a robust alternative when distributional assumptions are violated, and Bayesian approaches allow more flexible uncertainty quantification that incorporates prior information.
Real-world applications
Manufacturing / Quality Control
Setting product quality standards and controlling processes
Example:
Assessing mean lifetime and variability in durability tests of automotive parts
Why it matters:
Setting quality standards, forecasting defect rates, improving customer satisfaction, and minimizing recall risk to reduce the cost of quality
Finance / Risk Management
Computing Value at Risk (VaR) and assessing portfolio risk
Example:
Evaluating the potential daily loss of an investment portfolio and its credit risk
Why it matters:
Meeting regulatory capital requirements, strengthening investor confidence, and improving risk-adjusted return (RAROC) for a competitive edge
Digital Marketing / A/B Testing
Improving conversion rates and measuring campaign effectiveness
Example:
Quantifying the effect of a website UI change on purchase conversion rate
Why it matters:
Higher marketing ROI, faster decisions, and increased revenue through more accurate personalized recommendation systems
Healthcare / Clinical Research
Drug development and evaluation of treatment effects
Example:
Evaluating COVID-19 vaccine efficacy and monitoring safety
Why it matters:
Shorter development timelines, patient safety, and a higher probability of regulatory approval, making development spending more efficient
Case study: A Global E-Commerce Company's Delivery-Time Improvement Project
Background
Note: The scenario below is fictional and created for learning purposes; the figures are not real company data.
A global e-commerce company wants to quantify the effect of faster delivery on customer satisfaction. As competition intensifies, delivery speed has become a key factor in customers' choices, and the company needs scientific evidence of the return on its investment in a new logistics system.
The problem
Delivery times under the existing logistics system fall short of customer expectations, and the company lags competitors on speed. The company needs to measure objectively how much the new logistics system actually improves delivery times and to verify whether the improvement is statistically significant.
The data
Old system: mean delivery time 3.2 days (standard deviation 1.5 days). New logistics system: mean 2.8 days (standard deviation 1.2 days). Samples of 10,000 shipments per group. The data were stratified across 16 regions nationwide, split into urban and rural areas, and broken down by product category (electronics, apparel, household goods).
Method
An independent-samples t-test to build a 95% confidence interval for the difference in delivery time; stratified analysis by region and product category to measure detailed effects; bootstrap methods to correct for non-normality and produce robust intervals. Time-series analysis was run in parallel to remove seasonal effects.
Solution and results
Overall reduction in delivery time: 0.4 days ± 0.04 days [95% CI: 0.36, 0.44 days]
By region: 0.5-day reduction in urban areas, 0.3 days in rural areas
By product category: electronics 0.6 days, apparel 0.4 days, household goods 0.2 days
Statistical significance: t = 20.8, p < 0.001 — a highly significant improvement
A statistically significant improvement was confirmed, and the entire confidence interval sits clearly above zero (at least 0.36 days), so the company can conclude that the reduction is "real, not chance." This translates into higher customer satisfaction and repeat-order rates and fewer delivery complaints, strengthening the company's competitive position.
Conclusion:
Quantitative analysis with confidence intervals provided scientific proof of the logistics investment's effect and a basis for deciding to expand it. Because the improvement was demonstrated at the 95% confidence level, the analysis became the justification for approving a company-wide logistics upgrade.
[Try it yourself] What if each sample in this case had been 100 shipments instead of 10,000? Plug n=100 into the standard error formula √(s₁²/n₁ + s₂²/n₂) and the 95% confidence interval widens dramatically to about [0.02, 0.78] days — making it hard to claim the 0.4-day reduction with confidence. Work through the calculation and see for yourself how sample size changes the level of confidence behind a decision.
References
Neyman, J. (1937), "Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability", Philosophical Transactions of the Royal Society A 236, 333–380 — the original paper introducing confidence intervals
Student [W. S. Gosset] (1908), "The Probable Error of a Mean", Biometrika 6(1), 1–25 — the origin of the t distribution used for small-sample inference
Brown, L. D., Cai, T. T. & DasGupta, A. (2001), "Interval Estimation for a Binomial Proportion", Statistical Science 16(2), 101–133 — a comparison of confidence interval methods for proportions
Efron, B. (1979), "Bootstrap Methods: Another Look at the Jackknife", The Annals of Statistics 7(1), 1–26 — the original paper on bootstrap confidence intervals
NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.2 — Confidence Limits for the Mean (the t-based confidence interval formula used at the Intermediate level)