What is the difference between moment generating function and probability generating function?

I am confused between the two terms " probability generating function" and "moment generating function." How do those terms differ?

The probability generating function is usually used for (nonnegative) integer valued random variables, but is really only a repackaging of the moment generating function. So the two contains the same information.

Let $X$ be a non-negative random variable. Then (see https://en.wikipedia.org/wiki/Probability-generating_function) the probability generating function is defined as $$\DeclareMathOperator{\P}{\mathbb{P}} \DeclareMathOperator{\E}{\mathbb{E}} G(z) = \E z^X$$ and the moment generating function is $$M_X(t) = \E e^{t X}$$ Now define $\log z=t$ so that $e^t=z$. Then $$G(z)=\E z^X = \E (e^t)^X = \E e^{t X} =M_X(t)=M_X(\log z)$$ So, to conclude, the relationship is simple: $$G(z) = M_X(\log z)$$

EDIT


@Carl writes in a comment about this my formula " ... which is true, except when it is false" so I need to have some comments. Of course, the equality $G(z) = M_X(\log z)$ assumes that both are defined, and a domain for the variable $z$ need be given. I thought the post was clear enough without that formalities, but yes, sometimes I am too informal. But there is another point: yes, the probability generating function is mostly used for (nonnegative argument) probability mass functions, wherefrom the name comes. But there is nothing in the definition which assumes this, it can as well be used for any nonnegative random variable! As an example, take the exponential distribution with rate 1, we can calculate $$G(z)=\E z^X=\int_0^\infty z^x e^{-x}\; dx=\dots=\frac1{1-\log z}$$ which could be used for all purposes we do use the moment generating function, and you can check the relationships between the two function are fulfilled. Normally we do not do this, it is probably more practical to use the same definitions with (possibly) negative as well as with nonnegative variables. But it is not forced by the mathematics.

• (+1) Even though I have a competing answer. – Carl Aug 17 '17 at 0:13
• (+1) Again. Strange, I guess if I edit, I can vote again. – Carl Mar 24 '18 at 16:04

Let us define both first and then specify the difference.

1) In probability theory and statistics, the moment-generating function (mgf) of a real-valued random variable is an alternative specification of its probability distribution.

2) In probability theory, the probability generating function (pgf) of a discrete random variable is a power series representation (the generating function) of the probability mass function of the random variable.

The mgf can be regarded as a generalization of the pgf. The difference is among other things is that the probability generating function applies to discrete random variables whereas the moment generating function applies to discrete random variables and also to some continuous random variables. For example, both could be applied to the Poisson distribution as it is discrete. Indeed, they yield a result of the same form; $e^{\lambda(z - 1)}$. Only the mgf would apply to a normal distribution and neither the mgf nor the pgf apply to the Cauchy distribution, but for slightly different reasons.

Edit

As @kjetilbhalvorsen points out, the pgf applies to non-negative rather than only discrete random variables. Thus, the current Wikipedia entry in probability generating function has a mistake of omission, and should be improved.

• The pgf and mgf of the Poisson distribution, although closely related (as explained in the answer posted by Kjetil Halvorsen), are definitely not "equal." – whuber Aug 14 '17 at 15:11
• @whuber Agreed, I had the same trouble with Kjetil Halvorsen's answer, namely $G(z) = M_X(\log z)$, which is true, except when it is false. – Carl Aug 14 '17 at 19:37
• @whuber See my edit to my answer (will post in few minutes) for an answer to this implicit question. – kjetil b halvorsen Aug 16 '17 at 21:49