Skip to content
IT glossary
Data and MLUpdated December 3, 2026

Confidence interval

Доверительный интервал

A confidence interval is a range calculated from a sample to show how precise an estimate is. A 95% confidence level means that, over many repetitions, the same method would produce intervals that contain the true value about 95% of the time.

Why report a range?

Suppose a support team samples customer tickets and estimates an average wait of 12 minutes. A different sample would give a different average. Reporting a confidence interval of 11–13 minutes tells readers more about the precision of that estimate than the average alone. The range is about the overall mean wait, not about how long most customers waited.

What 95% confidence means

Imagine repeating the entire sampling process and calculating a fresh interval each time. If the method's assumptions hold, about 95 out of every 100 intervals would contain the true mean in the long run. This property is called coverage. The true mean is fixed; the intervals vary with the samples. Once you've calculated a particular interval, the 95% describes the procedure that produced it, not the probability that this particular range contains the mean.

How the endpoints are calculated

Many familiar intervals take the form estimate ± critical value × standard error. The standard error measures how much the estimate varies from sample to sample. It is not the standard deviation of the individual observations. For a mean calculated from independent observations drawn from a normal distribution with unknown variance, the standard error is estimated as s / √n, where s is the sample standard deviation and n is the sample size. The critical value comes from Student's t distribution with n − 1 degrees of freedom. Holding the other factors fixed, more observations make the interval narrower, while a higher confidence level makes it wider. Not every interval uses this symmetric formula: the Wilson interval is one option for a proportion.

An A/B test example

A redesigned checkout shows an estimated lift of 0.8 percentage points, with a 95% confidence interval from −0.2 to +1.8 points. Since the interval includes zero, the corresponding two-sided hypothesis test would not reject zero lift at the 5% significance level. That does not establish that the redesign has no effect. The data are compatible with a slight drop as well as a useful improvement. If rollout requires a lift of at least 1 percentage point, this result does not establish that the redesign meets that threshold.

Common interview questions

  • Can the difference be statistically significant if the two groups' 95% intervals overlap? Yes. Calculate an interval for the difference itself rather than using overlap as a test. If the groups are paired, the calculation should account for that pairing.
  • Will collecting more data fix a bad sample? No. More data can reduce sampling uncertainty without fixing selection bias. Thousands of responses from paying users won't necessarily tell you what all users think.
  • What if you need a range for the next customer's wait? Use a prediction interval, not a confidence interval for the mean. A prediction interval also accounts for how much individual waits vary.