## Section12.2Normalization of the Gaussian

In Section 12.1 we gave a general formula for a Gaussian function with three real parameters. When Gaussian's are used in probability theory, it is essential that the integral of the Gaussian for all $$x$$ is equal to one, i.e. the area under the graph of the Gaussian is equal to one, so that the total probability of anything happening is one. We can use this condition to find the value of the normalization parameter $$N$$ in terms of the other two parameters.

Of course, you can use computer algebra to find the value of the integral and/or just look it up online or in a table of integrals, i.e.

\begin{equation} \int_{-\infty}^{\infty}e^{-x^2}\, dx =\sqrt{\pi}\tag{12.2.1} \end{equation}

and use an appropriate substititution. But there is a sweet trick to finding the integral of a Gaussian that is worth knowing.

First, give the name $$I$$ to the integral you are trying to find

\begin{equation} I=\int_{-\infty}^{\infty} Ne^{-\frac{(x-x_0)^2}{2\sigma^2}}\, dx\tag{12.2.2} \end{equation}

Next, find the value of the square of this integral, i.e. this integral times itself. Don't forget to name the dummy'' variables of integration with different names. In this case, we will call the variables $$x$$ and $$y\text{,}$$ to suggest coordinates in the plane.

\begin{align} I^2\amp =\left(\int_{-\infty}^{\infty} Ne^{-\frac{(x-x_0)^2}{2\sigma^2}}\, dx\right) \left(\int_{-\infty}^{\infty} Ne^{-\frac{(y-y_0)^2}{2\sigma^2}}\, dy\right)\tag{12.2.3}\\ \amp =\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} N^2 e^{-\frac{(x+x_0)^2+(y-y_0)^2}{2\sigma^2}} \, dx\, dy\tag{12.2.4} \end{align}

Finally, taking advantage of the fact that the integration (abstractly) covers the whole two-dimensional plane, we change to polar coordinates, centered at the point $$(x_0, y_o)\text{,}$$ using the substitutions

\begin{gather} (x-x_0)^2+(y-y_0)^2 = r^2\tag{12.2.5}\\ dx\, dy=r\, dr\, d\phi\tag{12.2.6} \end{gather}

to obtain

\begin{align} I^2\amp =\left(\int_{0}^{2\pi} \left(\int_{0}^{\infty} N^2 e^{-\frac{r^2}{2\sigma^2}} r\, dr\right)\, d\phi\right)\tag{12.2.7}\\ \amp =2\pi \sigma^2 N^2\tag{12.2.8} \end{align}

(Note the limits of integration!)

In the final line, the new factor of $$r$$ in the integrand made it possible to do the integral with the substitution given by $$u=\frac{r^2}{2\sigma^2}$$ (Details left to the reader. See Section 6.7 for an explanation of substitution in integrals.)

If we want to normalize the function for probability applications, the value of this integral should be equal to one, so we would choose

\begin{equation} N=\frac{1}{\sqrt{2\pi}\,\sigma}\tag{12.2.9} \end{equation}

and the formula for the normalized Gaussian is

\begin{equation} f(x)=\frac{1}{\sqrt{2\pi}\,\sigma}\, e^{-\frac{(x-x_0)^2}{2\sigma^2}}\tag{12.2.10} \end{equation}

In section Section 12.1, you can explore how the parameters $$N$$ and $$\sigma$$ separately affect the shape of the graph of a Gaussian. The normalization condition (12.2.9), relates these two parameters. As a Gaussian gets taller, it must also get narrower in just the right way to keep the area under the curve the same.