= Solution
For a fixed $\lambda<\lambda_0$, the <likelihood ratio> against the null is
$$
\frac{L(\lambda)}{L(\lambda_0)}=\left(\frac\lambda{\lambda_0}\right)^n\exp\left((\lambda_0-\lambda)\sum_i x_i\right),
$$
strictly increasing in $S=\sum_i x_i$. The Neyman–Pearson <critical region> is therefore an upper tail in $S$, and its null threshold depends only on the desired size, not on which $\lambda<\lambda_0$ was chosen. Thus the same test is uniformly most powerful for the entire one-sided alternative.
Under the null $S\sim\operatorname{Gamma}(n,\lambda_0)$ with the second parameter interpreted as rate. Its <continuous> distribution permits the exact threshold
$$
\boxed{c_\alpha=q(1-\alpha;n,\lambda_0).}
$$
Under any fixed alternative its rejection probability is $\boxed{Q(\lambda)=1-F(c_\alpha;n,\lambda)}$. Applying the lemma separately to each such $\lambda$ shows that every level-$\alpha$ test has <power function of a statistical test>[power] at most this value there. The constructed test attains the bound for all $\lambda<\lambda_0$ simultaneously.
Back to article page