Introduction to Confidence Intervals
TL;DR
Confidence intervals give us a range of values that likely contains the true population parameter we're trying to estimate. It's a way to express the uncertainty around our sample's estimate, instead of just a single number. We use a specific confidence level, like 95%, to quantify how "sure" we are that the interval captures the true value.
1. The Mental Model
Imagine trying to guess the average number of hours all students in your university sleep each night by asking only 50 students. You'll get an average from those 50, but it's probably not the exact average for all students. A confidence interval is like drawing a net around your sample's average, giving you a range where you're pretty sure the true university-wide average actually lies.
2. The Core Material
When we take a sample from a larger population, we calculate things like the sample mean ($\bar{x}$) or sample proportion ($\hat{p}$). These are our point estimates for the true population mean ($\mu$) or population proportion ($p$). However, a single point estimate rarely hits the true population parameter exactly. That's where confidence intervals come in.
A confidence interval (CI) provides an estimated range of values which is likely to include an unknown population parameter. It's usually expressed with a confidence level, for example, a "95% confidence interval."
Understanding Confidence Level

Photo by Max Fischer on Pexels
The confidence level (e.g., 90%, 95%, 99%) tells you the probability that if you were to take many, many samples and construct an interval for each, a certain percentage of those intervals would contain the true population parameter. It does not mean there's a 95% chance the specific interval you calculated contains the population parameter. Once an interval is calculated, the parameter is either in it or it isn't; the probability refers to the method, not the single interval.
Components of a Confidence Interval
![Detailed view of robotic wheels and motors on a workshop table, showcas