ConceptComplete

Confidence Intervals

A confidence interval provides a range of plausible values for an unknown parameter, quantifying the uncertainty inherent in estimation from random samples.


Definition

Definition

A 100(1α)%100(1-\alpha)\% confidence interval for a parameter θ\theta is a random interval [L(X1,,Xn),U(X1,,Xn)][L(X_1,\ldots,X_n), U(X_1,\ldots,X_n)] such that P(LθU)=1αP(L \leq \theta \leq U) = 1 - \alpha for all θΘ\theta \in \Theta. The value 1α1 - \alpha is the confidence level (typically 0.900.90, 0.950.95, or 0.990.99). The half-width ULU - L is the margin of error.

The correct interpretation is frequentist: if we repeat the sampling procedure many times, approximately 100(1α)%100(1-\alpha)\% of the resulting intervals will contain the true θ\theta.


Common Confidence Intervals

ExampleCI for the mean (known variance)

For XiN(μ,σ2)X_i \sim N(\mu, \sigma^2) with σ\sigma known, an exact 95%95\% CI for μ\mu is: Xˉ±1.96σn\bar{X} \pm 1.96 \frac{\sigma}{\sqrt{n}} This follows from Xˉμσ/nN(0,1)\frac{\bar{X} - \mu}{\sigma/\sqrt{n}} \sim N(0,1).

ExampleCI for the mean (unknown variance)

When σ\sigma is unknown, replace σ\sigma by SS (sample standard deviation). Then XˉμS/ntn1\frac{\bar{X} - \mu}{S/\sqrt{n}} \sim t_{n-1} (Student's tt-distribution with n1n-1 degrees of freedom), giving: Xˉ±tn1,α/2Sn\bar{X} \pm t_{n-1, \alpha/2} \frac{S}{\sqrt{n}} For n=25n = 25 and 95%95\% confidence: t24,0.025=2.064t_{24, 0.025} = 2.064 (slightly wider than the zz-interval).


Properties

Theorem8.3Sample Size Determination

To achieve a margin of error EE for a 100(1α)%100(1-\alpha)\% CI for the mean with known σ\sigma, the required sample size is n=(zα/2σE)2n = \left\lceil \left(\frac{z_{\alpha/2} \sigma}{E}\right)^2 \right\rceil Halving the margin of error requires quadrupling the sample size.

RemarkConfidence intervals vs. credible intervals

A frequentist confidence interval says "if we repeated this experiment, 95%95\% of intervals would contain θ\theta." It does not say "θ\theta is in this interval with probability 95%95\%." The Bayesian analogue, a credible interval, does have this interpretation: given the posterior distribution π(θdata)\pi(\theta | \text{data}), a 95%95\% credible interval is [a,b][a, b] with abπ(θdata)dθ=0.95\int_a^b \pi(\theta | \text{data})\,d\theta = 0.95.