Skip to content
CoursesLog in
← Statistics glossary

confidence interval (CI)

A range of plausible values for a parameter; a 95% CI is built by a method that captures the true value in 95% of repeated samples.

A confidence interval gives a range of plausible values for something you can't observe directly, such as the true average order value or the true lift of a variant, instead of a single estimate. Most intervals you'll meet have the same shape: estimate ± critical value × standard error. For a mean:

xˉ±z⋅sn,z≈1.96 for 95%\bar x \pm z \cdot \frac{s}{\sqrt{n}}, \qquad z \approx 1.96 \text{ for 95\%}

The "± critical value × SE" part is the margin of error.

The correct interpretation is about the method, not about one particular interval. If you repeated the sampling many times and built an interval the same way each time, about 95% of those intervals would contain the true value. Any single interval you've already computed either contains it or doesn't; you just don't know which. In everyday speech "we're 95% confident the true AOV is between $48 and $52" is fine, as long as you remember the 95% describes the procedure. A statement like "95% probability the value lies here" belongs to Bayesian credible intervals.

Three levers control the width. More variability in the data makes it wider. A larger sample makes it narrower, but only with n\sqrt{n}: quadrupling the sample halves the width. A higher confidence level (99% instead of 95%) makes it wider.

Confidence intervals and significance tests tell the same story from two angles: a 95% interval for a difference that excludes zero corresponds to a two-sided test that is significant at α = 0.05. The interval tells you more, though. It shows how big the effect could plausibly be, which lets you compare it with a practical threshold.

Example

A single mean. Last week CatChow had 225 orders with an average of $50.00 and a standard deviation of $15.00.

  1. Standard error: SE = \frac{15.00}{\sqrt{225}} = \frac{15.00}{15} = \1.00$.
  2. Margin of error at 95%: 1.96 \times 1.00 = \1.96$.
  3. Interval: 50.00±1.9650.00 \pm 1.96, i.e. $48.04 to $51.96.

If next week's average comes in at $49.50, that's inside the range and not evidence that anything dropped.

A difference in conversion rates. The checkout redesign test had 52 of 1,000 users converting in control (5.2%) and 68 of 1,000 in treatment (6.8%), a gap of 1.6 pp.

  1. Standard error of the difference: SE=0.052×0.9481000+0.068×0.9321000=0.0001127≈0.0106SE = \sqrt{\frac{0.052 \times 0.948}{1000} + \frac{0.068 \times 0.932}{1000}} = \sqrt{0.0001127} \approx 0.0106.
  2. Margin of error: 1.96×0.0106≈0.02081.96 \times 0.0106 \approx 0.0208.
  3. Interval: 0.016±0.02080.016 \pm 0.0208, i.e. −0.5 to +3.7 pp.

The interval includes zero, which matches the non-significant test (p ≈ 0.13). But it also includes lifts of +3 pp and more, so a big win hasn't been ruled out either. The right call is "not enough data yet", not "the redesign doesn't work".

Common mistakes

  • "There's a 95% probability the true value is in this interval." For an interval you've already computed, the 95% describes the method's long-run hit rate, not this one interval.
  • Reading a CI for the mean as a range for individual customers. "$48.04–$51.96" is about the average order; individual orders vary far more (that's what the standard deviation describes).
  • Judging a difference by whether two intervals overlap. Overlapping 95% CIs can still hide a significant difference. Build the interval for the difference itself.
  • Forgetting the sample has to be random. A biased sample, such as only app users or only one promo week, gives a neat, narrow interval around the wrong value.
  • Dropping the interval from the dashboard. A bare "$50.00" invites people to chase noise; show the range, or at least the margin of error.

Learn it in the course