Solution (source code)

= Solution
{c}

A possibly <randomized statistical test> has rejection probability $\varphi(x)\in[0,1]$ after observing $x$. Its <statistical power> at parameter $\theta$ is $\mathbb E_\theta\varphi$, and its <test size> is the supremum of that <statistical power> over the null parameter set.

For simple hypotheses with densities $f_0,f_1$, the <Neyman-Pearson lemma> states that a level-$\alpha$ test is most powerful if it rejects where $f_1>k f_0$, accepts where $f_1<k f_0$, and randomizes on equality to obtain null rejection probability $\alpha$. Here $k\geq0$ is chosen to reach that <test size>. To prove optimality, let $\varphi_*$ be this test and $\varphi$ any test of level at most $\alpha$. Pointwise,
$$
(\varphi_*-\varphi)(f_1-kf_0)\geq0.
$$
Integrating and using $\int(\varphi_*-\varphi)f_0\geq0$ gives $\mathbb E_1\varphi_*-\mathbb E_1\varphi\geq0$. This proves maximal <statistical power>. For $k>0$, equality also forces any equally powerful test to use all its allowed <test size> and agree with the indicated decisions away from the likelihood-ratio tie set, up to null sets.

For the Poisson sample, $S=\sum_iX_i\sim\operatorname{Poisson}(n\mu)$ and, for every fixed $\mu_1>\mu_0>0$, the <likelihood ratio> is
$$
e^{-n(\mu_1-\mu_0)}(\mu_1/\mu_0)^S.
$$
It increases strictly with $S$. Choose an <integer> $k$ so that $\mathbb P_{\mu_0}(S>k)\leq\alpha\leq\mathbb P_{\mu_0}(S\geq k)$, and reject for $S>k$, with boundary rejection probability
$$
\boxed{r=\frac{\alpha-\mathbb P_{\mu_0}(S>k)}
{\mathbb P_{\mu_0}(S=k)}\quad\text{when }S=k.}
$$
This has exact <test size> $\alpha$. Its rejection ordering and calibration do not depend on which $\mu_1>\mu_0$ is selected, so the lemma proves it \b[uniformly most powerful] for the whole one-sided alternative. Randomization is generally needed for an exact arbitrary <test size> in a discrete model.

For the approximate design, the <central limit theorem> under $\mu_0=1$ gives critical sum $n+1.645\sqrt n$. Under $\mu_1$, the sum is approximately normal with mean $n\mu_1$ and <variance> $n\mu_1$. Target <statistical power> $0.9$ therefore gives
$$
\frac{n+1.645\sqrt n-n\mu_1}{\sqrt{n\mu_1}}\approx-1.282,
$$
or $\sqrt n(\mu_1-1)\approx1.645+1.282\sqrt{\mu_1}$. Thus the requested design expression is
$$
\boxed{n\approx\left(\frac{1.645+1.282\sqrt{\mu_1}}{\mu_1-1}\right)^2.}
$$
Round upward to obtain an <integer> design. This is a <normal approximation> to the requested <statistical power>, rather than an exact discrete sample-size guarantee; the exact Poisson test above provides its exact calibration.