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
# estimate ± (critical value × standard error)margin = 1.96 * (sample_std / (n ** 0.5)) # 1.96 ≈ 95% for a normalci_low = sample_mean - marginci_high = sample_mean + margin# In practice:from scipy import statsstats.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
- 01A confidence interval reports a plausible range for the true value, not a single point.
- 02Build it as estimate ± (critical value × standard error) — ~1.96·SE for 95%.
- 03"95% confidence" means 95% of such intervals would contain the truth — not 95% probability for this one.
- 04Intervals narrow with more data, widen with higher confidence levels and noisier data.
- 05Reporting an interval is more honest and useful than a bare point estimate.
