Solution (source code)

= Solution

Neyman–Pearson rejects for large $g(X)/f(X)$ and is most powerful at its size. For the normal sample, monotone likelihood ratio makes the UMP test reject when $\sqrt n\bar X\gt \Phi^{-1}(1-\alpha)$; its rejection probability increases in $\mu$, so it also has size $\alpha$ for the composite null $\mu\le0$. A likelihood-ratio test against a mixture null that has size $\alpha$ under each component bounds every competing test’s mixture power and is therefore UMP for the original two-point null. In the drug problem, the symmetric interval test has equal size $\alpha$ at $\mu=\pm\mu_0$ and no larger size farther out; it is the NP test against the equal mixture of those boundary laws, hence is UMP.