For some reason, I've been stuck on this question, even though other questions of this type weren't that much of a problem to me before (with for instance the binomial distribution). The situation is as follows:
Suppose $X_1…X_{25}$ is a sample from an $N(mu,2^2)$-distribution. We would like to test for $H_0: muleq 0$; $H_1:mu>0$, with significance $a_o=0.05$.
Calculate the power function of this test at the point $mu=0.5$.
My approach:
Earlier in this problem I had to calculate the critical values and found the following: $K_T = {Tin mathbb{R}:Tgeq 1.64}$} and $K={muinmathbb{R}:mugeq0.656}$} where $T=sqrt{n}frac{mu-mu_0}{sigma}$
For $H_0$ we use $mu_0=0$ and find (with a table or calculator) these values for $c$ in $P(Tgeq c)leq0.05$.
Now we have to use $mu_0=0.5$. Given this information, we have to calculate $P_{0.5}(Xin K)$ which is the power function. I thought of two things, but they both give me wrong answers.
First I tried to just calculate $P(Tin K_T$) given $mu=0.5$, but I stumbled upon a problem; I didn't seem to have used the fact that $mu=0$ in my calculation for the critical values for $K_T$. I just chose $T=sqrt{n}frac{mu-mu_0}{sigma} =frac{5}{2}mu$ and said that $Tsim N(0,1)$ and proceeded to use the table. Only for $K$ I used that $T=frac{5}{2}mugeq1.64 iff mugeq0.656$. (so here we used $mu_0=0implies T=frac{5}{2}mu$)
So, changing to $mu_o=0.5$ didn't really give me anything in this calculation, if I would just put it in there I would get that $P(Tin K_T)=0.05=a_0$ again.
Then I tried to calculate
$$P(Xin K)=P(N(0.5,2^2)geq1.64)=$$
$$P(4N(0,1)+0.5geq1.64)=P(N(0,1)geq 0.285)=0.39$$
This comes closer, but the correction model says it's $0.34$. I did find, that $P(N(0,1)geq a)=0.34$ for $a=0.41$ which is $1.64/4$, the original critical value divided by $4$.
I really feel like I'm missing a (relatively simple) key element of the way to approach this problem. Any corrections, tips, hints or explanations are highly appreciated!
Best Answer
Under $H_o$, find the critical value (C) for $bar X$, which is $$Pr(bar X > C) =Pr(frac {bar X}{2/5}>frac C{2/5}) = 0.05$$ We have $frac C{2/5} = 1.64$, so $C= 1.64times frac 25=0.656$. You did it correctly.
Then think about if $H_a: mu = 0.5$ is true, $bar X sim Nleft(0.5, frac {2^2}{25}right)$.
The Probability of $bar X>0.656$, which is power. is
$$Pr(bar X >0.656) = Pr(frac{bar X -0.5}{2/5}>frac {0.656-0.5}{2/5})$$ It equals $Z = (0.656 – 0.5) times 5/2 = 0.39$
From standard normal distribution, $Pr(Z>0.39) = 0.3483$