Confidence interval for a proportion
📐FORMULA
$$\hat{p} ;\pm; 1.96,\sqrt{\frac{\hat{p},(1-\hat{p})}{n}}$$
- p̂: the observed proportion
- n: the sample size
- 1.96: the point on the standard normal curve that leaves 2.5 percent in each tail, giving a 95 percent interval (1.645 for 90 percent, 2.576 for 99 percent)
- the square root is the 📐 Standard error of a proportion
This is the plain normal-approximation interval, often called the Wald interval. What the 95 percent does and does not mean is in 🔤 Confidence interval, with my old wrong sentence crossed out.
When not to use it
- Small samples, or p̂ near 0 or 1. The rule of thumb from 🎓 Lecture 6 - Confidence intervals: both n × p̂ and n × (1 − p̂) should be at least 10. Below that the interval is too narrow and can run past 0 or 1, which is a proportion telling you it has been mistreated. Use the Wilson score interval there.
- Zero successes. The formula returns a width of nothing, which is certainty from no evidence.
- Observations that are not independent. Ten loads from one carrier are not ten carriers.
I do not type this any more. It is the six lines in Confidence interval for a proportion, pasted into every analysis since March.
Worked example
The same 214 dispatchers as in the standard error note, 62 percent:
- Standard error: √(0.62 × 0.38 / 214) ≈ 0.0332
- Margin: 1.96 × 0.0332 ≈ 0.065
- Interval: 0.62 − 0.065 to 0.62 + 0.065, so 0.555 to 0.685
Said aloud: about 62 percent, somewhere between 55 and 69. Check: 214 × 0.62 ≈ 133 and 214 × 0.38 ≈ 81, both far above 10, so the approximation is fine.
And where it breaks. A carrier with 6 loads, 5 on time: p̂ = 0.83, margin 1.96 × √(0.83 × 0.17 / 6) ≈ 0.30, giving 0.53 to 1.13. An on-time rate of 113 percent. That is the case the Carrier Scorecards work has to handle, and why small carriers get a different interval and a wider bar.
Where I have used it: 📌 Present the triage test readout, 🧪 Report every metric with a range for a month and 📂 Carrier Scorecards discovery.