Session 8.1.1 - Confidence Interval for the Mean \( \mu \) — σ known (z-interval)
Use when population SD \( \sigma \) is known (rare in practice). For real data with unknown \( \sigma \), use the t-interval page.
Why a confidence interval?
We rarely know the population mean \( \mu \). A small sample gives a point estimate \( \bar x \), but we need a range showing plausible values for \( \mu \). A \(100(1-\alpha)\%\) confidence interval (CI) is that range: if we repeated this process many times, about \(100(1-\alpha)\%\) of such intervals would capture the true \( \mu \).
What is α (alpha)?
Alpha is the miss rate. For a two-sided \(100(1-\alpha)\%\) CI, the area outside totals \( \alpha \), split into \(\alpha/2\) in each tail. The critical value is \( z_{\alpha/2}=\Phi^{-1}(1-\alpha/2) \).
How it works (σ known)
If \( \sigma \) is unknown (typical), use the t-interval page.
What to expect
- Higher confidence ⇒ wider interval.
- Larger \(n\) or smaller \( \sigma \) ⇒ narrower interval.
- Width \(= 2\,z_{\alpha/2}\cdot \sigma/\sqrt{n}\).
How accurate?
Margin of error \( \text{ME}=z_{\alpha/2}\sigma/\sqrt{n} \). To hit a target ME*, use \( n=\big(\frac{z_{\alpha/2}\sigma}{\text{ME}^{*}}\big)^2 \).
Formula recap & how to use it
1) The confidence interval formula
2) Precision pieces
- Standard error: \( \mathrm{SE}=\sigma/\sqrt{n} \)
- Margin of error: \( \boxed{\mathrm{ME}=z_{\alpha/2}\,\mathrm{SE}=z_{\alpha/2}\frac{\sigma}{\sqrt{n}}} \)
- Width: \( \text{Upper}-\text{Lower} = \boxed{2\cdot \mathrm{ME}} \)
- Plan sample size for target accuracy \( \mathrm{ME}^{*} \): \( \boxed{n=\left(\dfrac{z_{\alpha/2}\sigma}{\mathrm{ME}^{*}}\right)^2} \) (round up)
3) Quick workflow
- Choose confidence \(1-\alpha\) → get \(z_{\alpha/2}\) (see the alpha box above).
- Compute \( \mathrm{SE}=\sigma/\sqrt{n} \).
- Compute \( \mathrm{ME}=z_{\alpha/2}\cdot \mathrm{SE} \).
- Report CI: \( [\,\bar x-\mathrm{ME},\ \bar x+\mathrm{ME}\,] \).
- Interpret: “We are \(100(1-\alpha)\%\) confident that \( \mu \) lies in this interval.”
Worked example (calculator + mini graph)
Type your numbers or pick a preset.
Excel — quick steps
Cell map
- B2 = \( \bar x \) (sample mean)
- B3 = \( \sigma \) (known SD)
- B4 = \( n \) (sample size)
- B5 = confidence as decimal (e.g., 0.95)
- B6 = \( z_{\alpha/2} \) → =NORM.S.INV(1-(1-$B$5)/2)
- B7 = SE → =$B$3/SQRT($B$4)
- B8 = ME → =$B$6*$B$7
- B9 = Lower bound → =$B$2-$B$8
- B10 = Upper bound → =$B$2+$B$8
- B11 = Target ME* (you type this)
- B12 = Required n → =ROUNDUP(($B$6*$B$3/$B$11)^2,0)
All-in-one formulas
- ME in one cell: =NORM.S.INV(1-(1-$B$5)/2)*$B$3/SQRT($B$4)
- n for target ME*: =ROUNDUP((NORM.S.INV(1-(1-$B$5)/2)*$B$3/$B$11)^2,0)
Common Student Q&A — quick explanations + tiny math
1) Does higher confidence mean more accuracy?
No—higher confidence → wider interval (less precise).
95%: \(z_{\alpha/2}=1.96\Rightarrow \mathrm{ME}=1.96\times0.8=1.568\).
99%: \(z_{\alpha/2}=2.576\Rightarrow \mathrm{ME}=2.576\times0.8=2.0608\).
99% is “safer” but less precise.
2) If I collect more data, how much narrower does the CI get?
Width shrinks like \(1/\sqrt{n}\). Quadrupling \(n\) halves the ME.
\(n=25\Rightarrow \mathrm{SE}=0.8,\ \mathrm{ME}=1.96\times0.8=1.568\).
\(n=100\Rightarrow \mathrm{SE}=0.4,\ \mathrm{ME}=1.96\times0.4=0.784\) (half as wide).
3) Is the CI centered at \( \mu \) or at \( \bar x \)?
Always centered at the sample mean \( \bar x \). That’s why your line is symmetric around the dot ( \( \bar x \) ).
4) What is “width” vs “margin of error”?
Width = Upper − Lower = \(2\times \mathrm{ME}\).
5) How many students do I need to be within ±1 minute at 95%?
Use \( n=\left(\dfrac{z_{\alpha/2}\sigma}{\mathrm{ME}^{*}}\right)^2 \) and round up.
\( n=(1.96\times4/1)^2=(7.84)^2\approx 61.47 \Rightarrow \boxed{62}\).
6) σ is unknown—can I still use this page?
For real data, use the t-interval page. z is mainly for when \( \sigma \) is known or planning.
\( \mathrm{SE}=4/\sqrt{10}=1.265.\) 95%:
z: \(1.96\times1.265=2.48\) vs t\(_{9,0.025}=2.262\): \(2.262\times1.265=2.86\).
t makes ME a bit larger at small n.
7) One-sided bound example?
For a 95% lower bound (only want a minimum), use \( \bar x - z_{\alpha}\dfrac{\sigma}{\sqrt{n}} \) with \(z_{\alpha}=1.645\).
Lower 95% bound: \(11.7-1.645\times1.265\approx \boxed{9.62}\).
8) Student-life example: “average study hours within ±0.5 hr at 95%”
Suppose prior \( \sigma\approx 2 \) hours.
9) Engineering example: “mean shaft diameter within ±0.02 mm at 95%”
Assume historical \( \sigma\approx 0.08 \) mm.
10) Does a mean CI say 95% of individual items are inside?
No. That’s a CI for the mean, not for individual observations.
11) Is a hypothesized mean plausible?
If \( \mu_0 \) falls inside your CI, it’s consistent with the data at that confidence.
12) Units & rounding?
Keep units consistent (minutes with minutes, mm with mm). Report ME and endpoints to a sensible number of decimals (usually 2–3).