# Find mgf from joint pmf

The joint pmf of random variables $$X$$ and $$Y$$ is given by p_{XY}(x,y)= \begin{align} & \frac{e^{-2}}{x! (y-x)!}\quad\text{if}\,\,\,x= 0,1,...y,\ y=0,1,... \\ \end{align} Find its mgf.

\begin{align} M(t_{1},t_{2}) &= E(e^{t_1 x+ t_2 y})\\ &= \sum_{y=0}^{\infty} \sum_{x=0}^{y} e^{t_1 x+t_2 y} \frac{e^{-2}}{x! (y-x)!} \\ &=\sum_{y=0}^{\infty} e^{-2} \frac{e^{t_2 y}}{y!} \sum_{x=0}^y e^{t_1 x} \frac{y!}{x!(y-x)!}\\ &=\sum_{y=0}^{\infty} e^{-2} 2^y \frac{e^{t_2 y}}{y!} \left(\frac{1+e^{t_1}}{2}\right)^{y} \end{align}

How do I simplify further?

• Please add the self-study tag and detail where you get stuck in the derivation of $M$. Otherwise the question is prone to be voted down. Commented Apr 10, 2019 at 13:14

This problem is intriguing because it indicates something symmetrical lurks. One can't help feeling there is a simple, low-computation, insightful solution. Indeed, a little staring at the pmf suggests defining

$$z = y-x.$$

We may assume $$z \ge 0$$ (because when $$z \lt 0$$ the $$z!$$ terms in the denominator have poles, which makes those probabilities zero). Now, for non-negative integers $$x$$ and $$z$$

$$p_{XY}(x,z) = e^{-2}\, \frac{1}{x!}\frac{1}{z!} = \frac{e^{-1}}{x!}\frac{e^{-1}}{z!}$$

is manifestly symmetric under exchanging $$x$$ and $$z.$$ It is immediately recognizable as the probability distribution of two independent Poisson$$(1)$$ variables $$X$$ and $$Z$$ where $$Z=Y-X.$$

Consequently--as you know, or can look up, or can easily compute, its moment generating function is

$$m_{XZ}(s,u) = E[e^{sX + uZ}] = E[e^{sX}]E[e^{uZ}] = \exp(e^s - 1)\exp(e^u-1)=\exp(e^s+e^u-2).$$

This function remains symmetric under an exchange of its arguments $$s$$ and $$u.$$ At this point we must break the symmetry to return to the original problem--but the calculations remain simple. Since $$Y=X+Z,$$

\eqalign{ m_{XY}(s,t) &= E[e^{sX+tY}] = E[e^{sX + t(X+Z)}] = E[e^{(s+t)X+tZ}] = m_{XZ}(s+t, t) \\&= \exp(e^{s+t} + e^t - 2). }

Even if your goal is only to simplify the sums you obtained, this insight into the variables and the underlying symmetric formulation can help guide your work.

The joint pmf of $$(X,Y)$$ is of the form

\begin{align} p(x,y)&=\frac{e^{-2}}{y!}\binom{y}{x}\mathbf1_{x=0,1,\ldots,y\,;\,y=0,1,\ldots} \\&=\binom{y}{x}\frac{1}{2^y}\mathbf1_{x=0,1,\ldots,y}\,\frac{e^{-2}2^y}{y!}\mathbf1_{y=0,1,\ldots} \end{align}

This shows that $$X\mid Y\sim\mathsf{Bin}\left(Y,\frac{1}{2}\right)$$, where $$Y\sim\mathsf{Poisson}(2)$$.

Using the law of total expectation:

\begin{align} E\left[e^{t_1X+t_2Y}\right]&=E\left[E\left[e^{t_1X+t_2Y}\mid Y\right]\right] \\&=E\left[e^{t_2Y}E\left[e^{t_1X}\mid Y\right]\right] \end{align}

Now recall the MGF and PGF of binomial and poisson distribution respectively.

Edit.

To clarify, my hint above is the same thing as you have done. To finish it off, note that the last sum is just $$E(a^Y)$$ for some $$a=a(t_1,t_2)$$, which is just the PGF of $$Y$$.