Lecture 26 Confidence Intervals
Most of our estimators so far produce a single number. In this lecture we will consider intervals of parameter values, computed from the data such that the random interval covers the true parameter value with at least a given probability. We will see two ways to construct such an interval, from a pivotal quantity and by inverting a family of hypothesis tests.
26.1 Definition and Interpretation
Here, is a sample from a parametric model with parameter , and is the distribution of the sample under . For a fixed small , typically , the aim is to find an interval which misses the truth with probability at most .
Let and be statistics such that . The random interval is a confidence interval for with confidence level , if
The probability on the left-hand side is called the coverage probability of the interval at .
If the model also has a nuisance parameter , here and below is replaced by and the requirements must hold for all values of . The endpoints of the interval are statistics, while the parameter is an unknown constant. The definition requires only an inequality, since for discrete data the coverage probability jumps as changes and equality is usually impossible. More generally, any random subset of the parameter space such that for all is called a confidence set.
Some care is needed when interpreting a confidence interval. For example, if the data lead to the interval , both endpoints are now fixed numbers, and so is the unknown ; the statement is either true or false. The describes the procedure: of the computed intervals would cover the truth in repeated samples, but we do not know whether the interval in front of us is one of these. The statement “ is in with probability ” is wrong, since it assumes that the parameter is random (as it is in the Bayesian approach of lecture 28). The statement “ of the observations are in the interval” is wrong, since it confuses the parameter with the data. Lecture 27 illustrates the correct interpretation by simulating many intervals.
26.2 Pivotal Quantities
The most direct construction of a confidence interval uses a quantity whose distribution is known exactly, whatever the parameter value.
A function of the sample and the parameter is a pivotal quantity or pivot, if the distribution of under does not depend on .
A pivot is not a statistic, because it contains the unknown , but we know the quantiles of the pivot distribution. If has a continuous distribution, we can choose constants such that and then solve the inequalities for . If is monotone in , the solutions form an interval which contains with probability exactly .
In the following, we use the normal quantiles from lecture 22, which satisfy by symmetry, and similarly we write and for the -quantiles of the and the distribution, respectively. These quantiles are all tabulated.
Let be i.i.d. where is known. Then we know and thus we get
for all . Since this distribution does not depend on , is a pivot, and bracketing between and and solving for gives the confidence interval
with level . For observations, with and , the interval is . This is the interval from section 26.1.
If is unknown, cannot be used, since it depends on the unknown and the resulting interval cannot be computed from the data. Replacing by the sample standard deviation gives a new pivot, whose distribution is the distribution from appendix A.
Let be i.i.d. , where both parameters are unknown, and let be the sample variance. By proposition A.4, the two random variables
are independent. By definition A.5, the ratio
is distributed as and, since the unknown cancels, is a pivot for . Bracketing as above gives the -interval
with level . For the data from example 26.3, with sample standard deviation , tables of the distribution give and thus the interval is . This interval is wider, partly because the quantile is larger than , which is the price we pay for not knowing , and partly because happens to be larger than .
In the same setting, is a pivot for . If we bracket this value between and and then solve for , the order of the endpoints is reversed, and we obtain the confidence interval
for with level . For and the tables of the chi-squared distribution give and , and thus the interval is given by
This interval is far from symmetric around the estimate .
26.3 Inverting a Test
A level- test of decides whether a single value is compatible with the data; a confidence interval collects all the values which are. As an illustration, the two-sided -test from example 22.8 rejects if . The values not rejected by the test form the interval from example 26.3 without its endpoints, which does not change the coverage probability, since has a density. Using definitions 22.3 and 22.6, the following lemma shows that this construction works for every family of tests.
For every , let be the acceptance region of a level- test of , i.e. the set of samples for which is not rejected (the complement of the critical region). Then
is a confidence set for with level . Conversely, if is a confidence set with level , then for each the test which rejects if and only if has level .
By the definition of , for every and every sample we have if and only if . Let be the true value. Then the null hypothesis with is true, and thus under the test with acceptance region rejects with probability at most . We have
Since was arbitrary, is a confidence set with level . For the converse statement, the test for rejects if and only if . Thus, under , this event has probability and the test has level . This completes the proof. ∎
The lemma is a change of viewpoint, rather than a new result: the event “ is not rejected by ” can be read both as a test (with fixed and random) and as a confidence set (with fixed and varying). Exercise 26.4 repeats the -test example with unknown . In practice, the duality is most often used in the opposite direction: a value is rejected at level if it does not belong to the interval.
26.4 Approximate Intervals from the MLE
Exact pivots exist only for special models. For every regular model, however, corollary 17.3 provides an approximate pivot. Let be the maximum likelihood estimator and its standard error from lecture 17. Then the standardised error converges in distribution to , whatever the value of . Here denotes the true value, which the corollary writes as . Solving the inequality for gives the following interval.
Let be the maximum likelihood estimator, with standard error
The Wald interval with approximate level is given by
The following result justifies the level asymptotically.
With the same assumptions as in corollary 17.3, the coverage probability of the Wald interval converges to as , for all .
For , this is the interval of lectures 12, 17 and 18. Section 17.5 lists the cases where its coverage can be poor.
Let be i.i.d. Bernoulli with success probability . The MLE is by example 5.3 and the Fisher information is by example 11.5. Thus the Wald interval is . For successes in trials we have , the standard error is , and the interval is
If is close to or , or if is small, the coverage of this interval may be much less than . If , the formula gives the interval , which misses , and for every this happens with probability close to when is small. Thus for no is the Wald interval a confidence interval with level in the sense of definition 26.1.
26.5 One-Sided Intervals and the Choice of Interval
Sometimes only one direction matters, for example when we want to show that a failure rate is at most some given value. An upper confidence bound for with level is a statistic such that for all . The corresponding one-sided confidence interval consists of all with . A lower confidence bound is defined symmetrically. In the pivot method, a one-sided interval is obtained from a single inequality. For the normal distribution with known variance, the inequality gives the upper bound , where replaces since all of the error probability is allocated to one side.
For a two-sided interval, any pair of values with defines a valid interval in the pivot method. Here we use the equal-tailed choice, i.e. and are the - and -quantiles, respectively, which tables give. For the and pivots, whose densities are symmetric and decrease away from zero, this gives the shortest interval for . Exercise 26.2 shows an example where the shortest interval puts all of the error probability in one tail of the pivot. In lecture 29 we will see the same choice again for credible intervals, the Bayesian counterpart of confidence intervals.
-
•
A confidence interval covers the true parameter with probability at least for all . The interval is random, the parameter is fixed, and the level describes the procedure, not the individual interval.
-
•
An exact interval can be obtained by bracketing the pivot between two quantiles and solving for . For normal samples this can be used to derive the -, - and chi-squared intervals.
-
•
Tests and confidence sets are dual: the values not rejected by a family of level- tests form a confidence set, and conversely.
-
•
In regular models, the coverage probability of the Wald interval converges to for each fixed , but the finite-sample coverage may be much lower.
-
•
One-sided intervals use the -quantile of the pivot in place of the -quantile. For two-sided intervals the equal-tailed choice is the norm.
Let be i.i.d. exponential with rate and let . In exercise 13.1 we have seen that .
-
1.
Explain why is a pivot for and derive the equal-tailed confidence interval for with level .
-
2.
For observations with , compute the interval, using the values and .
- 3.
Let be i.i.d. uniformly distributed on the interval and let .
-
1.
Using the density of from example 8.9, show that for and conclude that is a pivot.
-
2.
Show that is a confidence interval for with level and compute the interval for , and .
-
3.
Among all intervals with and , show that the interval from the previous part is the shortest. (Hint: think about how the length of the interval changes when is moved and is adjusted to maintain the same coverage.)
Let be i.i.d. Poisson with mean . Then the MLE is and the Fisher information is from example 11.6.
-
1.
Find the Wald interval for with level and determine the interval for level for counts with .
-
2.
In exercise 17.3 we have found the asymptotic distribution of the MLE for . Use this distribution, with replaced by in the asymptotic variance, to find an approximate confidence interval for and work out the interval for the given data.
-
3.
Another interval for can be found by applying the decreasing function to the boundaries of the interval from the first part. Show that this interval also has asymptotic coverage , compute the interval for the given data and comment on the differences between the two intervals.
Let be i.i.d. , where both parameters are unknown. For consider the test which rejects if .
-
1.
Show that the test has size , whatever the value of .
- 2.
-
3.
For the data given in example 26.4, can you decide whether and should be rejected at level , without having to compute the test statistic?
-
4.
Now consider the one-sided test which rejects if . Invert this test and describe the resulting confidence set.