Bell Statistics

What is a confidence interval?

A confidence interval is a range of values that is consistent with your data, computed so that intervals built this way capture the true value a stated share of the time — usually 95%. It reports how precisely you have measured something, which a single estimate cannot.

Notation
CI
Also called
CI, interval estimate, 95% confidence interval
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

Any measurement taken from a sample is wrong by some amount, and the interesting question is by how much. A confidence interval answers that. Instead of reporting "the new flow lifted conversion by 7.4%", it reports "by somewhere between 1.4% and 13.5%" — and that second statement is the one a business can act on, because it makes the uncertainty visible instead of burying it behind a decimal point.

The 95% is a statement about the *procedure*, not about the particular interval on your screen. If you repeated the experiment many times and built an interval each time the same way, about 95 of every 100 would contain the true value. Any single interval either does or does not; there is no probability left in it once the data are in. This is the distinction people find least intuitive and it has a practical payoff: it is why you cannot say "there is a 95% chance the lift is between 1.4% and 13.5%", and why a Bayesian credible interval — which does support that sentence — is a different object with different assumptions.

Three quantities set the width, and they are the same three that set statistical power. Variability in the outcome widens it. Sample size narrows it, at the square root — four times the users to halve the width. And the confidence level trades width for coverage: a 99% interval is about 32% wider than a 95% one. Nothing else is available. An interval that is too wide to support a decision is telling you the experiment was too small, and no amount of re-analysis will fix that.

The relationship to significance testing is exact rather than approximate. A 95% interval on a difference excludes zero precisely when the two-sided p-value is below 0.05 — they are the same arithmetic presented two ways. Which is why reporting the interval strictly dominates reporting the p-value: it carries the significance verdict for free and adds the magnitude, which the p-value throws away. Our argument for making that the house standard is in how to properly report A/B testing results.

The habit worth building is to read the interval against a threshold rather than against zero. Draw the smallest effect you would ship — the minimum detectable effect you designed against — and see where it falls. An interval entirely above it is a ship decision. Entirely below it is a genuine no, and a much stronger statement than a non-significant p-value. Straddling it means the experiment did not resolve the question, which is a third outcome most reporting templates have no room for and most decisions badly need.

The formula

Almost every interval you will meet has the same shape: the estimate, plus and minus a critical value times its standard error. What changes between methods is which distribution supplies the critical value, and whether the symmetric form is valid at all.

General form
CI = estimate ± z₁₋α/₂ · SE(estimate)

z₁₋α/₂ = 1.960 for 95%, 1.645 for 90%, 2.576 for 99%. Small samples of a mean use the t quantile on n − 1 degrees of freedom instead.

Difference in two proportions
(p̂₁ − p̂₂) ± z₁₋α/₂ · √( p̂₁(1−p̂₁)/n₁ + p̂₂(1−p̂₂)/n₂ )

The standard A/B testing interval on an absolute difference in conversion rates.

Difference in two means (Welch)
(x̄₁ − x̄₂) ± t₁₋α/₂,ν · √( s₁²/n₁ + s₂²/n₂ )

ν is the Welch-Satterthwaite degrees of freedom. Welch rather than Student because equal variances are an assumption you rarely have grounds for — see the two-sample t-test calculator.

A single proportion (Wilson)
( p̂ + z²/2n ± z·√( p̂(1−p̂)/n + z²/4n² ) ) / ( 1 + z²/n )

Not the textbook p̂ ± z·√(p̂(1−p̂)/n), which fails badly for rare events and can run below zero. The proportion confidence interval calculator uses Wilson for that reason.

Worked example

The checkout test from earlier: control converts 2,150 of 50,000 sessions (4.30%), variant 2,310 of 50,000 (4.62%). The p-value was 0.0147, so the result is significant. Product said before the test that they would only ship a lift of 5% relative or more, which at this baseline means 0.215 percentage points.

Observed difference
0.32 percentage points
Standard error
0.00131
Critical value (95%)
1.960
Margin of error
0.26 percentage points
Ship threshold
0.215 percentage points

95% CI: 0.06 to 0.58 percentage points absolute, which is 1.4% to 13.5% relative. The interval excludes zero, matching p = 0.0147.

The interval crosses the ship threshold rather than clearing it. Everything from a 1.4% lift — well below what product said was worth shipping — to a 13.5% one is consistent with this data. So the honest summary is not "the variant won" but "the variant is better, and we do not yet know whether it is better enough." That is a materially different conversation, and it is invisible in a report that says only p = 0.015. Doubling the sample would roughly halve the width and resolve it; shipping on the point estimate risks banking a 7.4% lift that turns out to be 2%.

Common misconceptions

There is a 95% probability the true value lies inside this interval.
The 95% describes the method, not this interval. Across many repetitions, 95% of intervals built this way capture the truth; the one in front of you either does or does not. The statement people want to make is a credible interval, which comes from Bayesian analysis and requires a prior. In practice the distinction rarely changes a decision, but it does change what you are entitled to write down.
The two arms' intervals overlap, so the difference is not significant.
Overlapping intervals on two separate estimates do not imply a non-significant difference — intervals can overlap by up to about 29% of their length and the difference still clear p < 0.05. The overlap heuristic is a common way to declare an inconclusive result that is actually significant. Compute the interval on the *difference* itself, which is the quantity you care about anyway.
A wide interval means the analysis was done badly.
It almost always means the sample was too small for the variability in the metric, which is a design fact rather than an analysis fault. The interval is doing its job by refusing to overstate precision. The response is more data, less variance or a smaller claim — not a different estimator.
The true value is most likely near the middle of the interval.
The centre is the point estimate and is the single most likely value under the model, but the interval is not a probability distribution and the edges are not near-impossible. Reading only the midpoint reinstates exactly the false precision the interval exists to remove — and in an underpowered test the midpoint is biased away from zero, so it is the least trustworthy number on the line.

Frequently asked questions

Should I use a 95% or a 99% confidence interval?
95% unless the decision is unusually costly to get wrong. A 99% interval is about 32% wider at the same sample size, so it buys certainty with precision and will more often leave you unable to distinguish a real effect from nothing. The level should match the significance level of the accompanying test — a 95% interval pairs with a 5% two-sided test — so switching one and not the other produces a report that contradicts itself.
How do I get a narrower confidence interval?
Three levers only. Collect more data, which narrows it at the square root, so four times the sample halves the width. Reduce the variance of the metric, through variance reduction techniques, a less volatile primary metric, or trimming extreme values. Or accept a lower confidence level, which is a real trade rather than a free win. If none of those are available, the interval is telling you the honest answer, which is that this experiment cannot resolve the question.
My interval includes zero. Does that mean there is no effect?
It means zero is among the values consistent with your data, not that it is the most likely one. Look at the other end: if the interval runs from -1% to +12%, you have not shown there is no effect, you have shown the experiment could not tell. If it runs from -0.3% to +0.4%, you have genuinely ruled out anything worth having, which is a strong and useful finding. Same verdict on significance, opposite business conclusion.
Should I report the interval in absolute or relative terms?
Report both, and be explicit about which is which. Absolute percentage points are what the arithmetic produces and what compounds across surfaces; relative percentages are what stakeholders remember and what business cases are written in. Confusing the two is a recurring source of overstated results — a move from 4.0% to 4.2% is 0.2 percentage points and a 5% relative lift, and those two sentences describe the same thing to very different effect.

Related terms

  • Effect size

    How big the difference is — the number a p-value throws away and a business case runs on.

  • P-value

    How surprising your data would be if there were no effect — and the four things it is constantly mistaken for.

  • Standard error

    How much your estimate would move if you ran the study again — precision, not spread.

  • Statistical power

    The probability your test finds a real effect — and why most tests that report nothing were never able to.

  • Statistical significance

    A verdict about evidence, not about importance — and the difference is where most bad decisions live.

  • Type II error

    The false negative — invisible by nature, which is why nobody counts how many good ideas it kills.

Calculate it

  • Proportion confidence interval

    A defensible interval around one rate — Wilson, Agresti-Coull, Jeffreys and Clopper-Pearson, side by side.

  • Two-sample t-test

    Compare the average of two independent groups — plan the sample size, then test the result.

  • A/B test sample size

    Size a two-proportion experiment before you launch, then read the lift and its interval once it lands.

  • Correlation test

    Pearson r or Spearman rho, with the Fisher-z interval that says how little a small sample knows.

Knowing the term is the easy part

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.