Suppose $Y \sim Negative \,Binomial \, (\mu, \theta) $
$X|Y \sim Binomial \, (Y, p) $ (with $\mu, \theta, p$ constant).
What is the distribution of $X$ ? I think $X$ must be Negative Binomial ($\mu_X, \theta_X$) with $\mu_X = \mu.p$ and $\theta_X = \theta$ but can't prove it fully.
My proof is as follow:
$P(Y = y) = \frac{\Gamma(\theta+y)}{\Gamma(\theta).y!} . \frac{\mu^y . \theta^\theta}{(\mu + \theta)^{\mu + \theta}}$ (1)
$P(X = x | Y = y) = \binom{y}{x} . p^x . (1-p)^{y-x}$
$P(X = x, Y = y) = P(X = x | Y=y). P(Y=y)$
Sum over $y = x \to \infty$ we have the marginal distribution of $X$:
$P(X) = \frac{\theta^\theta . p^x . \mu ^ x}{\Gamma(\theta) \, x! \, (\mu + \theta)^{\theta}} \sum \limits_{y = x}^{\infty} \frac{\Gamma(\theta + y) \, \mu^{y-x} \, (1-p)^{y-x}}{(\mu + \theta)^y \, (y-x)!}$
From now, I'm stuck and don't know how to manipulate the $\sum$ part to arrive at the answer.
If you have any idea or suggestion of proof, it would be very nice to me. Thank you very much!
A much simpler approach is to work with probability generating functions.
Let $$\begin{align} \Pr[Y = y] &= \binom{\mu-1+y}{\mu-1} \theta^\mu (1-\theta)^y, \quad y \in \{0, 1, 2, \ldots \}, \\ \Pr[X = x \mid Y] &= \binom{Y}{x} p^x (1-p)^{Y-x} = \binom{Y}{x} (1-p)^Y \left(\frac{p}{1-p}\right)^x , \quad x \in \{0, 1, 2, \ldots, Y\}. \end{align}$$
Note that we have written the binomial PMF in such a way that will make subsequent calculations easier.
Then $$\mathcal P_Y(z) = \operatorname{E}[z^Y] = \sum_{y=0}^\infty z^y \Pr[Y = y] = \sum_{y=0}^\infty \binom{\mu - 1 + y}{\mu - 1} \theta^\mu ((1-\theta)z)^y ,$$ and if we let $\theta' = 1 - (1 - \theta)z$, then multiplying by $(\theta')^\mu$ and pulling out $\theta^\mu$ transforms the summand into the PMF of a negative binomial distribution with parameters $\mu$ and $\theta'$; hence $$\mathcal P_Y(z) = \left(\frac{\theta}{\theta'}\right)^\mu = \left(\frac{\theta}{1 - (1-\theta)z}\right)^\mu.$$
A similar trick applies for the binomial PGF: $$\mathcal P_{X \mid Y}(z) = \operatorname{E}[z^X \mid Y] = \sum_{x=0}^Y \binom{Y}{x} (1-p)^Y \left(\frac{pz}{1-p}\right)^x.$$ So if we let $p'$ satisfy $p'/(1-p') = pz/(1-p)$, or $$p' = \frac{pz}{1-(1-z)p},$$ then multiplying by $(1-p')^Y$ and pulling out $(1-p)^Y$ transforms the summand into a binomial PMF with parameters $Y$ and $p'$; thus $$\mathcal P_{X \mid Y}(z) = \left(\frac{1-p}{1-p'}\right)^Y = (1 - (1-z)p)^Y.$$
Now we are prepared to perform the desired calculation. Note $$\begin{align} \mathcal P_X(z) &= \operatorname{E}[z^X] \\ &= \operatorname{E}[\operatorname{E}[z^X \mid Y]] \\ &= \operatorname{E}[\mathcal P_{X \mid Y}(z)] \\ &= \operatorname{E}[(1 - (1-z)p)^Y] \\ &= \mathcal P_Y(1 - (1-z)p) \\ &= \left(\frac{\theta}{1 - (1-\theta)(1 - (1-z)p)}\right)^\mu \\ &= \left(\frac{\frac{\theta}{p + (1-p)\theta}}{1 - \left(1 - \frac{\theta}{p (1-p)\theta}\right)z}\right)^\mu. \end{align}$$ Hence $X$ is negative binomial with parameters $\mu$ and $$\theta' = \frac{\theta}{p + (1-p)\theta}.$$
Note that the derivation of the PGFs is optional, since these are well-known. I have only included them here for convenience.