Yesterday I wrote about how to find moments of the normal distribution using Sage. Then GlennF left a comment saying it’s not too hard to work out the moments analytically and outlined a proof. I’ll fill in a few details here.

First, start with a standard normal distribution *Z*. That is, *Z* has mean 0 and variance 1. By symmetry, the odd moments of *Z* are 0. For the even moments, integration by parts shows that E(*Z*^{2m}) = (2*m* − 1) E(*Z*^{2m − 2}). Apply this relation recursively until you get E(*Z*^{2m}) = (2*m* − 1)!!. (See this post if you’re unfamiliar with double factorial. Note that (−1)!! is defined to be 1.)

For a general normal random variable *X* with mean μ and variance σ^{2}, define *Z* = (X − μ)/σ. Then *Z* is a standard normal and *X* = σ*Z* + μ. Apply the binomial theorem and note that the odd terms are zero.

I like your statement of it better than mine. For some reason I can’t explain today, I chose to re-express the double factorial in terms of ordinary factorials. It looks much cleaner *not* doing that, though.

Very nice. Is there an application? I thought that high moments were interesting for theoretical questions, but not really useful when applied to “real” data.

I’ve haven’t had much need for higher moments. But I’ve been working with Edgeworth expansions lately, and higher moments pop up. In this tech report I needed up to 5th moments of a normal. With more terms in my Edgeworth approximations, I’d need higher moments.

How are the odd terms zero? For the generalized version?

The normal density is even, so when you multiply it by an odd power you get an odd function. And the integral of an odd function over the real line is zero by symmetry: the left side is the negative of the right side.

Sir, I derived this myself and then went searching for confirmation. I found your formula, but my answer differs slightly from yours. Where you have (2j-1)!!, I have [2max(j,1)-1]!!, because the case j=0 in the summation would yield (-1)!! here. Alternatively, I stripped out the j=0 term from the summation and had

$E(X^n)=

\begin{cases}

\mu,& n=1 \\

\mu^n+\sum_{j=1}^{floor(\frac{n}{2})} {n \choose 2j} \sigma^{2j} (2j-1)!! \mu^{n-2j},& n\ge 2

\end{cases}$

Am I missing something? Have you defined -1!! to be unity?

A slight variation on the analytical proof, without using integration by parts explicitly (although it’s the same trick), would be, if N(0,1) is the density,, and omitting the integration limits to +- infinity,

\int{x N(0,1)dx}=0

\int{\frac{d}{dx} xN(0,1)dx}=[xN(0,1)]_{-\infty}^{+\infty} = 0

and

\int{\frac{d}{dx}xN(0,1)s}=\int{[N(0,1) – x^2N(0,1)]dx}

so \int{x^2N(0,1)dx}=\int{[N(0,1)}=1

The same trick works connecting the 2n+1 moment with the 2n and 2n+2 moments, so we get the full result by forward or backward induction, whichever we like best.