Why This Concept Exists
A point estimate (like \(\bar{X}\)) tells you the best single guess for a parameter, but it tells you nothing about the uncertainty in that guess. Confidence intervals (CIs) quantify this uncertainty by providing a range of plausible values for the unknown parameter, together with a guaranteed long-run coverage probability.
The confidence interval framework is the single most practically important result in PTS2. It directly answers the question: "What can I reliably say about the population parameter, given my sample data?" The construction method used here — the pivotal quantity approach — is the template for every CI you will encounter in the remainder of the course.
This node covers four types of one-sample CIs, each arising from a different pivotal quantity:
\(\bar{X} \pm z_{\alpha/2}\,\dfrac{\sigma}{\sqrt{n}}\)
\(\bar{X} \pm t_{n-1,\alpha/2}\,\dfrac{S}{\sqrt{n}}\)
\(\hat{p} \pm z_{\alpha/2}\,\sqrt{\dfrac{\hat{p}(1-\hat{p})}{n}}\)
\(\left[\dfrac{(n-1)S^2}{\chi^2_{1-\alpha/2, n-1}},\;\dfrac{(n-1)S^2}{\chi^2_{\alpha/2, n-1}}\right]\)
The inversion principle is also covered: any hypothesis test can be inverted to produce a confidence interval, and vice versa. This is a deep conceptual result that connects two seemingly different forms of inference.
Prerequisites
Before engaging with this node, you must be comfortable with:
- Sampling distributions (N6): \(\bar{X} \sim N(\mu,\sigma^2/n)\), \(t\)-distribution, \(\chi^2\)-distribution. You must know which distribution to use in which scenario.
- Standard normal critical values: \(z_{\alpha/2}\) such that \(P(Z > z_{\alpha/2}) = \alpha/2\). Common values: \(z_{0.025} = 1.96\), \(z_{0.05} = 1.645\), \(z_{0.005} = 2.576\).
- Chi-squared critical values: \(\chi^2_{\alpha, \nu}\) such that \(P(\chi^2(\nu) > \chi^2_{\alpha, \nu}) = \alpha\).
- Central Limit Theorem: For large \(n\), \(\bar{X}\) is approximately normal even if the parent distribution is not normal.
- Binomial distribution: \(X \sim \text{Bin}(n, p)\), with \(E[X] = np\) and \(\text{Var}(X) = np(1-p)\).
- Algebraic manipulation: Rearranging inequalities to isolate the parameter on one side.
Core Exposition
3.1 The Pivotal Quantity Approach
The pivotal quantity method is a four-step algorithm that works for every type of CI:
1. Identify a pivotal quantity \(Q(X_1, \ldots, X_n; \theta)\) whose distribution is known and does not depend on \(\theta\).
2. Choose critical values \(c_1, c_2\) such that \(P(c_1 \leq Q \leq c_2) = 1 - \alpha\).
3. Rearrange the inequality to isolate \(\theta\).
4. State the confidence interval: \([\text{lower}(\text{data}),\ \text{upper}(\text{data})]\).
3.2 Z-Interval (Known Variance)
When the data are normal with known variance \(\sigma^2\), the pivotal quantity is:
\(P\!\left(\bar{X} - z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}} \leq \mu \leq \bar{X} + z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}\right) = 1 - \alpha\)
The \((1-\alpha) \times 100\%\) CI for \(\mu\) is:
3.3 T-Interval (Unknown Variance)
When \(\sigma^2\) is unknown, we replace it with the sample variance \(S^2\) and use the t-distribution:
The \((1-\alpha) \times 100\%\) CI for \(\mu\) is:
3.4 CI for a Population Proportion
For a binomial setting where \(X \sim \text{Bin}(n, p)\) and \(\hat{p} = X/n\), the pivotal quantity (for large \(n\)) is:
The approximate \((1-\alpha) \times 100\%\) Wald CI for \(p\) is:
3.5 CI for a Population Variance
For normal data with unknown \(\sigma^2\), the pivotal quantity is:
Take reciprocals (which reverses the inequalities):
\(P\!\left(\dfrac{1}{\chi^2_{\alpha/2, n-1}} \leq \dfrac{\sigma^2}{(n-1)S^2} \leq \dfrac{1}{\chi^2_{1-\alpha/2, n-1}}\right) = 1 - \alpha\)
Multiply by \((n-1)S^2\):
\(P\!\left(\dfrac{(n-1)S^2}{\chi^2_{\alpha/2, n-1}} \leq \sigma^2 \leq \dfrac{(n-1)S^2}{\chi^2_{1-\alpha/2, n-1}}\right) = 1 - \alpha\)
The \((1-\alpha) \times 100\%\) CI for \(\sigma^2\) is:
3.6 The Inversion Principle
Every confidence interval can be derived by inverting a hypothesis test. Specifically, a \(100(1-\alpha)\%\) CI for \(\theta\) is the set of all values \(\theta_0\) for which the test of \(H_0: \theta = \theta_0\) versus \(H_1: \theta \neq \theta_0\) would not be rejected at level \(\alpha\).
This gives: \(\bar{X} - z_{\alpha/2} \cdot \text{SE} \leq \theta_0 \leq \bar{X} + z_{\alpha/2} \cdot \text{SE}\).
Worked Examples
Example 1: Z-Interval for Mean (Known Variance)
A machine fills bottles with a mean volume \(\mu\) and known standard deviation \(\sigma = 1.5\) ml. A random sample of 25 bottles has mean \(\bar{x} = 497.2\) ml.
(a) Construct a 95% CI for \(\mu\).
(b) Construct a 99% CI for \(\mu\).
(c) What is the minimum sample size needed to achieve a margin of error of at most 0.5 ml at 95% confidence?
Margin of error: \(1.96 \times \dfrac{1.5}{\sqrt{25}} = 1.96 \times 0.3 = 0.588\).
95% CI: \(497.2 \pm 0.588 = [496.612,\; 497.788]\).
Margin of error: \(2.576 \times 0.3 = 0.773\).
99% CI: \(497.2 \pm 0.773 = [496.427,\; 497.973]\).
Notice: the 99% CI is wider than the 95% CI. Higher confidence requires a wider interval.
\(1.96 \times \dfrac{1.5}{\sqrt{n}} \leq 0.5\)
\(\sqrt{n} \geq \dfrac{1.96 \times 1.5}{0.5} = 5.88\)\ \(n \geq 34.57\)
So we need \(n \geq 35\) bottles.
Example 2: T-Interval for Mean (Unknown Variance)
A sample of 9 observations from a normal population has \(\bar{x} = 42.3\) and \(s = 3.8\). Construct a 90% CI for \(\mu\).
\(t_{8, 0.05}\) from tables: \(t_{8, 0.05} = 1.860\).
Standard error: \(\dfrac{s}{\sqrt{n}} = \dfrac{3.8}{3} = 1.267\).
Margin of error: \(1.860 \times 1.267 = 2.356\).
90% CI: \(42.3 \pm 2.356 = [39.944,\; 44.656]\).
Example 3: CI for a Proportion
In a survey of 200 people, 73 said they support a policy. Construct a 95% CI for the true proportion \(p\).
Standard error: \(\sqrt{\dfrac{0.365 \times 0.635}{200}} = \sqrt{0.001159} = 0.0340\).
Margin of error: \(1.96 \times 0.0340 = 0.0667\).
95% CI: \(0.365 \pm 0.0667 = [0.2983,\; 0.4317]\).
Check conditions: \(n\hat{p} = 73 > 5\) and \(n(1-\hat{p}) = 127 > 5\). \(\checkmark\) Normal approximation is valid.
Example 4: CI for Variance
A sample of 15 batteries has a sample standard deviation of \(s = 1.2\) hours. Construct a 95% CI for the population variance \(\sigma^2\).
Critical values from chi-squared tables:\
\(\chi^2_{0.025, 14} = 26.119\) (upper 2.5% point)\ \(\chi^2_{0.975, 14} = 5.629\) (upper 97.5% point = lower 2.5% point).
\((n-1)S^2 = 14 \times 1.44 = 20.16\).
CI for \(\sigma^2\): \(\left[\dfrac{20.16}{26.119},\;\dfrac{20.16}{5.629}\right] = [0.772,\; 3.581]\).
CI for \(\sigma\): \([\sqrt{0.772},\;\sqrt{3.581}] = [0.879,\; 1.892]\).
Pattern Recognition & Examiner Traps
- "Find a 95% CI for μ" — identify whether σ is known (z-interval) or unknown (t-interval). The critical clue is whether the problem gives σ or \(S\).
- "Find the minimum sample size" — use the margin of error formula and solve for \(n\). Round up to the nearest integer.
- "Find a CI for the variance" — use the chi-squared pivotal quantity. Remember the asymmetry.
- "Construct a CI by inverting a test" — write the acceptance region of the test and solve for \(\theta_0\).
Connections
- ← N6 (Sampling Distributions): Every CI formula is derived directly from a sampling distribution result. The t-interval exists because \(\bar{X} - \mu)/(S/\sqrt{n}) \sim t(n-1)\). The variance CI exists because \((n-1)S^2/\sigma^2 \sim \chi^2(n-1)\). The z-interval exists because \((\bar{X}-\mu)/(\sigma/\sqrt{n}) \sim N(0,1)\). Without N6, N8 is impossible.
- → N9 (Two-Sample CIs): N9 extends N8's approach to differences of means \(\mu_1 - \mu_2\) and ratios of variances \(\sigma_1^2/\sigma_2^2\).
- → N10-N12 (Hypothesis Tests): The duality between CIs and hypothesis tests (inversion principle) means that every CI formula immediately produces a corresponding test. If 0 is in a \(95\%\) CI for \(\mu_1 - \mu_2\), we cannot reject \(H_0: \mu_1 = \mu_2\) at the 5% level.
Summary Table
| Parameter | Conditions | Pivotal Quantity | CI Formula |
|---|---|---|---|
| \(\mu\) (mean) | Normal, \(\sigma\) known | \(Z = \dfrac{\bar{X}-\mu}{\sigma/\sqrt{n}} \sim N(0,1)\) | \(\bar{X} \pm z_{\alpha/2}\sigma/\sqrt{n}\) |
| \(\mu\) (mean) | Normal, \(\sigma\) unknown | \(T = \dfrac{\bar{X}-\mu}{S/\sqrt{n}} \sim t(n-1)\) | \(\bar{X} \pm t_{n-1, \alpha/2} S/\sqrt{n}\) |
| \(p\) (proportion) | Large \(n\) | \(Z = \dfrac{\hat{p}-p}{\sqrt{p(1-p)/n}} \approx N(0,1)\) | \(\hat{p} \pm z_{\alpha/2}\sqrt{\hat{p}(1-\hat{p})/n}\) |
| \(\sigma^2\) (variance) | Normal | \(\dfrac{(n-1)S^2}{\sigma^2} \sim \chi^2(n-1)\) | \(\left[\frac{(n-1)S^2}{\chi^2_{\alpha/2}},\;\frac{(n-1)S^2}{\chi^2_{1-\alpha/2}}\right]\) |
Self-Assessment
Test your understanding before moving to N9:
- Given \(\bar{x} = 50\), \(s = 6\), \(n = 16\), construct a 95% CI for \(\mu\). [Answer: \(50 \pm 2.131 \times 6/4 = 50 \pm 3.197 = [46.803, 53.197]\).]
- Determine whether to use z or t for the following scenarios: (a) \(n = 30\), \(\sigma = 5\) is known. (b) \(n = 10\), \(s = 3\) is calculated from data. (c) \(n = 100\), \(\sigma\) is unknown.
- Explain why a 99% CI is wider than a 95% CI.
- Find the minimum sample size to estimate \(\mu\) within \(E = 2\) at 99% confidence when \(\sigma = 10\). [Answer: \(n \geq (2.576 \times 10/2)^2 = 165.9\), so \(n \geq 166\).]
- Derive a 95% CI for \(\sigma^2\) from the pivotal quantity \((n-1)S^2/\sigma^2 \sim \chi^2(n-1)\).
- Construct a 90% CI for a proportion when 45 out of 200 trials are successes. [Answer: \(0.225 \pm 1.645\sqrt{0.225 \times 0.775/200} = [0.1763, 0.2737]\).]
HLQ: Exam-Style Question with Worked Solution
A quality control engineer measures the diameters (in mm) of 12 randomly selected ball bearings from a production line. The data are assumed to come from a normal distribution. The summary statistics are: \(\bar{x} = 10.234\) and \(s = 0.187\).
(a) Construct a 95% confidence interval for the population mean \(\mu\). (4 marks)
(b) Construct a 95% confidence interval for the population variance \(\sigma^2\). (5 marks)
(c) The manufacturer claims the mean diameter is 10.300 mm. Based on your CI from part (a), is this claim plausible? Explain your reasoning. (3 marks)
(d) Suppose a second sample of 8 bearings from a different production line has \(\bar{x}_2 = 10.180\) and \(s_2 = 0.250\). Describe, without computing, how you would construct a CI for the difference in means \(\mu_1 - \mu_2\). What assumptions are needed? (3 marks)
Standard error: \(s/\sqrt{n} = 0.187/\sqrt{12} = 0.0540\).
Margin of error: \(2.201 \times 0.0540 = 0.1188\).
95% CI: \(10.234 \pm 0.1188 = [10.115,\; 10.353]\).
Critical values from chi-squared tables:\ \(\chi^2_{0.025, 11} = 21.920\)\ \(\chi^2_{0.975, 11} = 3.816\)
CI for \(\sigma^2\): \(\left[\dfrac{0.3847}{21.920},\;\dfrac{0.3847}{3.816}\right] = [0.01755,\; 0.1008]\).
CI for \(\sigma\): \([\sqrt{0.01755},\;\sqrt{0.1008}] = [0.1325,\; 0.3175]\).
Therefore, at the 5% significance level, we cannot reject the claim that \(\mu = 10.300\). The data are consistent with the manufacturer's specification.
Assumptions needed:
1. Both populations are normally distributed.
2. The two samples are independent.
3. For pooled variance: \(\sigma_1^2 = \sigma_2^2\) (equal variances). Check using the F-test or by comparing sample variances.
Formula (pooled):
\((\bar{x}_1 - \bar{x}_2) \pm t_{n_1+n_2-2, \alpha/2} \cdot S_p\sqrt{1/n_1 + 1/n_2}\),
where \(S_p^2 = \dfrac{(n_1-1)S_1^2 + (n_2-1)S_2^2}{n_1 + n_2 - 2}\).
(a) 95% CI for \(\mu\): [10.115, 10.353].
(b) 95% CI for \(\sigma^2\): [0.01755, 0.1008].
(c) Claim \(\mu = 10.300\) is plausible — it is inside the CI.
(d) Use two-sample t-interval with pooled variance, assuming normality, independence, and equal variances.