Confidence Intervals Explained: What They Actually Mean
A confidence interval gives you a range of plausible values for an unknown population parameter based on sample data. It is one of the most widely used concepts in inferential statistics, appearing in medical research, opinion polls, quality control, and virtually every field that relies on data. Despite its ubiquity, it is also one of the most commonly misunderstood ideas in statistics, so getting the interpretation right matters.
What a Confidence Interval Actually Means
A 95% confidence interval does not mean there is a 95% probability that the true parameter lies within the interval. The true parameter is a fixed (though unknown) number; it either is inside the interval or it is not. What 95% confidence means is this: if you were to repeat the sampling process many times and construct an interval each time using the same method, approximately 95% of those intervals would contain the true parameter. The confidence level describes the reliability of the procedure, not the probability attached to any single interval.
This distinction is subtle but important. Bayesian credible intervals do allow a probability statement about the parameter, but frequentist confidence intervals, which are what most introductory courses teach, do not.
The General Formula
The most common confidence interval for a population mean when the population standard deviation is known takes the form:
where:
- is the sample mean.
- is the critical value from the standard normal distribution corresponding to the chosen confidence level (e.g. 1.96 for 95%).
- is the population standard deviation.
- is the sample size.
The quantity is called the margin of error. It controls how wide the interval is.
Z-Intervals vs T-Intervals
The formula above uses the z-distribution (standard normal). This is appropriate when:
- The population standard deviation is known.
- The sample size is large (typically ), so the Central Limit Theorem ensures the sampling distribution of the mean is approximately normal.
When is unknown and the sample is small, you replace the z-critical value with a t-critical value and use the sample standard deviation in place of :
The t-distribution has heavier tails than the normal distribution, which makes the interval wider and accounts for the extra uncertainty from estimating with . As grows, the t-distribution approaches the standard normal, and the two methods converge.
Choosing a Confidence Level
The most common confidence levels are 90%, 95%, and 99%. Here are the corresponding z-critical values:
- 90%:
- 95%:
- 99%:
Higher confidence means a wider interval. There is always a trade-off between confidence and precision. A 99% interval is more likely to capture the true value, but it provides a less precise estimate. In practice, 95% is the standard unless the context demands otherwise (e.g. safety-critical applications may use 99%).
Margin of Error and Sample Size
The margin of error shrinks as the sample size increases. Specifically, it is inversely proportional to . This means:
- To halve the margin of error, you need to quadruple the sample size.
- Doubling the sample size reduces the margin of error by a factor of .
If you want to determine the sample size needed for a specific margin of error, rearrange the formula:
Always round up to the next whole number, since you cannot survey a fraction of a person.
Try it yourself
Use our Sample Size Calculator to find exactly how many observations you need for your desired margin of error and confidence level.
Worked Example 1: Mean with Known Standard Deviation
A factory produces bolts with a known population standard deviation of mm for the diameter. A random sample of 50 bolts has a mean diameter of mm. Construct a 95% confidence interval for the true mean diameter.
Step 1. Identify the values:
- (for 95%)
Step 2. Calculate the standard error:
Step 3. Calculate the margin of error:
Step 4. Construct the interval:
We are 95% confident that the true mean bolt diameter lies between 10.009 mm and 10.031 mm.
Try it yourself
Use our Confidence Interval Calculator to compute confidence intervals for means and proportions instantly.
Worked Example 2: Proportion
In a survey of 400 voters, 224 said they support a particular policy. Construct a 95% confidence interval for the true proportion of supporters.
Step 1. Calculate the sample proportion:
Step 2. The confidence interval for a proportion uses:
Step 3. Calculate the standard error:
Step 4. Margin of error:
Step 5. Construct the interval:
We are 95% confident that between 51.1% and 60.9% of the population supports the policy.
Worked Example 3: Small Sample with T-Distribution
A researcher measures the reaction times (in milliseconds) of 12 participants: 245, 262, 258, 271, 249, 253, 266, 259, 247, 270, 255, 261. Construct a 95% confidence interval for the mean reaction time.
Step 1. Calculate the sample statistics:
Computing the sample standard deviation:
Step 2. Find the t-critical value. With degrees of freedom and 95% confidence:
Step 3. Standard error:
Step 4. Margin of error:
Step 5. Confidence interval:
We are 95% confident that the true mean reaction time is between 252.7 ms and 263.3 ms. Notice the interval is wider than a z-interval would produce because the t-distribution accounts for the extra uncertainty from the small sample.
Assumptions and Conditions
For a confidence interval to be valid, certain conditions should hold:
- Random sampling. The data must be collected through a random process. Convenience samples can produce misleading intervals.
- Independence. Each observation should be independent of the others. For sampling without replacement, the sample should be no more than 10% of the population (the 10% condition).
- Normality or large sample. For means, the population should be approximately normal, or the sample size should be large enough (usually ) for the Central Limit Theorem to apply. For proportions, the success-failure condition requires and .
Interpreting Width: What Makes an Interval Narrow or Wide?
Three factors control the width of a confidence interval:
- Confidence level. Higher confidence (e.g. 99% vs 95%) produces a wider interval.
- Sample size. Larger produces a narrower interval, because the standard error decreases.
- Variability. Greater population variability (larger or ) produces a wider interval.
Of these, sample size is the factor you typically have the most control over when designing a study.
Try it yourself
Explore how z-scores relate to confidence levels with our Z-Score Calculator.
Common Misinterpretations
- “There is a 95% chance the true mean is in this interval.” Incorrect. The true mean is fixed. The interval either contains it or does not. The 95% refers to the long-run success rate of the method.
- “95% of the data falls in this interval.” Incorrect. A confidence interval estimates a parameter (like the mean), not the range of individual data values. A prediction interval would address that.
- “If I repeat the experiment and get the same interval, it still has 95% probability.” Each interval is fixed once calculated. The 95% applies to the process of constructing intervals, not to any particular one.
Frequently Asked Questions
When should I use a z-interval instead of a t-interval?
Use a z-interval when the population standard deviation is known (rare in practice) or when the sample size is very large (say ), at which point the t and z values are virtually identical. In most real-world scenarios with small to moderate samples, a t-interval is the safer choice.
What does “95% confident” really mean?
It means that 95% of all confidence intervals constructed using this method (from repeated random samples) will contain the true population parameter. It is a statement about the procedure, not about the probability that any single interval is correct.
How do I reduce the width of a confidence interval?
Increase the sample size, lower the confidence level (e.g. from 99% to 95%), or reduce variability in the data (though the last option is often not under your control). The most practical approach is usually to increase the sample size.
Can I construct a confidence interval for any statistic?
In principle, yes. There are confidence intervals for means, proportions, differences of means, regression coefficients, medians, variance, and more. The formula and distribution used vary depending on the statistic. For statistics without a convenient formula, bootstrap methods can be used to construct approximate confidence intervals.
What is the difference between a confidence interval and a prediction interval?
A confidence interval estimates a population parameter (e.g. the mean). A prediction interval gives a range for a single future observation. Prediction intervals are always wider because they must account for both the uncertainty in estimating the mean and the natural variability of individual observations.
Try it yourself
Ready to compute? Use our Confidence Interval Calculator for instant results, or determine the right sample size with our Sample Size Calculator.
Related Articles
P-Value Explained: What It Means and How to Calculate It
Understand what p-values really mean, how to calculate them from z-scores and t-scores, significance levels, and the most common misconceptions researchers make.
Understanding Z-Scores and Normal Distribution
Learn what z-scores mean, how the bell curve works, and how to use z-score tables. Includes worked examples and links to our standard deviation calculator.
Understanding Eigenvalues and Eigenvectors: A Practical Guide
Learn what eigenvalues and eigenvectors are, how to compute them for 2x2 and 3x3 matrices, and why they matter in data science and engineering.