# Proving variance with moment generating functions

## Main Question or Discussion Point

Moment generating functions:
How can I show that $Var(X)=\frac{d^2}{dt^2}ln M_X(t)\big |_{t=0}$

Recall:
$M_X(t)=E(e^{tx})=\int_{-\infty}^{\infty}e^{tx}f(x)dx$

$E(X^n)=\frac{d^n}{dt^n}M_X(t)\big |_{t=0}$

$Var(X)=E(X^2)-[E(X)]^2=E[(X-E(X))^2]$
------------
I tried just applying the equation given but I don't know what to do with the log of this general integral?
$\frac{d^2}{dt^2}ln M_X(t)=\frac{d^2}{dt^2}ln \left( \int_{-\infty}^{\infty}e^{tx}f(x)dx \right)$

Related Set Theory, Logic, Probability, Statistics News on Phys.org
Office_Shredder
Staff Emeritus
Gold Member
If you were asked the more general question of calculating
$$\frac{d^2}{dt^2} \ln\left( f(t) \right)$$
What's the first thing you would do?

It would be for 1st derivative: $\frac{1}{f(t)}*f'(t)$
then differentiate again for the 2nd derivative, that would be:

$\frac{f''(t)f(t)-(f'(t))^2}{(f(t))^2}$

Last edited:
Office_Shredder
Staff Emeritus
Gold Member
So once you do that you've expressed everything in terms of the generating function and its derivatives without any logarithms involved.

Does that mean it's $\frac{M_X''(t)M_X(t)-(M_X'(t))^2}{(M_X(t))^2}$

Do I have to then substitute each M(t), M'(t), M''(t) with it's integral definition then? and somehow simplify that big mess o.o?

Office_Shredder
Staff Emeritus