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, 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 26.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.

If the model also has a nuisance parameter ν\nu, here and below ℙθ\mathbb{P}_{\theta} is replaced by ℙθ,ν\mathbb{P}_{\theta,\nu} and the requirements must hold for all values of (θ,ν)(\theta,\nu). The endpoints of the interval are statistics, while the parameter θ\theta is an unknown constant. The definition requires only an inequality, since for discrete data the coverage probability jumps as θ\theta changes and equality is usually impossible. 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 (as it is in the Bayesian approach of lecture 28). The statement “95%95\% 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.

Definition 26.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. If QQ has a continuous distribution, 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 solutions form an interval which contains θ\theta with probability exactly 1−α1-\alpha.

In the following, we use the normal quantiles zpz_{p} from lecture 22, which satisfy z1−p=−zpz_{1-p}=-z_{p} by symmetry, and 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 26.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 we know X¯∼N⁢(θ,σ2/n)\bar{X}\sim N(\theta,\sigma^{2}/n) and thus we get

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

for all θ\theta. Since this distribution does not depend on θ\theta, QQ is a pivot, and bracketing QQ between −z1−α/2-z_{1-\alpha/2} and z1−α/2z_{1-\alpha/2} and solving for θ\theta gives the confidence interval

[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 interval from section 26.1.

If σ2\sigma^{2} is unknown, QQ cannot be used, since it depends on the unknown σ\sigma and the resulting interval cannot be computed from the data. Replacing σ\sigma by the sample standard deviation SS gives a new pivot, whose distribution is the tt distribution from appendix A.

Example 26.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.4, the two random variables

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.5, 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. Bracketing TT as above gives 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. For the data from example 26.3, with sample standard deviation s=2.1s=2.1, tables of the tt distribution give t15,0.975=2.131t_{15,0.975}=2.131 and thus the 95%95\% interval is 10.3±2.131⋅2.1/4=[9.18,11.42]10.3\pm 2.131\cdot 2.1/4=[9.18,11.42]. This interval is wider, partly because the quantile 2.1312.131 is larger than z0.975=1.96z_{0.975}=1.96, which is the price we pay for not knowing σ\sigma, and partly because s=2.1s=2.1 happens to be larger than σ=2\sigma=2.

Example 26.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}. 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 tables of the chi-squared distribution give χ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.

26.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. As an illustration, the two-sided zz-test from example 22.8 rejects H0:θ=θ0H_{0}\colon\theta=\theta_{0} if |X¯−θ0|≥z1−α/2⁢σ/n|\bar{X}-\theta_{0}|\geq z_{1-\alpha/2}\,\sigma/\sqrt{n}. 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 X¯\bar{X} has a density. Using definitions 22.3 and 22.6, the following lemma shows that this construction works for every family of tests.

Lemma 26.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}, i.e. the set of samples for which H0H_{0} is not rejected (the complement of the critical region). 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 the null hypothesis H0:θ=θ0H_{0}\colon\theta=\theta_{0} with θ0=θ\theta_{0}=\theta is true, and thus under ℙθ\mathbb{P}_{\theta} 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 lemma 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). Exercise 26.4 repeats the zz-test example 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.

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 θ^n\hat{\theta}_{n} be the maximum likelihood estimator and se(θ^n)\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}) its standard error from lecture 17. Then the standardised error (θ^n−θ)/se(θ^n)(\hat{\theta}_{n}-\theta)/\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}) converges in distribution to N⁢(0,1)N(0,1), whatever the value of θ\theta. Here θ\theta denotes the true value, which the corollary writes as θ0\theta_{0}. Solving the inequality |(θ^n−θ)/se(θ^n)|≤z1−α/2|(\hat{\theta}_{n}-\theta)/\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n})|% \leq z_{1-\alpha/2} for θ\theta gives the following interval.

Definition 26.7.

Let θ^n\hat{\theta}_{n} be the maximum likelihood estimator, with standard error

se(θ^n)=1ℐ︀n⁢(θ^n).\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n})=\frac{1}{\sqrt{\mathcal{I}_{n}% (\hat{\theta}_{n})}}.

The Wald interval with approximate level 1−α1-\alpha is given by

[θ^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{]}.

The following result justifies the level asymptotically.

Proposition 26.8.

With the same assumptions as in corollary 17.3, the coverage probability of the Wald interval 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 interval contains θ\theta if and only if |Zn|≤z|Z_{n}|\leq z. By corollary 17.3 we have Zn→dZZ_{n}\xrightarrow{\ \mathrm{d}\ }Z with Z∼N⁢(0,1)Z\sim N(0,1), and thus |Zn|→d|Z||Z_{n}|\xrightarrow{\ \mathrm{d}\ }|Z| by the continuous mapping theorem (proposition A.17). Since the distribution function of |Z||Z| is continuous, definition A.13 gives

ℙθ⁢(|Zn|≤z)⟶ℙ⁢(|Z|≤z)=1−α.\mathbb{P}_{\theta}\bigl{(}|Z_{n}|\leq z\bigr{)}\longrightarrow\mathbb{P}\bigl% {(}|Z|\leq z\bigr{)}=1-\alpha.

This completes the proof. ∎

For 95%95\%, this is the interval θ^n±1.96⁢se(θ^n)\hat{\theta}_{n}\pm 1.96\,\mathop{\mathrm{se}}\nolimits(\hat{\theta}_{n}) of lectures 12, 17 and 18. Section 17.5 lists the cases where its coverage can be poor.

Example 26.9.

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.0483\sqrt{0.37\cdot 0.63/100}=0.0483, and the 95%95\% interval is

0.37±1.96⋅0.0483=[0.275,0.465].0.37\pm 1.96\cdot 0.0483=[0.275,0.465].

If θ\theta is close to 0 or 11, or if nn is small, the coverage of this interval may be much less than 1−α1-\alpha. If X¯=0\bar{X}=0, the formula gives the interval [0,0][0,0], which misses θ\theta, and for every nn this happens with probability close to 11 when θ\theta is small. Thus for no nn is the Wald interval a confidence interval with level 1−α1-\alpha 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 θ\theta with level 1−α1-\alpha is a statistic U⁢(X)U(X) such that ℙθ⁢(θ≤U⁢(X))≥1−α\mathbb{P}_{\theta}\bigl{(}\theta\leq U(X)\bigr{)}\geq 1-\alpha for all θ\theta. The corresponding one-sided confidence interval consists of all θ∈Θ\theta\in\Theta with θ≤U⁢(X)\theta\leq U(X). A lower confidence bound L⁢(X)L(X) 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 Q⁢(X,θ)≥−z1−αQ(X,\theta)\geq-z_{1-\alpha} gives the upper bound X¯+z1−α⁢σ/n\bar{X}+z_{1-\alpha}\,\sigma/\sqrt{n}, where z1−αz_{1-\alpha} replaces z1−α/2z_{1-\alpha/2} since all of the error probability is allocated to one side.

For a two-sided interval, any pair of values a<ba<b with ℙ⁢(a≤Q≤b)=1−α\mathbb{P}(a\leq Q\leq b)=1-\alpha defines a valid interval in the pivot method. 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, which tables give. For the zz and tt pivots, whose densities are symmetric and decrease away from zero, this gives the shortest interval for θ\theta. 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.

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.

  • •
    ​

    In regular models, the coverage probability of the Wald interval θ^n±z1−α/2⁢se(θ^n)\hat{\theta}_{n}\pm z_{1-\alpha/2}\,\mathop{\mathrm{se}}\nolimits(\hat{\theta}% _{n}) converges to 1−α1-\alpha for each fixed θ\theta, but the finite-sample coverage may be much lower.

  • •
    ​

    One-sided intervals use the (1−α)(1-\alpha)-quantile of the pivot in place of the (1−α/2)(1-\alpha/2)-quantile. For two-sided intervals the equal-tailed choice is the norm.

Exercise 26.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 with ∑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 definition 26.7 for the given data and compare the two intervals.

Exercise 26.2.

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

  1. 1.
    ​

    Using the density of MM from example 8.9, 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 26.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\% for n=20n=20 counts with ∑ixi=30\sum_{i}x_{i}=30.

  2. 2.
    ​

    In exercise 17.3 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, with θ\theta replaced by X¯\bar{X} in the asymptotic variance, 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 26.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, whatever the value of σ2\sigma^{2}.

  2. 2.
    ​

    Using lemma 26.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 26.4.

  3. 3.
    ​

    For the data given in example 26.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.