# Probability generating function

What is the probability generating function of the couple of random variables $(X,Y)$?

For a variable $X$, it is $G_X(t)=E[t^X]$ but I can't figure out what it is for two variables.

Also, how can I deduce the expected values $E[XY]$, $\text E[X]$, $\text E[Y]$ and the covariance $\text {Cov}[X,Y]$ from this function?

-

The joint probability generating function of $X$ and $Y$ is $$G_{X,Y}(s,t) = E[s^X t^Y] = \sum_{x=0}^{\infty} \sum_{y = 0}^{\infty} p(x,y) s^x t^y.$$
For $E[X]$, we have $$E[X] = \left.\frac{\partial G_{X,Y}(s,t)}{\partial s} \right|_{s=1,t=1}.$$ This is because taking the partial derivative of $G_{X,Y}(s,t)$ with respect to $s$ yields $$\sum_{x=1}^{\infty} \sum_{y = 0}^{\infty} x p(x,y) s^{x-1} t^y.$$ Then, subbing in $s=1, t = 1$ gives $$\sum_{x=1}^{\infty} \sum_{y = 0}^{\infty} x p(x,y),$$ which is how you calculate $E[X]$ directly from the joint distribution of $X$ and $Y$.
Similarly, \begin{align}E[Y] &= \left.\frac{\partial G_{X,Y}(s,t)}{\partial t} \right|_{s=1,t=1}, \\ E[XY] &= \left.\frac{\partial^2}{\partial s \partial t} G_{X,Y}(s,t) \right|_{s=1,t=1}. \\ \end{align}
To find $\text{Cov}(X,Y)$, remember that $\text{Cov}(X,Y) = E[XY] - E[X]E[Y].$ Then use the formulas you already know for $E[X], E[Y]$, and $E[XY]$.
The line $\sum_{x=1}^\infty \sum_{y=0}^\infty x p(x, y) x s^{x-1} t^y$ should of course only have one $x$ factor in the summand.... –  Dougal Dec 6 '12 at 4:18