Solution
= Solution
Writing $R=n_0/n_1$ gives $n_0=nR/(1+R)$ and $n_1=n/(1+R)$, so apart from the positive factor $1/n$ the variance is
$$
f(R)=(1+R)\left(\frac aR+b\right).
$$
Hence
$$
f'(R)=-\frac a{R^2}+b,
\qquad
f''(R)=\frac{2a}{R^3}>0.
$$
The unique minimum is
$$
R^*=\sqrt{\frac ab}
=\sqrt{\frac{p_0(1-p_1)}{p_1(1-p_0)}}.
$$
This is the <Neyman allocation> for the log relative risk of failure.