Confidence interval calculator with workings
For a mean with known σ (z), with an estimated standard deviation s (t distribution) or for a proportion. The quantile is computed exactly, no table needed.
Result
- 95% confidence interval
- [47.1386; 52.8614]
- Margin of error e
- 2.8614
- Quantile t
- 2.2622
- Width of the interval
- 5.7229
Workings
- 1α = 1 − 0.95 = 0.05; we need the quantile for 1 − α/2 = 0.975
- 2σ unknown → t distribution with n − 1 = 9 degrees of freedom: t = 2.2622
- 3Margin of error e = t × s / √n = 2.2622 × 4 / 3.1623 = 2.86143
- 4Interval = x̄ ± e = 50 ± 2.86143 = [47.1386; 52.8614]
The formulas
| Case | Interval |
|---|---|
| Mean, σ known | x̄ ± z · σ / √n |
| Mean, σ unknown | x̄ ± t(n − 1) · s / √n |
| Proportion | p̂ ± z · √(p̂(1 − p̂) / n) |
Frequently asked questions
When do I use z and when t?+
Use z when the population standard deviation σ is known. If it is estimated from the sample (s), use the t distribution with n − 1 degrees of freedom.
