Solution (source code)

= Solution

For a randomized test $\varphi(X_1,\ldots,X_n)\in[0,1]$, level $\alpha$ over the null neighborhood means
$$
\sup_{P\in\mathcal P_\epsilon(P_0)}\mathbb E_{P^n}\varphi\leq\alpha.
$$
A <maximin test> maximizes its worst-case power
$$
\inf_{P\in\mathcal P_\epsilon(P_1)}\mathbb E_{P^n}\varphi
$$
among all tests satisfying that robust level constraint.