Solution (source code)

= Solution

Use the convention that the <likelihood ratio> is maximized alternative likelihood divided by null likelihood. The alternative excludes zero, but its supremum agrees with the unrestricted maximum, even on the exceptional sample $\overline X=0$. <Completing the square> gives
$$
\boxed{\Lambda(\Theta_1,\Theta_0)=\exp\left(\frac n2\|\overline X\|^2\right),\qquad2\log\Lambda=n\|\overline X\|^2.}
$$
Under the null, $\sqrt n\overline X\sim\mathcal N_d(0,I_d)$, so $2\log\Lambda\sim\chi_d^2$ exactly for every $n$. Equivalently $\Lambda$ is distributed as $e^{Y/2}$ for $Y\sim\chi_d^2$. With the reciprocal likelihood-ratio convention the statistic is $-2\log\Lambda$ instead.

<Wilks theorem> predicts a limiting <chi-squared distribution> with <degrees of freedom> equal to the difference of parameter dimensions, here $d-0=d$, under regularity and an interior null point of the unrestricted model. This example strengthens the asymptotic conclusion to an exact finite-sample identity.