In a previous post, I described how a moment-generating function does what its name says it does. Still, though, it’s not clear why it works. I mean, look at the formula:

That’s the discrete case. In the continuous case we have:

So you take the usual expected value formula for either discrete or continuous cases, stick in there, and you get a function that generates moments. I don’t know about you, but that doesn’t make me pop up out of my chair and exclaim, “oh, of course, I see it! How obvious.” Fortunately, it’s not beyond comprehension. To see why it does what it does, let’s take the derivative of the moment-generating function in the discrete case, evaluate it at 0, and see what happens:

Now evaluate the derivative at 0:

So evaluating the first derivative of the moment-generating function at 0 gives us , the first moment about the origin, also known as the mean.

Let’s evaluate the second derivative of the moment-generating function at 0 and see what happens:

Now evaluate the derivative at 0:

That gives us the second moment about the origin, which comes in handy when finding variance, since variance is equal to .

This will keep happening for the third, fourth, fifth and every derivative thereafter, *provided the moment-generating function exists*. And lest you think that’s just some technicality you never have to worry about, you should know the venerable *t* and *F* distributions do not have moment-generating functions. It turns out some of their moments are infinite. So there you go.

Pingback: » The moment-generating function Statistics you can Probably Trust

Vasileios FrangosHey there,thank you for the brief explanation. I would like to ask you,why do we need the first term (Σe^(tx)(0) when we compute the second derivative of the MGF since everything with x is constant ?

Best Vasilis