# Gaussian distribution

Reference: Griffiths, David J. (2005), Introduction to Quantum Mechanics, 2nd Edition; Pearson Education – Problem 1.3.

Probably the most common continuous probability density is the gaussian distribution, specified by

$\displaystyle \rho\left(x\right)=Ae^{-\lambda\left(x-a\right)^{2}} \ \ \ \ \ (1)$

First, we need to normalize the distribution by finding ${A}$. That is, we must have

$\displaystyle A\int_{-\infty}^{\infty}e^{-\lambda\left(x-a\right)^{2}}dx=1 \ \ \ \ \ (2)$

The gaussian integral is very common, and the result is that

 $\displaystyle \int_{-\infty}^{\infty}e^{-\lambda\left(x-a\right)^{2}}dx$ $\displaystyle =$ $\displaystyle \sqrt{\frac{\pi}{\lambda}}\ \ \ \ \ (3)$ $\displaystyle A$ $\displaystyle =$ $\displaystyle \sqrt{\frac{\lambda}{\pi}} \ \ \ \ \ (4)$

Although there is no closed form indefinite integral, the definite integral can be found by a cute trick.

 $\displaystyle \left[\int_{-\infty}^{\infty}e^{-x^{2}}dx\right]^{2}$ $\displaystyle =$ $\displaystyle \int_{-\infty}^{\infty}e^{-x^{2}}dx\int_{-\infty}^{\infty}e^{-y^{2}}dy\ \ \ \ \ (5)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-x^{2}-y^{2}}dx\;dy \ \ \ \ \ (6)$

We can now transform to polar coordinates using

 $\displaystyle r^{2}$ $\displaystyle =$ $\displaystyle x^{2}+y^{2}\ \ \ \ \ (7)$ $\displaystyle dx\;dy$ $\displaystyle =$ $\displaystyle r\;dr\;d\theta\ \ \ \ \ (8)$ $\displaystyle \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-x^{2}-y^{2}}dx\;dy$ $\displaystyle =$ $\displaystyle \int_{0}^{\infty}\int_{0}^{2\pi}re^{-r^{2}}d\theta\;dr\ \ \ \ \ (9)$ $\displaystyle$ $\displaystyle =$ $\displaystyle 2\pi\int_{0}^{\infty}re^{-r^{2}}dr\ \ \ \ \ (10)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -\pi\left.e^{-r^{2}}\right|_{0}^{\infty}\ \ \ \ \ (11)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \pi \ \ \ \ \ (12)$

Therefore

$\displaystyle \int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi} \ \ \ \ \ (13)$

Using Maple (or integration by parts) we can work out the average and variance.

 $\displaystyle \left\langle x\right\rangle$ $\displaystyle =$ $\displaystyle \sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{\infty}xe^{-\lambda\left(x-a\right)^{2}}dx=a\ \ \ \ \ (14)$ $\displaystyle \left\langle x^{2}\right\rangle$ $\displaystyle =$ $\displaystyle \sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{\infty}x^{2}e^{-\lambda\left(x-a\right)^{2}}dx=\frac{1}{2\lambda}+a^{2}\ \ \ \ \ (15)$ $\displaystyle \sigma^{2}$ $\displaystyle =$ $\displaystyle \left\langle x^{2}\right\rangle -\left\langle x\right\rangle ^{2}=\frac{1}{2\lambda} \ \ \ \ \ (16)$

The distribution has the standard bell shape. Here’s a plot for ${\lambda=2}$ and ${a=1}$: