Solution (source code)

= Solution

For $\theta_1>\theta_0$, the <likelihood ratio> is
$$
\frac{f(x\mid\theta_1)}{f(x\mid\theta_0)}
=e^{-(\theta_1-\theta_0)}
\left(\frac{1+e^{x-\theta_0}}
{1+e^{x-\theta_1}}\right)^2,
$$
which is increasing in $x$. Thus the logistic location family has a <monotone likelihood ratio> in $X$.

The upper-tail rejection probability is increasing in the location parameter, since $X=\theta+Z$ with $Z$ having the standard <logistic distribution>. Hence for the critical value from part (i),
$$
\sup_{\theta\leq0}\mathbb P_\theta(X>c)
=\mathbb P_0(X>c)=\alpha.
$$
The test has size $\alpha$ for the composite null.

Now fix any alternative $\theta_1>0$. The <Neyman-Pearson lemma> applied to the simple hypotheses $\theta=0$ and $\theta=\theta_1$ says that this same upper-tail test is most powerful among all tests whose rejection probability at $0$ is at most $\alpha$. Every test of size at most $\alpha$ for the composite null satisfies that restriction. The upper-tail test is therefore most powerful at every $\theta_1>0$, so it is the <uniformly most powerful upper-tail test for a logistic location>.