# Multivariate Poisson Distribution based on conditional modeling

I have a question about an example of a bivariate Possion distribution based on conditonal modeling I found in a book. The example looks as follows:
$$Y_1$$ and $$Y_2$$ are two correlated Poisson variates defined as $$Y_1=Z_1+Z_{12}\;,\; Y_2=Z_2+Z_{12}$$ where $$Z_1,Z_2,Z_{12}$$ are independent latent variables following a Poisson distribution with mean $$\mu_1,\mu_2$$ and $$\mu_{12}$$.
The resulting joint probaility mass function is now supposed to look as follows:
\begin{align*}P(Y_1=k_1,Y_2=k_2)&=\sum_{k_3=0}^{\infty}P(Y_1=k_1,Y_2=k_2|Z_{12}=k_3)P(Z_{12}=k_3)\\ &=(\frac{\mu_1^k}{k_1!}e^{-\mu_1})(\frac{\mu_2^k}{k_2!}e^{-\mu_2})\sum_{k_3=0}^{\min\{k_1,k_2\}}\frac{k_1!k_2!}{(k_1-k_3)!(k_2-k_3)!k_3!}(\frac{\mu_{12}}{\mu_1\mu_2})^{k_3}e^{-\mu_{12}}.\\ \end{align*} I would be very grateful if someone could explain me how to derive the last equality since I am not able to understand it. Thanks in advance!

First, since $$Z_1,Z_2,Z_{12}$$ are all Poisson r.v., they are all nonnegative. Thus $$Y_1\geq Z_{12},\qquad Y_2\geq Z_{12}.$$ In other words, $$P(Y_1=k_1,~Y_2=k_2\mid Z_{12}=k_3)=0$$ whenever $$k_1 or $$k_2, i.e., $$\min\{k_1,k_2\}. Consequently, the sum is reduced to $$\sum_{k_3=0}^{\min\{k_1,k_2\}}{P(Y_1=k_1,~Y_2=k_2\mid Z_{12}=k_3)P(Z_{12}=k_3)},$$ as all other summands are zero.
Next, since $$Y_1=Z_1+Z_{12}$$, we have $$Z_1=Y_1-Z_{12}$$.
That is, when $$Z_{12}=k_3$$ and $$Y_1=k_1$$, the value of $$Z_1$$ is $$k_1-k_3$$.
Similarly, when $$Z_{12}=k_3$$ and $$Y_2=k_2$$, the value of $$Z_2$$ is $$k_2-k_3$$.
Thus, \begin{align*} P(Y_1=k_1,~Y_2=k_2\mid Z_{12}=k_3)&=P(Z_1=k_1-k_3,~Z_2=k_2-k_3\mid Z_{12}=k_3) \\ &=P(Z_1=k_1-k_3)P(Z_2=k_2-k_3)\quad(\text{Independence!}) \\ &=\frac{e^{-\mu_1}\mu_1^{k_1-k_3}}{(k_1-k_3)!}\cdot\frac{e^{-\mu_2}\mu_2^{k_2-k_3}}{(k_2-k_3)!}. \end{align*} Note that $$P(Z_{12}=k_3)=\frac{e^{-\mu_{12}}\mu_{12}^{k_3}}{k_3!}$$
The whole sum is thus \begin{align*} \sum_{k_3=0}^{\min\{k_1,k_2\}}{\frac{e^{-\mu_1}\mu_1^{k_1-k_3}}{(k_1-k_3)!}\cdot\frac{e^{-\mu_2}\mu_2^{k_2-k_3}}{(k_2-k_3)!}\cdot\frac{e^{-\mu_{12}}\mu_{12}^{k_3}}{k_3!}}. \end{align*} What remains are merely algebras.