Sometimes a little bit of Python beats a Google search.
Last week I needed to look up the moments of a normal distribution. The first two moments are common knowledge, the next two are easy to find, but I wasn’t able to find the higher moments.
Here is Sage code that produces a table of moments for the normal distribution. It computes the expected value of Xn by taking the nth derivative of the moment generating function and setting its argument to zero.

var('m, s, t')
mgf(t) = exp(mt + t^2s^2/2)
for i in range(1, 11):
derivative(mgf, t, i).subs(t=0)

Here’s the output.

m
m^2 + s^2
m^3 + 3ms^2
m^4 + 6m^2s^2 + 3s^4
m^5 + 10
m^3s^2 + 15ms^4
m^6 + 15
m^4s^2 + 45m^2s^4 + 15s^6
m^7 + 21m^5s^2 + 105m^3s^4 + 105ms^6
m^8 + 28m^6s^2 + 210m^4s^4 + 420m^2s^6 + 105s^8
m^9 + 36
m^7s^2 + 378m^5s^4 + 1260m^3s^6 + 945ms^8
m^10 + 45
m^8s^2 + 630m^6s^4 + 3150m^4s^6 + 4725m^2s^8 + 945s^10

5 sigma 1 in a million - 99.99994% confidence
3 sigma 1 in 1000
1 in a 100 : 99%

3 25 2 15 Normal Curve Standard Deviation 1910 191...

Built with LogoFlowershow