How do you derive the variance of a Gaussian distribution?

1 Answer
Nov 26, 2015

Suppose #x# has a probability density function #f(x)#. The variance of #x# is calculated by #int_-oo^oo (x-mu)^2f(x) dx#, where #mu# is the expected value of #x# and is calculated by #mu = int_-oo^oo xf(x) dx#.

Explanation:

The graph of a Gaussian is a characteristic symmetric "bell curve" shape.

The simplest case of a normal distribution is known as the standard normal distribution , described by the probability density function: #g(z) = frac{1}{sqrt{2pi}}e^{-frac{z^2}{2}}#.

Since the area under the curve is given by #int_-oo^oo g(z) dz#, The factor #1/sqrt{2pi}# in this expression ensures that the total area under #g(z)# is equal to #1#, as should all PDF.

The mean of #z# is given by:

#"E"(z) = int_-oo^oo zg(z) dz#

#= int_-oo^0 zg(z) dz+int_0^oo zg(z) dz#.

#= 0#

(#g# is an even function, so the first half of the integral is equal to the negative of the second half of the integral. Since #g(-z)=g(z)#, substituting #u=-z# for the second integral should do the trick.)

The variance of #z# is given by:

#"Var"(z) = int_-oo^oo (z-"E"(z))^2g(z) dz#

#= int_-oo^oo z^2g(z) dz#

#= int_-oo^oo frac{z^2}{sqrt{2pi}}e^{-frac{z^2}{2}} dz#

#= 1#

(There are special techniques involved in computing integrals of this kind. The details are not shown but the result can be easily verified with a calculator.)

Substituting #x=sigmaz+mu#, we get the probability density of the Gaussian distribution:

#f(x|sigma,mu) = frac{1}{sigmasqrt{2pi}}e^{-frac{(x-mu)^2}{2sigma^2}}#.

#mu# determines the location of the maximum and #sigma# determines how narrow/tall the maximum should be.

The variance is given by

#"Var"(x) = "Var"(sigmaz+mu)#

#= sigma^2 "Var"(z)#

#= sigma^2 (1)#

#= sigma^2#