# LRT and Power for a Normal Distribution

For one observation $Y$ from a normal distribution with variance $1$ and mean $0$ or $2$, consider $H_{0}:\mu=0$ and $H_{1}:\mu=2$. Suppose first that we observe only $Y$. Construct a size $\alpha$ likelihood ratio test. Give explicitly the rejection region in terms of $Y$, and find the power of this test.

--I found the LRT test statistic of $$\lambda(Y)=\frac{e^{-y^{2}/2}}{e^{-y^{2}/2}+e^{-(y-2)^{2}/2}},$$ and a rejection region of $\{Y:\lambda(Y)\geq c\}$, where $\sup_{H_{0}}P(\lambda(Y)\leq c)=\alpha$.

--I am finding the calculation a bit messy for finding the power. I would have to find $\beta(\mu)=P(Y\in R)$, where $R$ is the rejection region.

Any way I can clean this up?

-
Seems related to this previous question of yours. By the way, what happened to it? –  Did Jul 19 '13 at 23:08
It's a completely different question, and I solved the other one. –  Kirk Fogg Jul 19 '13 at 23:10
You're missing some minus signs. –  Michael Hardy Jul 19 '13 at 23:11
Oh oops, forgot to type those in. I will edit this. –  Kirk Fogg Jul 19 '13 at 23:11
Compare "I'm not sure where to even start for this problem. That is why I posted it. – Kirk Fogg Jul 13 at 19:48" and "deleted by Kirk Fogg Jul 13 at 19:52". This is what I call a steep learning curve... Anyway, the usual procedure in such a case is to post your own solution instead of deleting the question. After a while, you may even accept it. –  Did Jul 19 '13 at 23:16

$$L(\mu) \propto e^{-(y-\mu)^2/2}.$$ The value of $\mu\in\{0,2\}$ that maximizes this is $$\widehat\mu = \begin{cases} 0 & \text{if }y<1, \\ 2 & \text{if }y>1. \end{cases}$$ Thus the maximized value is $$L(\widehat\mu) = \begin{cases} e^{-y^2/2} & \text{if }y<1, \\ e^{-(y-2)^2/2} & \text{if }y>1. \end{cases}$$ That's the denominator in your fraction; the numerator is $e^{-y^2/2}$. Hence the value of the fraction is $$\begin{cases} 1 & \text{if }y<1, \\[10pt] \frac{e^{-y^2/2}}{e^{-(y-2)^2/2}} & \text{if }y>1. \end{cases}$$ The second case simplifies: $$e^{-y^2/2 + (y-2)^2/2} = e^{(-4y+4)/2}.$$ So your test statistic is $$\begin{cases} 1 & \text{if }y<1, \\[10pt] e^{(-4y+4)/2} & \text{if }y>1. \end{cases}$$ or any monotone function of that quantity.