# Moment generating function - strange fact to check

I'm reading the lecture notes of a course in statistics and I found the next:

The moment generating function is defined as $$M_X(t)=E(e^{tX})$$ Check that : $$M^{(n)}_X(t)=E(X^n)$$

Any idea where the last result is coming from?

For example if I try to do this for say a random variable with a binomial distribution I do not get that.

-

It may be that either your notes have the details wrong, or you incorrectly transcribed something.

I assume you're trying to get at the result where $n$-th moments can be extracted from the MGF.

That is, $E \left( X^n \right)=\frac{d^n M_X}{dt^n}(0)$. (i.e. $M_X^{(n)}(0)$, not $M_X^{(n)}(t)$)

If you exchange the two linear operators, and then show that only one term is nonzero, you should find it reasonably simple.

The only tricky part is being sure where that exchange works. See, for example, page 4 here

Numerous discussions of the result can be found online or in textbooks that cover this material.

-