Lecture 25 Confidence Intervals

So far we have considered estimators which output a single number. In this lecture we will consider intervals of parameter values, constructed such that the true parameter value lies inside the interval with a given probability. We will see two different ways to construct such an interval, one using the concept of a pivotal quantity and the other one based on the inversion of a family of hypothesis tests. This latter approach also allows us to relate the testing theory from lectures 20 to 23 to the topic of estimation. The Bayesian equivalents of confidence intervals are called credible intervals and we will learn about these in lecture 28. In lecture 27 we will compare the two approaches to confidence intervals using simulation.

25.1 Definition and Interpretation

Here, X=(X1,…,Xn)X=(X_{1},\dots,X_{n}) is a sample from a parametric model with parameter θ∈Θ⊆ℝ\theta\in\Theta\subseteq\mathbb{R}, and ℙθ\mathbb{P}_{\theta} is the distribution of the sample under θ\theta. For a fixed small α∈(0,1)\alpha\in(0,1), typically α=0.05\alpha=0.05, the aim is to find an interval which misses the truth with probability at most α\alpha.

Definition 25.1.

Let L⁢(X)L(X) and U⁢(X)U(X) be statistics such that L⁢(X)≤U⁢(X)L(X)\leq U(X). The random interval [L⁢(X),U⁢(X)][L(X),U(X)] is a confidence interval for θ\theta with confidence level 1−α1-\alpha, if

ℙθ⁢(L⁢(X)≤θ≤U⁢(X))≥1−αfor all ⁢θ∈Θ.\mathbb{P}_{\theta}\bigl{(}L(X)\leq\theta\leq U(X)\bigr{)}\geq 1-\alpha\qquad% \text{for all }\theta\in\Theta.

The probability on the left-hand side is called the coverage probability of the interval at θ\theta.

The endpoints of the interval are statistics, i.e. functions of the data, while the parameter θ\theta is an unknown constant which does not change between samples. For continuous data we can usually achieve equality in the definition, but for discrete data the coverage probability of the interval can jump as θ\theta changes. For this reason, the definition only requires the left-hand side to satisfy the inequality. More generally, any random subset C⁢(X)⊆ΘC(X)\subseteq\Theta of the parameter space such that ℙθ⁢(θ∈C⁢(X))≥1−α\mathbb{P}_{\theta}\bigl{(}\theta\in C(X)\bigr{)}\geq 1-\alpha for all θ\theta is called a confidence set.

Some care is needed when interpreting a confidence interval. For example, if the data lead to the 95%95\% interval [9.32,11.28][9.32,11.28], both endpoints are now fixed numbers, and so is the unknown θ\theta; the statement 9.32≤θ≤11.289.32\leq\theta\leq 11.28 is either true or false. The 95%95\% describes the procedure: 95%95\% 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 “θ\theta is in [9.32,11.28][9.32,11.28] with probability 0.950.95” is wrong, since it assumes that the parameter is random (this only holds in the Bayesian model from lecture 28). The statement “95%95\% of the observations are in the interval” is wrong, since this would be a confusion of parameter with data. The correct interpretation of such an interval can be illustrated by simulating many intervals and seeing how many of these cover the truth. This is done in lecture 27.

25.2 Pivotal Quantities

The most direct approach to constructing a confidence interval is to construct an interval based on a quantity whose distribution is known exactly, regardless of the parameter value. Such a quantity is called a pivotal quantity.

Definition 25.2.

A function Q⁢(X,θ)Q(X,\theta) of the sample and the parameter is a pivotal quantity or pivot, if the distribution of Q⁢(X,θ)Q(X,\theta) under ℙθ\mathbb{P}_{\theta} does not depend on θ∈Θ\theta\in\Theta.

A pivot is not a statistic, because it contains the unknown θ\theta, but we know the quantiles of the pivot distribution. To get a confidence interval, we can choose constants a<ba<b such that ℙθ⁢(a≤Q⁢(X,θ)≤b)=1−α\mathbb{P}_{\theta}\bigl{(}a\leq Q(X,\theta)\leq b\bigr{)}=1-\alpha and then solve the inequalities a≤Q⁢(X,θ)≤ba\leq Q(X,\theta)\leq b for θ\theta. If QQ is monotone in θ\theta, the solution of these inequalities forms an interval which, with probability exactly 1−α1-\alpha, contains the unknown parameter value. Using the quantile notation zpz_{p} from lecture 20, we have z0.975=1.96z_{0.975}=1.96 and, using symmetry, z1−p=−zpz_{1-p}=-z_{p}. Similarly, we write tk,pt_{k,p} and χk,p2\chi^{2}_{k,p} for the pp-quantiles of the tkt_{k} and the χk2\chi^{2}_{k} distribution, respectively. These quantiles are all tabulated.

Example 25.3.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. N⁢(θ,σ2)N(\theta,\sigma^{2}) where σ2\sigma^{2} is known. Then, by proposition A.3, X¯∼N⁢(θ,σ2/n)\bar{X}\sim N(\theta,\sigma^{2}/n) and thus

Q⁢(X,θ)=n⁢(X¯−θ)σ∼N⁢(0,1)Q(X,\theta)=\frac{\sqrt{n}\,(\bar{X}-\theta)}{\sigma}\sim N(0,1)

for all θ\theta. Thus, QQ is a pivot. We can find a confidence interval for θ\theta by bracketing QQ between −z1−α/2-z_{1-\alpha/2} and z1−α/2z_{1-\alpha/2} and then solving the resulting inequalities for θ\theta. The resulting confidence interval is

[X¯−z1−α/2⁢σn,X¯+z1−α/2⁢σn]\Bigl{[}\,\bar{X}-z_{1-\alpha/2}\,\frac{\sigma}{\sqrt{n}},\ \bar{X}+z_{1-% \alpha/2}\,\frac{\sigma}{\sqrt{n}}\,\Bigr{]}

with level 1−α1-\alpha. For n=16n=16 observations, with σ=2\sigma=2 and x¯=10.3\bar{x}=10.3, the 95%95\% interval is 10.3±1.96⋅0.5=[9.32,11.28]10.3\pm 1.96\cdot 0.5=[9.32,11.28]. This is the same interval as we discussed above.

If σ2\sigma^{2} is unknown, this pivot is not available. If we replace σ\sigma by the sample standard deviation SS, we get a new pivot and we have to consider the tt distribution from appendix A.

Example 25.4.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. N⁢(μ,σ2)N(\mu,\sigma^{2}), where both parameters are unknown, and let S2S^{2} be the sample variance. By proposition A.3, the two values

Z=n⁢(X¯−μ)σ∼N⁢(0,1)andV=(n−1)⁢S2σ2∼χn−12Z=\frac{\sqrt{n}\,(\bar{X}-\mu)}{\sigma}\sim N(0,1)\qquad\text{and}\qquad V=% \frac{(n-1)S^{2}}{\sigma^{2}}\sim\chi^{2}_{n-1}

are independent. By definition A.4, the ratio

T=ZV/(n−1)=n⁢(X¯−μ)ST=\frac{Z}{\sqrt{V/(n-1)}}=\frac{\sqrt{n}\,(\bar{X}-\mu)}{S}

is distributed as tn−1t_{n-1} and, since the unknown σ\sigma cancels, TT is a pivot for μ\mu, independently of the nuisance parameter σ2\sigma^{2}. The tt-interval

[X¯−tn−1,1−α/2⁢Sn,X¯+tn−1,1−α/2⁢Sn],\Bigl{[}\,\bar{X}-t_{n-1,1-\alpha/2}\,\frac{S}{\sqrt{n}},\ \bar{X}+t_{n-1,1-% \alpha/2}\,\frac{S}{\sqrt{n}}\,\Bigr{]},

with level 1−α1-\alpha, can be obtained by bracketing the pivot as above. For the data from example 25.3, with sample standard deviation s=2.1s=2.1, we can use the table to find t15,0.975=2.131t_{15,0.975}=2.131 and the 95%95\% interval 10.3±2.131⋅2.1/4=[9.18,11.42]10.3\pm 2.131\cdot 2.1/4=[9.18,11.42]. The wider interval is the price we pay for not knowing σ\sigma. As nn increases, this difference decreases, since tn−1t_{n-1} converges to the standard normal distribution.

Example 25.5.

In the same setting, V=(n−1)⁢S2/σ2∼χn−12V=(n-1)S^{2}/\sigma^{2}\sim\chi^{2}_{n-1} is a pivot for σ2\sigma^{2}, independently of the unknown μ\mu. If we bracket this value between χn−1,α/22\chi^{2}_{n-1,\alpha/2} and χn−1,1−α/22\chi^{2}_{n-1,1-\alpha/2} and then solve for σ2\sigma^{2}, the order of the endpoints is reversed, and we obtain the confidence interval

[(n−1)⁢S2χn−1,1−α/22,(n−1)⁢S2χn−1,α/22]\Bigl{[}\,\frac{(n-1)S^{2}}{\chi^{2}_{n-1,1-\alpha/2}},\ \frac{(n-1)S^{2}}{% \chi^{2}_{n-1,\alpha/2}}\,\Bigr{]}

for σ2\sigma^{2} with level 1−α1-\alpha. For n=16n=16 and s2=4.41s^{2}=4.41 the table gives χ15,0.0252=6.262\chi^{2}_{15,0.025}=6.262 and χ15,0.9752=27.488\chi^{2}_{15,0.975}=27.488, and thus the 95%95\% interval is given by

[66.15/27.488, 66.15/6.262]=[2.41,10.56].[66.15/27.488,\ 66.15/6.262]=[2.41,10.56].

This interval is far from symmetric around the estimate 4.414.41.

If we take the square root of both endpoints, the interval [1.55,3.25][1.55,3.25] for σ\sigma has the same coverage probability: applying a strictly increasing function to both endpoints does not change the coverage probability, whereas applying a decreasing function swaps the endpoints.

25.3 Inverting a Test

A level-α\alpha test of H0:θ=θ0H_{0}\colon\theta=\theta_{0} decides whether a single value θ0\theta_{0} is compatible with the data; a confidence interval collects all the values which are. The following theorem, using the notions of critical region and level from definitions 20.2 and 20.5, makes this correspondence exact, in both directions.

Theorem 25.6.

For every θ0∈Θ\theta_{0}\in\Theta, let A⁢(θ0)A(\theta_{0}) be the acceptance region of a level-α\alpha test of H0:θ=θ0H_{0}\colon\theta=\theta_{0}, that is the set of samples for which H0H_{0} is not rejected. Then

C⁢(X)={θ0∈Θ|X∈A⁢(θ0)},C(X)=\bigl{\{}\theta_{0}\in\Theta\mathrel{\big{|}}X\in A(\theta_{0})\bigr{\}},

is a confidence set for θ\theta with level 1−α1-\alpha. Conversely, if C⁢(X)C(X) is a confidence set with level 1−α1-\alpha, then for each θ0∈Θ\theta_{0}\in\Theta the test which rejects H0:θ=θ0H_{0}\colon\theta=\theta_{0} if and only if θ0∉C⁢(X)\theta_{0}\notin C(X) has level α\alpha.

Proof.

By the definition of C⁢(X)C(X), for every θ0\theta_{0} and every sample we have θ0∈C⁢(X)\theta_{0}\in C(X) if and only if X∈A⁢(θ0)X\in A(\theta_{0}). Let θ\theta be the true value. Then, for θ0=θ\theta_{0}=\theta, under ℙθ\mathbb{P}_{\theta} the null hypothesis H0:θ0=θH_{0}\colon\theta_{0}=\theta is true and the test with acceptance region A⁢(θ)A(\theta) rejects with probability at most α\alpha. We have

ℙθ⁢(θ∈C⁢(X))=ℙθ⁢(X∈A⁢(θ))=1−ℙθ⁢(X∉A⁢(θ))≥1−α.\mathbb{P}_{\theta}\bigl{(}\theta\in C(X)\bigr{)}=\mathbb{P}_{\theta}\bigl{(}X% \in A(\theta)\bigr{)}=1-\mathbb{P}_{\theta}\bigl{(}X\notin A(\theta)\bigr{)}% \geq 1-\alpha.

Since θ\theta was arbitrary, C⁢(X)C(X) is a confidence set with level 1−α1-\alpha. For the converse statement, the test for H0:θ=θ0H_{0}\colon\theta=\theta_{0} rejects if and only if θ0∉C⁢(X)\theta_{0}\notin C(X). Thus, under ℙθ0\mathbb{P}_{\theta_{0}}, this event has probability 1−ℙθ0⁢(θ0∈C⁢(X))≤α1-\mathbb{P}_{\theta_{0}}\bigl{(}\theta_{0}\in C(X)\bigr{)}\leq\alpha and the test has level α\alpha. This completes the proof. ∎

The theorem is a change of viewpoint, rather than a new result: the event “θ0\theta_{0} is not rejected by XX” can be read both as a test (with θ0\theta_{0} fixed and XX random) and as a confidence set (with XX fixed and θ0\theta_{0} varying). As an illustration, the size-α\alpha two-sided test from example 20.7 for the mean of an i.i.d. N⁢(θ,σ2)N(\theta,\sigma^{2}) sample with known σ2\sigma^{2} rejects H0:θ=θ0H_{0}\colon\theta=\theta_{0} if |X¯−θ0|>z1−α/2⁢σ/n|\bar{X}-\theta_{0}|>z_{1-\alpha/2}\,\sigma/\sqrt{n} and the values not rejected by the test form the interval from example 25.3. Similarly, by inverting the one-sided test from example 20.6, we find a one-sided confidence interval. We will consider this type of interval again in section 25.5. Finally, in exercise 25.4, the same approach is repeated with unknown σ\sigma. In practice, the duality is most often used in the opposite direction: a value θ0\theta_{0} is rejected at level α\alpha if it does not belong to the 1−α1-\alpha interval.

25.4 Approximate Intervals from the MLE

Exact pivots only exist for special models. For every regular model, however, corollary 17.3 provides an approximate pivot: the standardised error (θ^n−θ)/se(θ^n)(\hat{\theta}_{n}-\theta)/\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}) of the maximum likelihood estimator, with se(θ^n)=1/ℐ︀n⁢(θ^n)\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n})=1/\sqrt{\mathcal{I}_{n}(\hat{% \theta}_{n})}, converges in distribution to N⁢(0,1)N(0,1) whatever the value of θ\theta.

Proposition 25.7.

With the same assumptions as in corollary 17.3, the Wald interval

[θ^n−z1−α/2⁢se(θ^n),θ^n+z1−α/2⁢se(θ^n)]\bigl{[}\,\hat{\theta}_{n}-z_{1-\alpha/2}\,\mathop{\mathrm{se}}\nolimits(\hat{% \theta}_{n}),\ \hat{\theta}_{n}+z_{1-\alpha/2}\,\mathop{\mathrm{se}}\nolimits(% \hat{\theta}_{n})\,\bigr{]}

has coverage probability that converges to 1−α1-\alpha as n→∞n\to\infty, for all θ∈Θ\theta\in\Theta.

Proof.

Let Zn=(θ^n−θ)/se(θ^n)Z_{n}=(\hat{\theta}_{n}-\theta)/\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}) and z=z1−α/2z=z_{1-\alpha/2}. The event that the interval contains θ\theta is the event |θ^n−θ|≤z⁢se(θ^n)|\hat{\theta}_{n}-\theta|\leq z\,\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}). This event is the same as −z≤Zn≤z-z\leq Z_{n}\leq z. From corollary 17.3 we know that Zn→dZZ_{n}\xrightarrow{\ \mathrm{d}\ }Z with Z∼N⁢(0,1)Z\sim N(0,1). Writing FnF_{n} for the distribution function of ZnZ_{n}, for every ε>0\varepsilon>0 we have

ℙθ⁢(−z≤Zn≤z)\displaystyle\mathbb{P}_{\theta}(-z\leq Z_{n}\leq z)
≥ℙθ⁢(−z<Zn≤z)=Fn⁢(z)−Fn⁢(−z),\displaystyle\geq\mathbb{P}_{\theta}(-z<Z_{n}\leq z)=F_{n}(z)-F_{n}(-z),
ℙθ⁢(−z≤Zn≤z)\displaystyle\mathbb{P}_{\theta}(-z\leq Z_{n}\leq z)
≤ℙθ⁢(−z−ε<Zn≤z)=Fn⁢(z)−Fn⁢(−z−ε).\displaystyle\leq\mathbb{P}_{\theta}(-z-\varepsilon<Z_{n}\leq z)=F_{n}(z)-F_{n% }(-z-\varepsilon).

Since Φ\Phi is continuous everywhere, definition A.13 gives Fn⁢(t)→Φ⁢(t)F_{n}(t)\to\Phi(t) for every tt, and thus the lower bound converges to Φ⁢(z)−Φ⁢(−z)=1−α\Phi(z)-\Phi(-z)=1-\alpha and the upper bound converges to Φ⁢(z)−Φ⁢(−z−ε)\Phi(z)-\Phi(-z-\varepsilon) as n→∞n\to\infty. Letting ε↓0\varepsilon\downarrow 0 and using the continuity of Φ\Phi again, we find that ℙθ⁢(−z≤Zn≤z)→1−α\mathbb{P}_{\theta}(-z\leq Z_{n}\leq z)\to 1-\alpha as n→∞n\to\infty and thus the coverage probability converges to 1−α1-\alpha. This is the required result. ∎

The Wald interval, for 95%95\%, is the interval θ^n±1.96⁢se(θ^n)\hat{\theta}_{n}\pm 1.96\,\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}). This is the interval introduced in lectures 12 and 18. Using the delta method, theorem A.18, the same approach can be used to derive the interval g⁢(θ^n)±z1−α/2⁢|g′⁢(θ^n)|⁢se(θ^n)g(\hat{\theta}_{n})\pm z_{1-\alpha/2}\,|g^{\prime}(\hat{\theta}_{n})|\,\mathop% {\mathrm{se}}\nolimits(\hat{\theta}_{n}) for any smooth function g⁢(θ)g(\theta) (see exercise 25.3). However, the coverage of this interval is only guaranteed in the limit, and section 17.5 lists the cases to be aware of.

Example 25.8.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. Bernoulli with success probability θ∈(0,1)\theta\in(0,1). The MLE is θ^n=X¯\hat{\theta}_{n}=\bar{X} by example 5.3 and the Fisher information is ℐ︀⁢(θ)=1/(θ⁢(1−θ))\mathcal{I}(\theta)=1/\bigl{(}\theta(1-\theta)\bigr{)} by example 11.5. Thus the Wald interval is X¯±z1−α/2⁢X¯⁢(1−X¯)/n\bar{X}\pm z_{1-\alpha/2}\sqrt{\bar{X}(1-\bar{X})/n}. For 3737 successes in n=100n=100 trials we have x¯=0.37\bar{x}=0.37, the standard error is 0.37⋅0.63/100=0.048\sqrt{0.37\cdot 0.63/100}=0.048, and the 95%95\% interval is 0.37±1.96⋅0.048=[0.275,0.465]0.37\pm 1.96\cdot 0.048=[0.275,0.465]. If θ\theta is close to 0 or 11, or if nn is small, the coverage of this interval may be less than 1−α1-\alpha, since the normal approximation to X¯\bar{X} is poor in these cases and the standard error equals zero if all observations are the same.

25.5 One-Sided Intervals and the Choice of Interval

Sometimes it is only important to consider one direction of a confidence interval, for example when we want to show that a failure rate is less than or equal to some value. A lower confidence bound for θ\theta with level 1−α1-\alpha is a statistic L⁢(X)L(X) such that ℙθ⁢(L⁢(X)≤θ)≥1−α\mathbb{P}_{\theta}\bigl{(}L(X)\leq\theta\bigr{)}\geq 1-\alpha for all θ\theta. The corresponding one-sided confidence interval is then [L⁢(X),∞)[L(X),\infty). An upper confidence bound is defined symmetrically. In the pivot method, a one-sided interval can be obtained by considering the single inequality Q⁢(X,θ)≤bQ(X,\theta)\leq b, where bb is the (1−α)(1-\alpha)-quantile of the pivot. For example, for the normal distribution with known variance, this gives the lower bound X¯−z1−α⁢σ/n\bar{X}-z_{1-\alpha}\,\sigma/\sqrt{n} as promised in section 25.3, where z1−αz_{1-\alpha} is used instead of z1−α/2z_{1-\alpha/2} since all of the error probability is allocated to one side. In the context of the pivot method, any pair of values a<ba<b with ℙ⁢(a≤Q≤b)=1−α\mathbb{P}(a\leq Q\leq b)=1-\alpha defines a valid two-sided interval. Here we use the equal-tailed choice, i.e. aa and bb are the (α/2)(\alpha/2)- and (1−α/2)(1-\alpha/2)-quantiles, respectively. This choice is the shortest interval for a symmetric, unimodal pivot density, but may not be shortest for skewed densities like the chi-squared distribution; the interval boundaries can be found in the tables. Exercise 25.2 shows an example where the shortest interval is one-sided. In lecture 28 we will see the same choice of interval again, when we consider credible intervals.

Summary.
  • •
    ​

    A confidence interval covers the true parameter with probability at least 1−α1-\alpha for all θ\theta. 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 θ\theta. For normal samples this can be used to derive the zz-, tt- and chi-squared intervals.

  • •
    ​

    Tests and confidence sets are dual: the values θ0\theta_{0} not rejected by a family of level-α\alpha tests form a 1−α1-\alpha confidence set, and conversely.

  • •
    ​

    The Wald interval θ^n±z1−α/2⁢se(θ^n)\hat{\theta}_{n}\pm z_{1-\alpha/2}\,\mathop{\mathrm{se}}\nolimits(\hat{\theta}% _{n}) asymptotically covers 1−α1-\alpha for all regular models, but the finite-sample coverage may be lower.

  • •
    ​

    One-sided intervals use z1−αz_{1-\alpha} instead of z1−α/2z_{1-\alpha/2}. For two-sided intervals the equal-tailed choice is the norm.

Exercise 25.1.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. exponential with rate θ>0\theta>0 and let T=∑i=1nXiT=\sum_{i=1}^{n}X_{i}. In exercise 13.1 we have seen that 2⁢θ⁢T∼χ2⁢n22\theta T\sim\chi^{2}_{2n}.

  1. 1.
    ​

    Explain why Q=2⁢θ⁢TQ=2\theta T is a pivot for θ\theta and derive the equal-tailed confidence interval for θ\theta with level 1−α1-\alpha.

  2. 2.
    ​

    For n=10n=10 observations ∑ixi=25.0\sum_{i}x_{i}=25.0, compute the 95%95\% interval, using the values χ20,0.0252=9.591\chi^{2}_{20,0.025}=9.591 and χ20,0.9752=34.170\chi^{2}_{20,0.975}=34.170.

  3. 3.
    ​

    The MLE for the rate is θ^=1/X¯\hat{\theta}=1/\bar{X} and the standard error is θ^/n\hat{\theta}/\sqrt{n}, as shown in example 17.4. Compute the Wald interval from proposition 25.7 for the given data and compare the two intervals.

Exercise 25.2.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. uniformly distributed on the set [0,θ][0,\theta] and let M=maxi⁡XiM=\max_{i}X_{i}.

  1. 1.
    ​

    Using the density of MM from example 8.10, show that ℙθ⁢(M/θ≤u)=un\mathbb{P}_{\theta}(M/\theta\leq u)=u^{n} for 0≤u≤10\leq u\leq 1 and conclude that M/θM/\theta is a pivot.

  2. 2.
    ​

    Show that [M,M/α1/n][M,\ M/\alpha^{1/n}] is a confidence interval for θ\theta with level 1−α1-\alpha and compute the interval for n=5n=5, maxi⁡xi=3.2\max_{i}x_{i}=3.2 and α=0.05\alpha=0.05.

  3. 3.
    ​

    Among all intervals [M/b,M/a][M/b,\ M/a] with 0<a<b≤10<a<b\leq 1 and ℙθ⁢(a≤M/θ≤b)=1−α\mathbb{P}_{\theta}(a\leq M/\theta\leq b)=1-\alpha, show that the interval from the previous part is the shortest. (Hint: think about how the length of the interval changes when bb is moved and aa is adjusted to maintain the same coverage.)

Exercise 25.3.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. Poisson with mean θ>0\theta>0. Then the MLE is θ^n=X¯\hat{\theta}_{n}=\bar{X} and the Fisher information is ℐ︀⁢(θ)=1/θ\mathcal{I}(\theta)=1/\theta from example 11.6.

  1. 1.
    ​

    Find the Wald interval for θ\theta with level 1−α1-\alpha and determine the interval for level 95%95\% when n=20n=20 is the number of counts with ∑ixi=30\sum_{i}x_{i}=30.

  2. 2.
    ​

    In exercise 17.2 we have found the asymptotic distribution of the MLE p^0=e−X¯\hat{p}_{0}=e^{-\bar{X}} for p0=ℙθ⁢(X1=0)=e−θp_{0}=\mathbb{P}_{\theta}(X_{1}=0)=e^{-\theta}. Use this distribution to find an approximate confidence interval for p0p_{0} and work out the interval for the given data.

  3. 3.
    ​

    Another interval for p0p_{0} can be found by applying the decreasing function g⁢(θ)=e−θg(\theta)=e^{-\theta} to the boundaries of the interval from the first part. Show that this interval also has asymptotic coverage 1−α1-\alpha, compute the interval for the given data and comment on the differences between the two intervals.

Exercise 25.4.

Let X1,…,XnX_{1},\dots,X_{n} be i.i.d. N⁢(μ,σ2)N(\mu,\sigma^{2}), where both parameters are unknown. For μ0∈ℝ\mu_{0}\in\mathbb{R} consider the test which rejects H0:μ=μ0H_{0}\colon\mu=\mu_{0} if n⁢|X¯−μ0|/S>tn−1,1−α/2\sqrt{n}\,|\bar{X}-\mu_{0}|/S>t_{n-1,1-\alpha/2}.

  1. 1.
    ​

    Show that the test has size α\alpha, independent of the value of σ2\sigma^{2}.

  2. 2.
    ​

    Using theorem 25.6, determine the confidence set of values μ0\mu_{0} which are not rejected. Check that your confidence set coincides with the tt-interval from example 25.4.

  3. 3.
    ​

    For the data given in example 25.4, can you decide whether H0:μ=9H_{0}\colon\mu=9 and H0:μ=10H_{0}\colon\mu=10 should be rejected at level 5%5\%, without having to compute the test statistic?

  4. 4.
    ​

    Now consider the one-sided test which rejects H0:μ=μ0H_{0}\colon\mu=\mu_{0} if n⁢(X¯−μ0)/S>tn−1,1−α\sqrt{n}\,(\bar{X}-\mu_{0})/S>t_{n-1,1-\alpha}. Invert this test and describe the resulting confidence set.