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 (xμ)2f(x)dx, where μ is the expected value of x and is calculated by μ=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)=12πez22.

Since the area under the curve is given by g(z)dz, The factor 12π 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)=zg(z)dz

=0zg(z)dz+0zg(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)=(zE(z))2g(z)dz

=z2g(z)dz

=z22πez22dz

=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=σz+μ, we get the probability density of the Gaussian distribution:

f(xσ,μ)=1σ2πe(xμ)22σ2.

μ determines the location of the maximum and σ determines how narrow/tall the maximum should be.

The variance is given by

Var(x)=Var(σz+μ)

=σ2Var(z)

=σ2(1)

=σ2