13
$\begingroup$

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

$\endgroup$
23
$\begingroup$

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.

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

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.

$\endgroup$
  • 1
    $\begingroup$ The pgf and mgf of the Poisson distribution, although closely related (as explained in the answer posted by Kjetil Halvorsen), are definitely not "equal." $\endgroup$ – whuber Aug 14 '17 at 15:11
  • $\begingroup$ @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. $\endgroup$ – Carl Aug 14 '17 at 19:37
  • 1
    $\begingroup$ @whuber See my edit to my answer (will post in few minutes) for an answer to this implicit question. $\endgroup$ – kjetil b halvorsen Aug 16 '17 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.