# Help understanding moment generating functions

A moment generating function for a random variable $X$ is defined as:

$M(t)=E(e^{tX})$

Now this is a nice and concise definition, but it's not descriptive at all, what role does $t$ play in this function and why did Euler's number appear in this formula?

In other words, what is the intution on how this formula is derived and what aspect of a statistical distribution is it describing?

• This is the definition of a moment generating function whenever that expectation exists; "deriving" the formula does not come into the picture. As for $t$, it is a dummy variable. As the name suggests, among other things, this function generates moments. The coefficient of $t^r/r!$ in the expansion of $M(t)$ provides the $r$th order raw moment of $X$ about zero. – StubbornAtom Jun 1 '18 at 17:30

## 2 Answers

Take the derivative of $M$ $k$ times and put $t=0$ then you have the moment e.g. a neat compact description of all moments. $$M^{(k)}(0) = E(X^k)$$

The Euler number is there because of it's nice derivative property, e.g. $$\frac{d}{dt}M(t) = \frac{d}{dt}E(e^{tX}) = E(\frac{d}{dt}e^{tX})=E(Xe^{tX})$$

The MGF $M(t)$ for $X$ has the property that the $n^{\textrm{th}}$ moment of $X$ is given by $$\left.\frac{d^n M(t)}{dt^n}\right|_{t=0}$$

In this regard, $t$ is just there so you can take derivatives. In the end, $t$ disappears since you then plug in $t=0$.