= Solution
Write $\bar X=n^{-1}\sum_iX_i$ and $\bar Y=n^{-1}\sum_iY_i$. Completing the square in each sample, the log <likelihood> is, up to a data-dependent constant,
$$
\ell(\mu_X,\mu_Y)=-\frac n2[(\mu_X-\bar X)^2+(\mu_Y-\bar Y)^2].
$$
The <maximum-likelihood estimators> follow because it is strictly maximized over unrestricted means at $(\bar X,\bar Y)$. Under the null it is maximized at $(\bar X,0)$. Thus the <likelihood ratio> is $\Lambda=\exp(-n\bar Y^2/2)$, and the <likelihood-ratio test> rejects for large $T=-2\log\Lambda=n\bar Y^2$.
Under every null value of $\mu_X$, $Z=\sqrt n\bar Y$ has the standard <Gaussian distribution>; hence $T$ has the <chi-squared distribution> with one degree of freedom. Let $z_p=\Phi^{-1}(p)$, where $\Phi$ is the standard Gaussian <cumulative distribution function>. The exact size-$\alpha$ test is
$$
\boxed{\text{reject if }|\sqrt n\bar Y|>z_{1-\alpha/2}.}
$$
The null rejection probability is $2[1-\Phi(z_{1-\alpha/2})]=\alpha$, independently of the nuisance mean $\mu_X$. No randomization is required because the statistic has a continuous distribution.
Back to article page