The Normal Case: Testing Hypotheses About the Mean Refer to Example 11 and observe that T(x) = x and Q(θ) is strictly increasing. Therefore the appropriate test for testing H_{0}\colon\theta\ \leq\theta_{0} against H_{A}\!: \theta\gt \theta_{0} at level of significance α is given by (5) and (6)
\varphi(x_{1},\dots,x_{n})= \begin{cases} 1 & {\mathrm{if~}}V(x_1,\dots,x_n)\gt C\\ \gamma & {\mathrm{if~}}V(x_1,\dots,x_n)=C \\ 0 & {\mathrm{if~}}V(x_1,\dots,x_n) \lt C, \end{cases} \qquad(5)\\ E_{\theta_{0}}\varphi(X_{1}{,\,\dots\,,\,X_{n}})= P_{\theta_{0}}[V(X_{1}{,\,\dots\,,X_{n}})\gt C] \left.+{\gamma}P_{\theta_{0}}[{V}(X_{1}{,\dots,X_{n}})={ C}]=\alpha.\right.\qquad\left(6\right)with \gamma=0. That is,
\varphi(x_{1},\dots,x_{n})= \begin{cases} 1 & {\mathrm{if~}}\textstyle\sum_{i=1}^{n}x_{i}\gt C\\ 0 & {\mathrm{otherwise}}, \end{cases} \qquad(29)or
\varphi(x_{1},\dots,x_{n})= \begin{cases} 1 & {\mathrm{if~}} \frac{\sqrt{n}(\bar x -\theta_0)}{\sigma}\gt z_\alpha\\ 0 & {\mathrm{otherwise}}, \end{cases} \qquad(29^\prime)because
\alpha=E_{\theta_{0}}\varphi(X_{1},\ldots,X_{n})=P_{\theta_{0}}\left(\sum\limits_{i=1}^{n}X_{i}\gt C\right) =P_{\theta_{0}}\bigg[{\frac{\sqrt{n}(\bar{X}-\theta_{0})}{\sigma}}\gt {\frac{C-n\theta_{0}}{\sigma\sqrt{n}}}\bigg],so that \frac{C-n\theta_{0}}{\sigma{\sqrt{n}}}=z_{\alpha} and therefore
C=n\theta_{0}+z_{\alpha}\sigma\sqrt{n};\qquad\qquad\qquad\qquad\qquad\qquad(30)this is so, because {\frac{\sqrt{n}({\bar{X}}-\theta_{0})}{\sigma}}=Z\sim N(0,1), and recall that P(Z\gt {z}_{\alpha})=\alpha.
The power of the test is given by:
because, on account of (30):
\pi_{\varphi}(\theta)=P_{\theta}{\Biggl(}\sum\limits_{i=1}^{n}X_{i}\gt C\Biggr)=P_{\theta}{\Biggl[}\sum\limits_{i=1}^{n}X_{i}-n\theta\gt n(\theta_{0}-\theta)+{z}_{\alpha}{\sigma}{\sqrt{n}}{\Biggr]} =P_{\theta}\left[{\frac{\sum_{i=1}^{n}X_{i}-n\theta}{\sigma\sqrt{n}}}\gt z_{\alpha}+{\frac{\sqrt{n}(\theta_{0}-\theta)}{\sigma}}\right] =P\bigg[Z\gt \ z_{\alpha}+\frac{\sqrt{n}(\theta_{0}-\theta)}{\sigma}\bigg]=1-\Phi\bigg[z_{\alpha}+\frac{\sqrt{n}(\theta_{0}-\theta)}{\sigma}\bigg],since {\frac{\Sigma_{i=1}^{n}X_{i-}n\theta}{\sigma{\sqrt{n}}}}=Z\sim N(0,1).
N u m e r i c a l ~E xam p l e In reference to Example 5, focus on patients treated with the new treatment, and call Y\sim N(\theta,\sigma^{2})\;(\sigma known) the survival time. On the basis of observations on n = 25 such patients, we wish to test the hypothesis H_{0}\colon\theta\leq{{5}} (in years) against H_{A}\colon\theta\gt {{5}} at level of significance α = 0.01. For simplicity, take \sigma = 1.
Here z_{\alpha}=z_{0.01}=2.33, so that C = 25 × 5 + 2.33 × 1 × 5 = 136.65. Thus, reject \textstyle H_{0} if the total of survival years is >136.65, and accept \textstyle H_{0} otherwise.
The power of the test is given by (31) and is:
For \theta=5.5,\pi_{\varphi }(5.5)=1 – \Phi[2.33+5(5-5.5)]=1-\Phi(-0.17)
=\Phi(0.17)=0.567495;
and for \theta=6,\pi_{\varphi}(6)=1-\Phi[2.33+{{5}}(6-{{5}}.{{5}})]=1-\Phi(-2.67)
=\Phi(2.67)=0.996207.
If we suppose that the observed value of \textstyle\sum_{i=1}^{25}x_{i}is equal to 138, then the P-value is P(\textstyle \sum_{i=1}^{25}X_{i}\gt 138)=1-\Phi({\textstyle{\frac{138-125}{5}}})=\,1- \Phi(2.6)=\,1-0.995339=0.004661, so that the result is highly statistically significant.