# Likelihood Ratio Test for a Normal distribution with unknown $\mu$ and $\sigma^2=1$

Let $Y_1,...,Y_n$ be a random sample from a Normal distribution with unknown mean $\mu$ and variance $\sigma^2=1$. Consider $H_0:\mu=\mu_0$ against $H_a:\mu\ne\mu_0$. Find the likelihood ratio test, $\lambda$, and its rejection region.

I found that $$\lambda=\exp\left[-\frac{n\left(\bar{y}-\mu_0\right)^2}{2}\right].$$ Then,

$$-2\ln\lambda=n\left(\bar{y}-\mu_0\right)^2.$$

Can I use a theorem to say that $-2\ln\lambda$ has a chi-square distribution with $1$ degree of freedom? I know this is true for the case where the variance, $\sigma^2$, is simply known, but is it the same for the case where the variance equals a specific number, such as $1$?

• How did you get $\overline y$ inside parentheses? – NCh Apr 17 '17 at 3:04
• @NCh $\sum(y_i-\mu_0)^2=\sum(y_i-\bar{y})^2+n(\bar{y}-\mu_0)^2$, so the first term cancels with the one from the denominator in $L(\mu_0)/L(\bar{y})$ – sucksatmath Apr 17 '17 at 3:11
• Where is $\mu$ in your LR? – spaceisdarkgreen Apr 17 '17 at 3:19
• @spaceisdarkgreen I plugged $\mu_0$ into the likelihood of the random sample, so $\mu$ got replaced with $\mu_0$. – sucksatmath Apr 17 '17 at 3:23
• Oh I see you plugged in $\bar y$ in for the other one presumably since that's the maximum likelihood value. The hypothesis test asks you to compare $\mu$ and $\mu_0$ though where neither of them are necessarily equal to $\bar y.$ – spaceisdarkgreen Apr 17 '17 at 3:29