Confidence interval
Definition taught in Confidence intervals, part of Statistical inference
Confidence interval

| Type | Definition |
| Taught in | Confidence intervals |
| Part | Statistical inference |
| Properties | 4 |
| Worked examples | 4 |
| Questions using it | 21 |
Let L and U be statistics. The random interval (L,U) is a confidence interval for \theta with confidence 1-\alpha when
\mathbb{P}_\theta(L<\theta<U)=1-\alpha
for every \theta. A one-sided interval leaves one endpoint infinite.
Properties
One-sample t pivot
Main article: One-sample t pivot
If X_1,\ldots,X_n are independent and \operatorname{N}(\mu,\sigma^2), then
T=\frac{\overline X-\mu}{s/\sqrt n}
has a Student t distribution with n-1 degrees of freedom. A Student variable with m degrees of freedom is Z/\sqrt{V/m} where Z is standard normal, V is chi-squared with m degrees of freedom, and Z and V are independent.
Two-sample t pivot
Main article: Two-sample t pivot
For two independent normal samples with a common variance,
T=\frac{(\overline X_1-\overline X_2)-(\mu_1-\mu_2)}{s_p\sqrt{1/n_1+1/n_2}}
has a t distribution with n_1+n_2-2 degrees of freedom.
Variance-ratio F pivot
Main article: Variance-ratio F pivot
For two independent normal samples,
\frac{s_1^2/\sigma_1^2}{s_2^2/\sigma_2^2}
has the F distribution with (n_1-1,\,n_2-1) degrees of freedom.
Slope t pivot
Main article: Slope t pivot
Under simple linear regression,
\frac{\widehat\beta_1-\beta_1}{S_1}=\frac{\widehat\beta_1-\beta_1}{S/\sqrt{S_{xx}}}
has the t_{n-2} distribution.
Examples
Household fuel spending
Worked example from Confidence intervals
An oil company samples 51 households at random from a city. They spent on average \overline x=1136 dollars a year on petrol and heating oil, with bias-corrected standard deviation s=178 dollars.
Question. Give a 95% confidence interval for the mean spending \mu in the city, and say what the model assumes.
Solution. Model the spending of the 51 households as a random sample from \operatorname{N}(\mu,\sigma^2), both unknown. Random selection justifies independence and a common distribution. Normality is an assumption; with n=51 the central limit theorem makes it matter little for an interval about the mean. With t_{50;0.975}=2.009, the standard error is 178/\sqrt{51}=24.93, and
1136\pm2.009\times24.93=1136\pm50.1=(1085.9,\ 1186.1).
Aspirin tablet weights
Worked example from Confidence intervals
A label states that tablet weights have standard deviation 1.0 mg. A sample of 25 tablets has s=1.3 mg.
Question. Give 95% confidence intervals for \sigma^2 and for \sigma, assuming normal weights. Is the label believable?
Solution. With 24 degrees of freedom, \chi^2_{24;0.025}=12.40 and \chi^2_{24;0.975}=39.36. Since (n-1)s^2=24\times1.69=40.56,
\left(\frac{40.56}{39.36},\ \frac{40.56}{12.40}\right)=(1.03,\ 3.27)
for \sigma^2, and (1.02,\ 1.81) mg for \sigma. The interval for \sigma excludes the stated 1.0 mg, so the data cast doubt on the label at the 95% level.
Two standard errors
Question page: Two standard errors
Let X_1,\ldots,X_n be independent and \operatorname{N}(\mu,1). Find the exact coverage of the interval \overline X\pm 2/\sqrt n, and the multiplier c for which \overline X\pm c/\sqrt n has coverage exactly 99%.
\sqrt n(\overline X-\mu) is standard normal, so
\mathbb{P}\bigl(\overline X-2/\sqrt n<\mu<\overline X+2/\sqrt n\bigr)=\mathbb{P}(-2<Z<2)=2\Phi(2)-1=0.9545.
For exactly 99%, 2\Phi(c)-1=0.99, so \Phi(c)=0.995 and c=z_{0.995}=2.576.
The interval for a normal mean
Question page: The interval for a normal mean
Let X_1,\ldots,X_n be independent and \operatorname{N}(\mu,\sigma^2) with \sigma unknown. Starting from the t pivot (\overline X-\mu)/(s/\sqrt n), derive the confidence interval for \mu with confidence 1-\alpha.
T\sim t_{n-1}, so \mathbb{P}(-t_{n-1;\,1-\alpha/2}\le T\le t_{n-1;\,1-\alpha/2})=1-\alpha. Substituting T=(\overline X-\mu)/(s/\sqrt n) and solving for \mu gives
\overline X\pm t_{n-1;\,1-\alpha/2}\,\frac{s}{\sqrt n}.
Used in
- Taught in Confidence intervals, where the derivation and examples are.
- Also used in Statistical inference · Hypothesis tests · Linear regression · Descriptive statistics · Estimation examples · Bayesian foundations
- Questions that use it (21) — A proportion in a poll · The interval for a normal mean · Lost hours after a safety programme · Checking equal variances · How much do the ads explain? · Ten normal observations · Narrowing a pilot interval · Printer paper · Hours of sleep · A difference of proportions · Variance of a fill volume · A later poll on leaving · Two proportions · Rain, food, and orange yield · How far sharks swim · Q3 · Q16 · Q25 · Q41 (answer) · Question 9 · C6
- All 6 questions on Confidence intervals
See also
Bayesian credible interval · Margin of error · Pivot · One-sample t pivot · Pooled variance · Two-sample t pivot · Variance-ratio F pivot · Wald interval