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

  • $\begingroup$ Informally, one can think PGF as a power series that encodes the probability masses as its coefficient. MGF does the same except for the moments. $\endgroup$
    – Bihu Duo
    Commented Apr 27, 2021 at 21:25

2 Answers 2


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) $$


@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
    $\begingroup$ (+1) Even though I have a competing answer. $\endgroup$
    – Carl
    Commented Aug 17, 2017 at 0:13
  • 1
    $\begingroup$ (+1) Again. Strange, I guess if I edit, I can vote again. $\endgroup$
    – Carl
    Commented Mar 24, 2018 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.


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.

  • 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
    Commented Aug 14, 2017 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
    Commented Aug 14, 2017 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$ Commented Aug 16, 2017 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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