$$\bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}$$
When $\sigma$ is unknown, replace $\sigma$ with the sample standard deviation $s$:
$$\bar{x} \pm t_{\alpha/2,\ n-1} \cdot \frac{s}{\sqrt{n}}$$
The critical value $t_{\alpha/2, n-1}$ comes from the $t$-distribution with $n-1$ degrees of freedom.
Example 1: Sample: $n=16$, $\bar{x}=42.3$, $s=6.8$. Construct a 95% CI for $\mu$.
$t_{0.025,15} \approx 2.131$.
$\$42.3 \pm 2.131 \times \frac{6.8}{4} = 42.3 \pm 3.62 = (38.68,\ 45.92)$$
We are 95% confident the true mean lies between 38.68 and 45.92.
$$\hat{p} \pm z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$$
Example 2: A poll of $n=500$ finds 275 in favour. Construct a 99% CI for $p$.
$\hat{p} = 0.55$. $z_{0.005} = 2.576$.
$\$0.55 \pm 2.576\sqrt{\frac{0.55\times0.45}{500}} = 0.55 \pm 2.576\times0.02224 = 0.55\pm0.0573 = (0.493,\ 0.607)$$
A two-tailed test at level $\alpha$ rejects $H_0: \mu = \mu_0$ if and only if $\mu_0$ lies outside the $(1-\alpha)\times100\%$ CI.
Example: 95% CI for $\mu$ is $(50, 58)$. Test $H_0: \mu = 55$ at $\alpha = 0.05$ (two-tailed).
Since 55 is inside $(50, 58)$, we fail to reject $H_0$. \checkmark
| Factor | Effect on CI width |
|---|---|
| Increase $n$ | Narrower (better precision) |
| Increase confidence level | Wider |
| Increase $s$ or $\sigma$ | Wider |
The width equals \$2 \times$ margin of error $= 2z_{\alpha/2}\sigma/\sqrt{n}$.
To achieve margin of error $E$:
$$n \geq \left(\frac{z_{\alpha/2}\sigma}{E}\right)^2$$
Example 3: 95% CI for $\mu$, $\sigma=12$, $E=2$. Required $n$:
$$n \geq \left(\frac{1.96\times12}{2}\right)^2 = (11.76)^2 = 138.3 \Rightarrow n \geq 139$$
Correct: “We are 95% confident that the true mean is between 38.68 and 45.92.”
Incorrect: “There is a 95% probability the true mean is between 38.68 and 45.92.”
($\mu$ is fixed, not random. The interval is the random quantity.)
KEY TAKEAWAY: Use $z^$ when $\sigma$ is known; use $t^$ with $n-1$ df when $\sigma$ is estimated by $s$. The $t$-distribution accounts for the extra uncertainty from estimating $\sigma$.
EXAM TIP: State the confidence level, the formula used, and the numerical interval in your answer. Then state the interpretation in the context of the problem.
COMMON MISTAKE: Using $z^* = 1.96$ when $n$ is small and $\sigma$ is unknown. Small samples require the $t$-distribution, which has a larger critical value.