This question already has an answer here:
In a population of $2n$ individuals there are $n$ infected individuals and $n$ uninfected. Suppose that $X$ of the n uninfected become infected, where $X \sim \mathcal B(n, p)$, and, then, given $X = j$, $Y$ of the $n + j$ infected recover, where $Y\mid X=j \sim \mathcal B(n + j, q)$, allowing $Z = n + j − Y$ infected.
It is assumed the infection and recovery probabilities satisfy $p, q ∈ (0; 1)$.
First find the probability generating function of $X$ and the conditional probability generating function of $Y$ given $X = j$. Then, use conditional expectation to find the probability generating function of $Z$.
Now, assume that $Z$ has the same distribution as the sum of two independent binomial random variables and thus comment on the effect of the infection/recovery process on the initial number of infected $n$.
I know that $G_X(z)=(1-p+pz)^n$ where $z$ is an element of $\Bbb R$ is the generating function for Binomial distribution but I'm unsure how to use this to start the question??