= Solution
Define $R=\sum_i(Y_i-\overline Y)^2$ and $s_Y^2=R/(n-1)$, with $n\geq2$. The unrestricted <maximum-likelihood estimates> are $\widehat\mu=\overline Y$ and $\widehat\sigma^2=R/n$. Under the <null hypothesis>, maximizing the <normal distribution>'s <likelihood> over the remaining <variance> gives
$$
\widehat\sigma_0^2=\frac1n\sum_i(Y_i-\mu_0)^2
=\frac Rn+(\overline Y-\mu_0)^2,
$$
because the cross term vanishes when $\sum_i(Y_i-\overline Y)=0$. At either fitted <variance>, the exponential factor in the <likelihood function> is $e^{-n/2}$, so it cancels in the ratio:
$$
\lambda=\left(\frac{\widehat\sigma^2}{\widehat\sigma_0^2}\right)^{n/2}
=\left(1+\frac{n(\overline Y-\mu_0)^2}{R}\right)^{-n/2}.
$$
The standardized <test statistic> is
$$
\boxed{t=\frac{\sqrt n(\overline Y-\mu_0)}{s_Y},\qquad
\lambda=\left(1+\frac{t^2}{n-1}\right)^{-n/2}.}
$$
The sample <variance> $s_Y^2$ uses divisor $n-1$, whereas the <maximum-likelihood estimate> uses divisor $n$; this explains the $n-1$ in the final expression. Under a nondegenerate <normal distribution>, $R>0$ with <probability> one.
Back to article page