Binomial-binomial is binomial? Let $X\mid Y\thicksim\operatorname{Binomial}(Y,p)$, and let $Y\thicksim\operatorname{Binomial}(n,q)$. I have seen it written that:

Claim: $X$ is marginally $\operatorname{Binomial}(n,pq)$.

There is a simple justification: first, $Y$ members of the population are chosen at random with probability $q$, and then each of these is selected with probability $p$, so that each member is randomly selected in the end with probability $pq$. That is satisfying.
However, my computation of the marginal variance of $X$ disagrees with the answer that should be true if the claim above is true. If the claim above is true, we should have $\operatorname{var} X = npq(1-pq)$. However, I'm getting $$\begin{aligned}
\operatorname{var} X
&= E[\operatorname{var}(X\mid Y)] + \operatorname{var}(E[X\mid Y])\\
&=E[Yp(1-p)] + \operatorname{var}(pY)\\
&=np(1-p) + p^2 n q (1-q).
\end{aligned}$$
This does not equal $npq(1-pq)$. To see this, plug in $p=0.5,q=0.5$, and in that case $npq(1-pq)=0.1875n$ and $np(1-p) + p^2 n q (1-q)=0.3125n$.
I'm wondering if someone can check my math, or point to any resource showing that $X$ is really marginally Bin(n,pq). Thanks.

Write $Y = \sum_i B_i$ and $X = \sum_i A_i B_i$ where $A_i \sim \text{Bernoulli}(p)$ and $B_i \sim \text{Bernoulli}(q)$. Then $Y$ and $X$ have the joint distribution specified ($Y$ is obvious, and conditional on $Y$ we will have a sum of exactly $Y$ of the $B_i$'s), but clearly $A_i B_i \sim \text{Bernoulli}(pq)$ independently. Hence $X \sim \text{Binomial}(n, pq)$ marginally.
