Solution (source code)

= Solution

For each ball, the event of landing in $S_j$ is a <Bernoulli distribution> trial. Under the <null hypothesis> its <probability> is $\varepsilon$. Under the selected alternative $Q_j$, its <probability> is $p_1=\pi+(1-\pi)\varepsilon=\varepsilon+\pi(1-\varepsilon)$. The placements are <independent random variables> conditional on that selected index, so the count has the <binomial distribution>:
$$
\boxed{c_j\sim\operatorname{Bin}(n,\varepsilon)\text{ under }P_0,\qquad c_j\sim\operatorname{Bin}(n,\varepsilon+\pi(1-\varepsilon))\text{ under }Q_j.}
$$
The second assertion concerns $Q_j$, rather than the unconditional <mixture model> $P_1$.