8. Let $Y1, Y2, \cdots, Y_n$ denote a random sample from a Bernoulli-distributed population with parameter $p$. That is,

$$p(yi \mid p) = p^{yi} (1 - p)^{1 - yi}, \quad yi = 0, 1.$$

(a) Suppose that we are interested in testing $H0: p = p0$ versus $Ha: p = pa$, where $p0 < pa$.

i. Show that

$$\frac{L(p0)}{L(pa)} = \left( \frac{p0(1 - pa)}{(1 - p0)pa} \right)^{\sum yi} \left( \frac{1 - p0}{1 - p_a} \right)^n. \quad (4\%)$$

ii. Argue that \(L(p0) / L(pa) < k\) if and only if \(\sum{i=1}^{n} yi > k^\) for some constant \(k^\). (4%)
iii. Give the rejection region for the most powerful test of \(H0\) versus \(Ha\). (4%)