A probability distribution,f(x) ,can be represented as a generating function,G(n) , as \sum_{x} f(x) n^x . The expectation of f(x) can be got from G'(1) .
A bivariate generating function, G(m,n) of the joint distribution f(x,y) can be represented as \sum_{x} \sum_{y} f(x,y) n^x m^y ...