Statistical inference · Definition
Confidence interval
Before you start you need to know
It accompanies the estimate with an honest measure of how wrong it might be.
Definition
A confidence interval \([L,U]\) is a range of values, computed from the sample \(X\), that contains the parameter \(\theta\) with a preset probability \(P\), the confidence level \(1-\alpha\).
A point estimator gives a single value and says nothing about its precision. The confidence interval adds that margin: it is built with a procedure that, over repeated sampling, captures the parameter a fraction \(1-\alpha\) of the time. The usual levels are \(90\,\%\), \(95\,\%\) and \(99\,\%\), with \(z=1.645,\ 1.96\) and \(2.576\).
When \(\sigma\) is known and the sample mean is normal (exact if the population is, approximate by the central limit theorem if \(n\) is large), the interval for \(\mu\) is \(\bar x\pm z\,\sigma/\sqrt n\). The term \(z\,\sigma/\sqrt n\) is called the margin of error; the interval is symmetric about \(\bar x\) and its length is twice the margin.
The margin depends on three things: it grows with confidence (larger \(z\)), grows with the spread \(\sigma\) and shrinks with \(\sqrt n\). Hence, to fix a margin \(E\), it suffices to solve \(n\ge(z\sigma/E)^2\) and round up. With unknown \(\sigma\), replace it by \(S\) and \(z\) by a value from the \(t\) distribution.
The correct interpretation is the most misunderstood: we do not say that \(\mu\) has probability \(0.95\) of being in an already computed interval, because \(\mu\) is fixed. The \(95\,\%\) is a property of the method. This same reasoning, inverted, gives hypothesis tests.
Think about it
If the \(95\,\%\) interval is \((10,\ 14)\), is it reasonable to claim \(\mu=15\)?
No: \(15\) lies outside the interval, so the data do not support that value at the \(95\,\%\) confidence level.
What is sacrificed by asking for more confidence with the same data?
Precision: the interval widens, because the critical value \(z\) grows.
Exercises 10
- A sample of \(n=36\) has \(\bar x=50\) and known \(\sigma=12\). Use \(z=1.96\). What is the \(95\,\%\) confidence interval for \(\mu\)?
- With \(\sigma=10\), \(n=25\) and \(z=1.96\), what is the margin of error?
- What is the critical value \(z\) for a \(99\,\%\) confidence level?
- A confidence interval for \(\mu\) is \((12.4,\ 15.6)\), built symmetrically around \(\bar x\). What is \(\bar x\)?
- For the same interval \((12.4,\ 15.6)\), what is the margin of error?
- With the same data, what happens to the interval when the confidence goes from \(95\,\%\) to \(99\,\%\)?
- If the sample size is multiplied by \(4\), at the same confidence level, the margin of error…
- With \(\sigma=10\) and \(95\,\%\) confidence (\(z=1.96\)), what is the smallest \(n\) giving a margin of error of at most \(2\)?
- What does «\(95\,\%\) confidence» mean?
- A \(95\,\%\) interval for \(\mu\), with \(n=16\) and known \(\sigma\), is \((4.02,\ 5.98)\). What is \(\sigma\)?
What comes next
References
- George Casella, Roger L. Berger, Statistical Inference, 2nd edition, Duxbury / Cengage, 2002. §9.1 y §9.2
- Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying Ye, Probabilidad y estadística para ingeniería y ciencias, 9.ª edición, Pearson, 2012. §9.4
- Larry Wasserman, All of Statistics, 1st edition, Springer, 2004. §6.3.2