Skip to main content
Albero Academy

Confidence Intervals

Report estimates with honest uncertainty — what a confidence interval is, how to build one, and what "95% confident" actually means.

Chapter 12Statistics14 min readBeginner friendly
  • #Statistics
  • #Confidence Intervals
  • #Estimation

A single estimate ("average package is ₹7.2 LPA") hides its uncertainty. A confidence interval reports a plausible range for the true value ("₹6.8–7.6 LPA, 95% confident"), which is far more honest and useful. It's built directly on the standard error from the last chapter.

A range, not a point

Because a sample only estimates the population, the point estimate is almost never exactly right. A confidence interval surrounds it with a margin of error, acknowledging that uncertainty.

Building an interval

a 95% CI for a mean
# estimate ± (critical value × standard error)
margin = 1.96 * (sample_std / (n ** 0.5)) # 1.96 ≈ 95% for a normal
ci_low = sample_mean - margin
ci_high = sample_mean + margin
# In practice:
from scipy import stats
stats.t.interval(0.95, n-1, loc=sample_mean, scale=stats.sem(data))

What 95% actually means

What changes the width

  • Sample size — more data → smaller standard error → a narrower, more precise interval.
  • Confidence level — 99% is wider than 95% (more certainty demands a bigger net).
  • Variability — noisier data → wider intervals.

Practice

Compute a 95% confidence interval for a sample mean by hand (estimate ± 1.96·SE) and with scipy.stats. Then recompute at 99% and note it's wider, and with a larger sample and note it's narrower. Write the interval in a sentence a non-statistician would understand.

Key takeaways

  1. 01A confidence interval reports a plausible range for the true value, not a single point.
  2. 02Build it as estimate ± (critical value × standard error) — ~1.96·SE for 95%.
  3. 03"95% confidence" means 95% of such intervals would contain the truth — not 95% probability for this one.
  4. 04Intervals narrow with more data, widen with higher confidence levels and noisier data.
  5. 05Reporting an interval is more honest and useful than a bare point estimate.