By Adrian Kok

đź“• The MGF (Moment Generating Function) is a tool for deriving the moments of certain distributions. Using moments, we can determine key characteristics of a distribution, such as its mean, variance, and skewness. In this blog post, we delve deeper into moments and explore how the MGF can provide greater insight into statistical distributions.

This blog post is split into the following sections

The Moment Generating Function, or MGF

In many situations where it is difficult to derive moments through direct evaluation, we can use MGF as a neat “workaround”. To get us start, let us assume we have a continuous random variable $X$. The MGF then is a function of $X$ that takes the following form

$$ MGF = E[e^{tX}] $$

You may ask, why is there the variable $t$ in the formula? The variable $t$ here acts as a helper variable which we’ll be using when calculating the moments. More explained below.

How does it work?

To better understand the moment generating function, we can illustrate it’s usefulness through a concise derivation of it’s function. Let’s examine first the function $e^x$ on it’s own.

1) Taylor Expansion Formula

The formula for Taylor Expansion is the following

$$ f(x) = f(a) + \frac{f'(a)}{1!} (x-a) + \frac{f''(a)}{2!} (x-a)^2 + \frac{f'''(a)}{3!} (x-a)^3 ... + \frac{f^{n}(a)}{n!} (x-a)^n $$

2) Examining the Taylor Expansion of $e^x$

We approximate the function $e^x$ around $x = 0$, and thus we sub $a = 0$ and simplify.