I'm working on the following problem:
Y = $X{_1}+X{_2}+X{_3}+...+X{_N}$
$N\overset{d}{\sim}Bi(n,p) $ and $X_i\overset{d}{\sim}Bi(m,q)$
$N, X_1, X_2 $ are independent
$a)$ Find $P_{Y|N}$(z) and state values of $z$ for which it is defined
$b)$ Find $P_{Y}(z)$ and state values of $z$ for which it is defined
$c)$ Using $P_{Y}(z)$, evaluate $E(Y)$
I am having difficulty with part $a)$ and I believe it's because I can't understand how $Y|N$ is distributed, or is this not relevant?
Hint: $Y$ is the sum of $N$ independent random variables, each the count of successes in $m$ iid Bernoulli trials with success rate $q$. So, therefore $Y$ is the count of ... what ? What distribution does this have?
Once you have identified the name of this distribution, you should know what is the probability generating function $\Pi_{Y\mid N}(z)$ and where $z$ is defined.
$$\Pi_{Y\mid N}(z) ~=~ (1-q+qz)^{Nm}$$
Then use $\Pi_Y(z) = \mathsf E(\Pi_{Y\mid N}(z))$
Finally $\mathsf E(Y) = \Pi_Y'(1)$
PS: Although you were asked to do it the hard way, the easy way is: $$\mathsf E(Y) =\mathsf E(\mathsf E(Y\mid N)) = \mathsf E(qNm) = qpnm$$