Lecture 22 Hypothesis Testing

In this lecture we turn from estimation to the second question from lecture 1: are the data compatible with a given claim about θ\theta? We first set up the language of hypothesis testing, and then construct two tests for the mean of a normal sample.

22.1 Hypotheses

Throughout, X1,…,XnX_{1},\dots,X_{n} follow a parametric model in the sense of definition 1.1. Questions such as whether a coin is fair or whether a treatment has an effect ask whether the true value of θ\theta belongs to a subset of the parameter space Θ\Theta.

Definition 22.1.

A hypothesis is a statement of the form θ∈Θ′\theta\in\Theta^{\prime} for a subset Θ′⊆Θ\Theta^{\prime}\subseteq\Theta. A hypothesis is called simple, if the corresponding subset consists of a single point, and composite otherwise.

For example, for the mean θ\theta of a normal sample with known variance, the hypothesis θ=10\theta=10 is simple, whereas θ≤10\theta\leq 10, θ>10\theta>10 and θ≠10\theta\neq 10 are composite.

Definition 22.2.

A testing problem consists of a null hypothesis H0:θ∈Θ0H_{0}\colon\theta\in\Theta_{0} and an alternative hypothesis H1:θ∈Θ1H_{1}\colon\theta\in\Theta_{1}, where Θ0\Theta_{0} and Θ1\Theta_{1} are disjoint subsets of Θ\Theta.

From now on, θ0\theta_{0} denotes a fixed value which specifies the hypotheses, and no longer the true value of the parameter as in lectures 16 and 17. Typical testing problems are the simple null hypothesis H0:θ=θ0H_{0}\colon\theta=\theta_{0} against the one-sided alternative H1:θ>θ0H_{1}\colon\theta>\theta_{0} or the two-sided alternative H1:θ≠θ0H_{1}\colon\theta\neq\theta_{0}, and the composite null hypothesis H0:θ≤θ0H_{0}\colon\theta\leq\theta_{0} against H1:θ>θ0H_{1}\colon\theta>\theta_{0}. Often we have Θ1=Θ∖Θ0\Theta_{1}=\Theta\setminus\Theta_{0}, so that exactly one of the two hypotheses is true, but this is not required: the first of these testing problems leaves out the values θ<θ0\theta<\theta_{0}.

The two hypotheses have different roles: the null hypothesis is the default position, and the alternative is the claim which requires evidence before we can act on it.

22.2 Tests, Critical Regions and Errors

A test decides between the two hypotheses and can be described by the set of data values for which it rejects H0H_{0}.

Definition 22.3.

A test of H0H_{0} against H1H_{1} is a rule which for every possible data vector x=(x1,…,xn)x=(x_{1},\dots,x_{n}) decides between “reject H0H_{0}” and “do not reject H0H_{0}”. The set

C={x|the test rejects H0 for the data x}C=\bigl{\{}\,x\mathrel{\big{|}}\text{the test rejects $H_{0}$ for the data $x$% }\,\bigr{\}}

is called the critical region (or rejection region) of the test.

Alternatively, a test can be described by its test function 𝟏C\mathbf{1}_{C}, the indicator function of the critical region, which is given by 𝟏C⁢(x)=𝟏{x∈C}\mathbf{1}_{C}(x)=\mathbf{1}_{\{x\in C\}} in the notation of lecture 8.

In practice, the critical region usually has the form C={x∣T⁢(x)>c}C=\{x\mid T(x)>c\} or C={x∣T⁢(x)≥c}C=\{x\mid T(x)\geq c\} for a statistic TT in the sense of definition 1.3, called the test statistic, and a constant cc called the critical value.

A test can decide wrongly in two different ways.

Definition 22.4.

A type I error occurs, if the test rejects H0H_{0} when H0H_{0} is true. A type II error occurs, if the test does not reject H0H_{0} when H1H_{1} is true.

Table 22.1 shows the four combinations of the hypothesis which is true and the decision of the test.

θ∈Θ0\theta\in\Theta_{0} θ∈Θ1\theta\in\Theta_{1}
x∈Cx\in C (H0H_{0} rejected) type I error correct decision
x∉Cx\notin C (H0H_{0} not rejected) correct decision type II error
Table 22.1: The two kinds of error of a test with critical region CC.

As an example, in a criminal trial the null hypothesis is the innocence of the defendant, and the alternative is guilt. Convicting an innocent person is a type I error, and acquitting a guilty person is a type II error. Under the standard of proof “beyond reasonable doubt”, many acquittals of the guilty are tolerated in order to avoid wrongful convictions, since a type I error is the more serious one. Just as an acquittal does not prove innocence, not rejecting H0H_{0} does not establish H0H_{0}, and thus we say “do not reject H0H_{0}” instead of “accept H0H_{0}”.

22.3 The Power Function, Size and Level

Both error probabilities depend on the true parameter value and can be read off a single function of θ\theta.

Definition 22.5.

The power function of a test with critical region CC is given by

β⁢(θ)=ℙθ⁢(X∈C)=𝔼θ⁢(𝟏C⁢(X))\beta(\theta)=\mathbb{P}_{\theta}(X\in C)=\mathbb{E}_{\theta}\bigl{(}\mathbf{1% }_{C}(X)\bigr{)}

for all θ∈Θ\theta\in\Theta, i.e. the probability of rejecting H0H_{0} when the true parameter value is θ\theta. For θ∈Θ1\theta\in\Theta_{1} the value β⁢(θ)\beta(\theta) is called the power of the test at the alternative θ\theta.

For θ∈Θ0\theta\in\Theta_{0} the value β⁢(θ)\beta(\theta) is the probability of a type I error, and for θ∈Θ1\theta\in\Theta_{1} the value 1−β⁢(θ)1-\beta(\theta) is the probability of a type II error. Enlarging the critical region can only increase β⁢(θ)\beta(\theta), which reduces type II errors at the cost of type I errors, and thus we have to choose which probability to control. Since a type I error means abandoning the default position without good reason, we restrict its probability first and only then consider the power of the test.

Definition 22.6.

The size of a test with critical region CC and power function β\beta is given by

αC=supθ∈Θ0β⁢(θ).\alpha_{C}=\sup_{\theta\in\Theta_{0}}\beta(\theta).

For α∈(0,1)\alpha\in(0,1), the test is a level α\alpha test, if αC≤α\alpha_{C}\leq\alpha.

The number α\alpha is called the significance level, and the common choices 0.050.05 and 0.010.01 are only conventions. For a simple null hypothesis H0:θ=θ0H_{0}\colon\theta=\theta_{0}, the size of the test equals β⁢(θ0)\beta(\theta_{0}). Among all level α\alpha tests, we prefer a test whose power at the alternatives is as large as possible.

22.4 Testing the Mean of a Normal Sample

We now construct tests for X1,…,XnX_{1},\dots,X_{n} i.i.d. N⁢(θ,σ2)N(\theta,\sigma^{2}) with known variance σ2\sigma^{2}. We write Φ\Phi for the standard normal distribution function and zqz_{q} for the qq-quantile of the standard normal distribution, i.e. we have Φ⁢(zq)=q\Phi(z_{q})=q. The most commonly used quantiles are z0.95=1.645z_{0.95}=1.645 and z0.975=1.96z_{0.975}=1.96.

Example 22.7.

We want to test H0:θ=θ0H_{0}\colon\theta=\theta_{0} against H1:θ>θ0H_{1}\colon\theta>\theta_{0} at significance level α\alpha. Since a value of X¯\bar{X} much larger than θ0\theta_{0} is evidence against H0H_{0}, we use X¯\bar{X} as the test statistic and reject if X¯≥c\bar{X}\geq c. By proposition A.4, under H0H_{0} the standardised mean n⁢(X¯−θ0)/σ\sqrt{n}\,(\bar{X}-\theta_{0})/\sigma is standard normally distributed, and thus the probability of a type I error is

β⁢(θ0)=ℙθ0⁢(X¯≥c)=ℙθ0⁢(n⁢(X¯−θ0)σ≥n⁢(c−θ0)σ)=1−Φ⁢(n⁢(c−θ0)σ).\beta(\theta_{0})=\mathbb{P}_{\theta_{0}}(\bar{X}\geq c)=\mathbb{P}_{\theta_{0% }}\Bigl{(}\frac{\sqrt{n}\,(\bar{X}-\theta_{0})}{\sigma}\geq\frac{\sqrt{n}\,(c-% \theta_{0})}{\sigma}\Bigr{)}=1-\Phi\Bigl{(}\frac{\sqrt{n}\,(c-\theta_{0})}{% \sigma}\Bigr{)}.

Setting this probability equal to α\alpha, we find n⁢(c−θ0)/σ=z1−α\sqrt{n}\,(c-\theta_{0})/\sigma=z_{1-\alpha} and thus the resulting test rejects H0H_{0} if

X¯≥θ0+z1−α⁢σn,equivalently ifZ=n⁢(X¯−θ0)σ≥z1−α.\bar{X}\geq\theta_{0}+z_{1-\alpha}\,\frac{\sigma}{\sqrt{n}},\qquad\text{% equivalently if}\qquad Z=\frac{\sqrt{n}\,(\bar{X}-\theta_{0})}{\sigma}\geq z_{% 1-\alpha}.

This is the one-sided zz-test.

To determine its power, we let δ=n⁢(θ−θ0)/σ\delta=\sqrt{n}\,(\theta-\theta_{0})/\sigma. Since n⁢(X¯−θ)/σ\sqrt{n}\,(\bar{X}-\theta)/\sigma is standard normally distributed under ℙθ\mathbb{P}_{\theta}, and since 1−Φ⁢(x)=Φ⁢(−x)1-\Phi(x)=\Phi(-x) by the symmetry of the normal distribution, the power function is

equation (22.1) (22.1)
β⁢(θ)=ℙθ⁢(n⁢(X¯−θ)σ≥z1−α−δ)=Φ⁢(δ−z1−α).\beta(\theta)=\mathbb{P}_{\theta}\Bigl{(}\frac{\sqrt{n}\,(\bar{X}-\theta)}{% \sigma}\geq z_{1-\alpha}-\delta\Bigr{)}=\Phi(\delta-z_{1-\alpha}).

The left-hand panel of figure 22.1 shows this function. As nn increases the curve gets steeper, and exercise 22.1 determines the sample size needed for a given power.

For n=25n=25, σ=2\sigma=2, θ0=10\theta_{0}=10 and α=0.05\alpha=0.05 the test rejects if X¯≥10+1.645⋅2/5=10.658\bar{X}\geq 10+1.645\cdot 2/5=10.658. At the alternative θ=11\theta=11 we have δ=2.5\delta=2.5 and the power is Φ⁢(2.5−1.645)=Φ⁢(0.855)=0.804\Phi(2.5-1.645)=\Phi(0.855)=0.804. At θ=10.5\theta=10.5 it is only Φ⁢(1.25−1.645)=Φ⁢(−0.395)=0.346\Phi(1.25-1.645)=\Phi(-0.395)=0.346, so a shift of a quarter of a standard deviation is detected in only about a third of all samples.

The values θ<θ0\theta<\theta_{0} belong to neither hypothesis of this example. Since the power function (22.1) is increasing, the test also has size supθ≤θ0β⁢(θ)=β⁢(θ0)=α\sup_{\theta\leq\theta_{0}}\beta(\theta)=\beta(\theta_{0})=\alpha for the composite null hypothesis H0:θ≤θ0H_{0}\colon\theta\leq\theta_{0}, which covers these values. This is why definition 22.6 takes a supremum.

Example 22.8.

To detect departures in both directions, we test H0:θ=θ0H_{0}\colon\theta=\theta_{0} against H1:θ≠θ0H_{1}\colon\theta\neq\theta_{0}. The two-sided zz-test rejects H0H_{0} if

|X¯−θ0|≥z1−α/2⁢σn,equivalently if|Z|≥z1−α/2.|\bar{X}-\theta_{0}|\geq z_{1-\alpha/2}\,\frac{\sigma}{\sqrt{n}},\qquad\text{% equivalently if}\qquad|Z|\geq z_{1-\alpha/2}.

Since Z=n⁢(X¯−θ0)/σZ=\sqrt{n}\,(\bar{X}-\theta_{0})/\sigma is standard normally distributed under H0H_{0} and the normal distribution is symmetric, the size of this test is 2⁢(1−Φ⁢(z1−α/2))=α2\bigl{(}1-\Phi(z_{1-\alpha/2})\bigr{)}=\alpha. With δ\delta as in example 22.7, the same standardisation gives the power function

β⁢(θ)=Φ⁢(−z1−α/2−δ)+Φ⁢(δ−z1−α/2),\beta(\theta)=\Phi(-z_{1-\alpha/2}-\delta)+\Phi(\delta-z_{1-\alpha/2}),

shown in the right-hand panel of figure 22.1. This function is symmetric about θ0\theta_{0} and has its minimum value α\alpha at this point (exercise 22.2). For n=25n=25, σ=2\sigma=2, θ0=10\theta_{0}=10 and α=0.05\alpha=0.05 the test rejects if |X¯−10|≥1.96⋅2/5=0.784|\bar{X}-10|\geq 1.96\cdot 2/5=0.784. At θ=11\theta=11 we have δ=2.5\delta=2.5 and the power is Φ⁢(−4.46)+Φ⁢(0.54)=0.705\Phi(-4.46)+\Phi(0.54)=0.705.

Two panels showing power against theta, for theta
from 8 to 12. Left panel, one-sided test: S-shaped curves which
are close to 0 below theta = 10, pass through 0.05 at theta = 10
and rise to 1; the curve for n = 100 rises more steeply than the
curve for n = 25. Right panel, two-sided test: U-shaped curves,
symmetric about theta = 10, with minimum 0.05 at theta = 10 and
close to 1 at both ends; again the curve for n = 100 is the
steeper one. A dotted horizontal line marks the value 0.05.
Figure 22.1: Power functions of the one-sided zz-test (left) and the two-sided zz-test (right) of H0:θ=10H_{0}\colon\theta=10 at level 0.050.05, for σ=2\sigma=2 and the sample sizes n=25n=25 (solid) and n=100n=100 (dashed).

At θ=11\theta=11 the one-sided test has power 0.8040.804, whereas the two-sided test has power only 0.7050.705, since the one-sided test places all of its type I error probability in the upper tail. It is useless, however, for detecting values θ<θ0\theta<\theta_{0}, and lecture 23 shows that no single test is best for both directions. Before we consider the data, we must therefore decide which departures from H0H_{0} are of interest.

22.5 The pp-Value

A test at a fixed level only states whether H0H_{0} is rejected. The pp-value also records how extreme the observed value of the test statistic is under H0H_{0}.

Definition 22.9.

For a test which rejects H0H_{0} for large values of a test statistic TT, the pp-value of the data xx is given by

equation (22.2) (22.2)
p⁢(x)=supθ∈Θ0ℙθ⁢(T⁢(X)≥T⁢(x)).p(x)=\sup_{\theta\in\Theta_{0}}\mathbb{P}_{\theta}\bigl{(}T(X)\geq T(x)\bigr{)}.

For a test which rejects for small values of TT the inequality is reversed.

For a simple null hypothesis the supremum reduces to ℙθ0\mathbb{P}_{\theta_{0}}. The value p⁢(x)p(x) is the size of the test with critical region {T≥T⁢(x)}\{T\geq T(x)\}. We now compare the tests with critical regions of the form {T≥c}\{T\geq c\} for different critical values cc. Such a test rejects H0H_{0} for the data xx if and only if c≤T⁢(x)c\leq T(x). Its critical region then contains {T≥T⁢(x)}\{T\geq T(x)\}, and thus its size is at least p⁢(x)p(x). Conversely, if p⁢(x)≤αp(x)\leq\alpha, then the test with c=T⁢(x)c=T(x) has level α\alpha and rejects H0H_{0} for the data xx. It follows that among the level α\alpha tests with critical regions of the form {T≥c}\{T\geq c\}, the one with the smallest critical value rejects H0H_{0} if and only if p⁢(x)≤αp(x)\leq\alpha. For the zz-tests of section 22.4, this is the test constructed there. If p⁢(x)≤αp(x)\leq\alpha we call the data significant at level α\alpha.

For the one-sided zz-test we find p⁢(x)=1−Φ⁢(z)p(x)=1-\Phi(z), where z=n⁢(x¯−θ0)/σz=\sqrt{n}\,(\bar{x}-\theta_{0})/\sigma is the observed value of ZZ. The two-sided zz-test uses T=|Z|T=|Z|, and we find p⁢(x)=2⁢(1−Φ⁢(|z|))p(x)=2\bigl{(}1-\Phi(|z|)\bigr{)}. In the situation of example 22.7, the observed mean x¯=10.9\bar{x}=10.9 gives z=2.25z=2.25 and thus p=1−Φ⁢(2.25)=0.0122p=1-\Phi(2.25)=0.0122 for the one-sided test and p=0.0244p=0.0244 for the two-sided test.

The pp-value is easily misread. It is not the probability that H0H_{0} is true: the parameter θ\theta is a fixed, unknown number, and the probability in (22.2) refers to the data. Nor does a large pp-value establish H0H_{0}, since data compatible with H0H_{0} may be compatible with many alternatives as well: the test from example 22.7 has power only 0.3460.346 at θ=10.5\theta=10.5.

For a simple null hypothesis and a continuous test statistic, the distribution of the pp-value under H0H_{0} does not depend on the model.

Lemma 22.10.

Let H0:θ=θ0H_{0}\colon\theta=\theta_{0} be simple and let T⁢(X)T(X) have a continuous distribution function FF under ℙθ0\mathbb{P}_{\theta_{0}}. Then the pp-value of a test which rejects for large values of TT satisfies ℙθ0⁢(p⁢(X)≤u)=u\mathbb{P}_{\theta_{0}}\bigl{(}p(X)\leq u\bigr{)}=u for all u∈(0,1)u\in(0,1), i.e. p⁢(X)p(X) is uniformly distributed on (0,1)(0,1) under H0H_{0}.

Proof.

Fix u∈(0,1)u\in(0,1). Since FF is continuous, we have p⁢(x)=1−F⁢(T⁢(x))p(x)=1-F\bigl{(}T(x)\bigr{)}. Let tt be the smallest number with F⁢(t)=1−uF(t)=1-u, which exists since FF is continuous with limits 0 and 11. Since FF is non-decreasing and tt is the smallest such number, p⁢(X)≤up(X)\leq u holds if and only if T⁢(X)≥tT(X)\geq t, and thus ℙθ0⁢(p⁢(X)≤u)=1−F⁢(t)=u\mathbb{P}_{\theta_{0}}\bigl{(}p(X)\leq u\bigr{)}=1-F(t)=u. This completes the proof. ∎

Summary.
  • •
    ​

    A testing problem contrasts a null hypothesis H0:θ∈Θ0H_{0}\colon\theta\in\Theta_{0} against an alternative H1:θ∈Θ1H_{1}\colon\theta\in\Theta_{1}. A hypothesis is simple, if the corresponding subset of Θ\Theta is a single point, and composite otherwise.

  • •
    ​

    A test is given by its critical region CC, typically of the form C={x∣T⁢(x)≥c}C=\{x\mid T(x)\geq c\} for a test statistic TT and critical value cc.

  • •
    ​

    A type I error occurs when H0H_{0} is true but is rejected by the test, and a type II error when H1H_{1} is true but H0H_{0} is not rejected. The power function β⁢(θ)=ℙθ⁢(X∈C)\beta(\theta)=\mathbb{P}_{\theta}(X\in C) gives the probability of type I errors for θ∈Θ0\theta\in\Theta_{0} and the power of the test for θ∈Θ1\theta\in\Theta_{1}.

  • •
    ​

    The size of a test is supΘ0β\sup_{\Theta_{0}}\beta. A level α\alpha test has size at most α\alpha. The level is chosen first, and then the power of the test can be considered.

  • •
    ​

    For the mean of a normal sample with known variance, the one-sided zz-test has an S-shaped power function and the two-sided zz-test a U-shaped one. Before looking at the data, we decide which departures from H0H_{0} are of interest.

  • •
    ​

    The pp-value is the probability under H0H_{0} of a test statistic at least as extreme as the observed one, and H0H_{0} is rejected at level α\alpha if and only if p⁢(x)≤αp(x)\leq\alpha. It is not the probability that H0H_{0} is true, and a large pp-value does not establish H0H_{0}. For a simple null hypothesis and a continuous test statistic, the pp-value is uniformly distributed on (0,1)(0,1) under H0H_{0}.

Exercise 22.1.

Consider the one-sided zz-test from example 22.7, at level α\alpha, and let θ1>θ0\theta_{1}>\theta_{0} be the alternative and 1−γ∈(α,1)1-\gamma\in(\alpha,1) be the target power.

  1. 1.
    ​

    Show that the test has power at least 1−γ1-\gamma at θ1\theta_{1} if and only if

    n≥((z1−α+z1−γ)⁢σθ1−θ0)2.n\geq\Bigl{(}\frac{(z_{1-\alpha}+z_{1-\gamma})\,\sigma}{\theta_{1}-\theta_{0}}% \Bigr{)}^{2}.
  2. 2.
    ​

    For σ=2\sigma=2, θ1−θ0=0.5\theta_{1}-\theta_{0}=0.5, α=0.05\alpha=0.05 and target power 0.90.9 (use z0.9=1.282z_{0.9}=1.282), determine the smallest sample size which achieves the target power.

  3. 3.
    ​

    How does the required sample size change when the difference θ1−θ0\theta_{1}-\theta_{0} is halved? What happens when σ\sigma is doubled?

Exercise 22.2.

Consider the two-sided zz-test from example 22.8, with power function β⁢(θ)=g⁢(δ)\beta(\theta)=g(\delta) where g⁢(δ)=Φ⁢(−k−δ)+Φ⁢(δ−k)g(\delta)=\Phi(-k-\delta)+\Phi(\delta-k), k=z1−α/2k=z_{1-\alpha/2} and δ=n⁢(θ−θ0)/σ\delta=\sqrt{n}\,(\theta-\theta_{0})/\sigma.

  1. 1.
    ​

    Show that g⁢(−δ)=g⁢(δ)g(-\delta)=g(\delta) for all δ∈ℝ\delta\in\mathbb{R}, and conclude that β\beta is symmetric about θ0\theta_{0}.

  2. 2.
    ​

    Show that gg is strictly increasing on [0,∞)[0,\infty). Conclude that β\beta has its minimum value α\alpha at θ0\theta_{0}.

Exercise 22.3.

Let X1,…,X10X_{1},\dots,X_{10} be i.i.d. Bernoulli with success probability θ\theta and consider testing H0:θ=1/2H_{0}\colon\theta=1/2 against H1:θ>1/2H_{1}\colon\theta>1/2 using the test which rejects if T=∑iXi≥cT=\sum_{i}X_{i}\geq c for an integer cc.

  1. 1.
    ​

    Write down the size of the test as a function of cc, using the binomial distribution of TT under H0H_{0}.

  2. 2.
    ​

    Determine the smallest cc such that the test has level 0.050.05. Compute the size of the test for this case. Show also that no choice of cc gives a size of exactly 0.050.05.

  3. 3.
    ​

    Determine the power of the test from the previous part when θ=0.7\theta=0.7, θ=0.8\theta=0.8 and θ=0.9\theta=0.9. Comment on the capabilities and limitations of the test with ten observations.

  4. 4.
    ​

    Nine successes are observed. Compute the pp-value and state the decision at level 0.050.05.

Exercise 22.4.

Let X1,…,Xn∼Uniform⁢(0,θ)X_{1},\dots,X_{n}\sim\text{Uniform}(0,\theta) be i.i.d. as in example 1.2 and let M=maxi⁡XiM=\max_{i}X_{i}, whose density was found in example 8.9. We test H0:θ=θ0H_{0}\colon\theta=\theta_{0} against H1:θ>θ0H_{1}\colon\theta>\theta_{0}.

  1. 1.
    ​

    Show that ℙθ⁢(M≤m)=(m/θ)n\mathbb{P}_{\theta}(M\leq m)=(m/\theta)^{n} for 0≤m≤θ0\leq m\leq\theta.

  2. 2.
    ​

    Consider the test which rejects if M>cM>c, for a constant c≤θ0c\leq\theta_{0}. Determine the size of this test and the value of cc which makes the size equal to α\alpha.

  3. 3.
    ​

    Determine the power function of the test from the previous part, and evaluate this function at n=5n=5, θ0=1\theta_{0}=1, α=0.05\alpha=0.05 and θ=1.2\theta=1.2.

  4. 4.
    ​

    Consider a second test, which rejects if M>θ0M>\theta_{0}. Show that this test has size 0. Determine the power function of this test and compare the power functions of the two tests. Which of the two tests would you choose and why?

Exercise 22.5.

A sample of size n=16n=16 from N⁢(θ,σ2)N(\theta,\sigma^{2}) with known σ=4\sigma=4 has mean x¯=52.3\bar{x}=52.3.

  1. 1.
    ​

    Determine the pp-value of the one-sided zz-test with H0:θ=50H_{0}\colon\theta=50 against H1:θ>50H_{1}\colon\theta>50 and state the decisions at levels 0.050.05 and 0.010.01.

  2. 2.
    ​

    Determine the pp-value of the two-sided test against H1:θ≠50H_{1}\colon\theta\neq 50 and state the same two decisions.

  3. 3.
    ​

    Determine the pp-value of the one-sided test against H1:θ<50H_{1}\colon\theta<50, which rejects for small values of ZZ. Compare with the first part, and explain why the alternative has to be chosen before the data are seen.

  4. 4.
    ​

    Your colleague summarises the first part of the question as “there is a 1.1%1.1\% chance that the mean is 5050”. What is wrong with this sentence? Write one correct sentence to summarise the first part of the question.

  5. 5.
    ​

    Verify lemma 22.10 directly for the one-sided zz-test: show that under H0H_{0} the pp-value p⁢(X)=1−Φ⁢(Z)p(X)=1-\Phi(Z) with Z=n⁢(X¯−θ0)/σZ=\sqrt{n}\,(\bar{X}-\theta_{0})/\sigma satisfies ℙθ0⁢(p⁢(X)≤u)=u\mathbb{P}_{\theta_{0}}\bigl{(}p(X)\leq u\bigr{)}=u for all u∈(0,1)u\in(0,1).