Solution (source code)

= Solution

Use the <test statistic>
$$
T_n=n\lVert\overline X_n\rVert^2,
\qquad
\overline X_n=\frac1n\sum_{i=1}^nX_i.
$$
Under the <null hypothesis>, the <Hilbert-space central limit theorem> gives $\sqrt n\,\overline X_n\xrightarrow dG$, where $G$ is centered Gaussian with covariance $C_X$. If $C_X\phi_j=\lambda_j\phi_j$, its <Karhunen–Loève expansion> and the <continuous mapping theorem> give
$$
T_n\xrightarrow d\lVert G\rVert^2
=\sum_{j\geq1}\lambda_jZ_j^2,
$$
for independent $Z_j\sim N(0,1)$. Reject for $T_n$ above the $(1-\alpha)$ quantile of this weighted chi-squared law; replacing the $\lambda_j$ by empirical covariance eigenvalues gives a <plug-in estimator> of the critical value.

Under every <fixed alternative> $\mu\ne0$, the <weak law of large numbers> gives $\overline X_n\xrightarrow p\mu$, so $T_n/n\xrightarrow p\lVert\mu\rVert^2$ and the test is consistent. Under a <local alternative> $\mu_n=n^{-1/2}\delta$, the limit is $\lVert G+\delta\rVert^2$, which describes its local power.