Skip to content
tezvyn:

Confidence Interval: Quantifying Uncertainty in Your Estimates

Source: Wikipedia: Confidence intervalMediumHow cards are made

Confidence Interval: Quantifying Uncertainty in Your Estimates

A confidence interval puts error bars around a measurement, showing the plausible range for a true value. It's used in A/B tests to report not just a winner, but the range of its likely impact.

The mental model

A confidence interval (CI) quantifies the uncertainty around an estimate. Instead of giving a single number (a point estimate) like "average user session is 10 minutes," a CI provides a range, such as "we are 95% confident the true average user session is between 8 and 12 minutes." It acknowledges that your measurement, based on a sample, is probably not the exact true value for the entire population. The CI gives you a plausible range for that true value.

How it works

You start with a sample from a larger population, like 1,000 user visits out of millions. You calculate a statistic from that sample, like the average time on page. Then, using properties of the sample (like its size and standard deviation), you construct a range around that statistic. The "confidence level," typically 95%, is a property of the procedure. It means that if you were to repeat the sampling process many times, 95% of the confidence intervals you calculate would contain the true population parameter.

When to use it

Confidence intervals are essential whenever you report a metric calculated from a sample, not the entire population. This is common in three areas: first, in A/B testing to determine if a change had a statistically significant effect and to understand the magnitude of that effect; second, in political polling or market research surveys to report results with a margin of error; third, in performance monitoring when you sample system metrics like latency instead of recording every single request.

The footgun

The most common misinterpretation is thinking a 95% CI means there is a 95% probability that the true population parameter lies within this specific interval. This is incorrect from a frequentist perspective. The 95% refers to the long-run success rate of the method used to create the intervals. Imagine 100 different teams running the same experiment; the method ensures that about 95 of their calculated CIs will capture the true value. Your specific interval either contains the true value or it doesn't.

One canonical example

An A/B test shows a new checkout button (Variant B) has a 5.5% conversion rate, while the old button (Variant A) has 5.0%. The point estimate is a +0.5% lift. A confidence interval might state: "We are 95% confident that the true lift for Variant B is between +0.1% and +0.9%." This tells you not only that the effect is positive (the interval is entirely above zero) but also gives a plausible range for how big the improvement really is.

Interview question

When interpreting a 95% confidence interval for a population parameter, which statement accurately describes the meaning of "95% confidence"?

  • a.If the sampling process were repeated many times, 95% of the resulting intervals would contain the true population parameter.Correct
  • b.95% of the individual data points in the sample are located within this interval.
  • c.The point estimate is 95% accurate, implying a small margin of error around it.
  • d.There is a 95% probability that the true population parameter falls within this specific interval.
Why?

The 95% confidence level refers to the reliability of the method: if you were to repeat the sampling and interval construction many times, 95% of those intervals would capture the true population parameter. Option D is a common misinterpretation, as a specific interval either contains the true value or it doesn't; the 95% does not refer to the probability of the true value being in that single interval.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on statistics — each one lists the topics its interview covers.

See open roles