The Gaussian (Normal) distribution is a probability density function specified by two parameters – mean
and variance
. If a single variable, say
, is normally distributed the density function is abbreviated as
. The square root of the variance is called the standard deviation
. The inverse of the variance is called the precision
. The function is defined as follows
![Rendered by QuickLaTeX.com \begin{equation*} p(x) = \frac{1}{\sqrt{2 \pi } \sigma} \text{exp}\Bigg[\frac{1}{2} \Bigg( \frac{x - \mu}{\sigma} \Bigg)^2 \Bigg] \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-82586989505a6e87096258fd35d56078_l3.png)
Visualization

95% of the area under the Gaussian distribution curve lies within 2 standard deviation units about the mean.
Positive
Because of the exponential term, the above density function is always positive.
![]()
Maximum
The peak of the Gaussian distribution occurs when ![]()
![]()
Normalized
Over the entire feature space, the density function integrates to 1, thus making it a valid probability distribution.
Define
![]()
Substituting and using the fact that
is an even function
![]()
![Rendered by QuickLaTeX.com \begin{equation*} = \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ \frac{1}{2} \Bigg( \frac{x - \mu}{\sigma} \Bigg)^2 \Bigg] dx\end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-3d3425047dbf866e2fe1f96e99254db1_l3.png)
![]()
There are several tricks to solve this definite Gaussian integral by using the following property

![]()
![]()
Define
![]()
![]()
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \int_{0}^{\infty} \int_{0}^{\infty} e^{-(a^2 + b^2)} da \, db \Bigg]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-a319f0272521cf9c4eb4feec7b4bdfcd_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \int_0^\infty \left( \int_0^\infty e^{-(a^2 + b^2)} \, db \right) \, da \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-a1cc6c4fbb129fb6d8cb52fb4bd11abb_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \int_0^\infty \left( \int_0^\infty e^{-a^2(1+s^2)} a\,ds \right) \, da \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-df7459466a42be7816dba03a62e824c3_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \int_0^\infty \left( \int_0^\infty e^{-a^2(1 + s^2)} a \, da \right) \, ds \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-8ddfc86cdf0c0ca2c2e0fad8254281a1_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \int_0^\infty \left[ \frac{1}{-2(1+s^2)} e^{-a^2(1+s^2)} \right]_{a=0}^{a=\infty} \, ds \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-2f1fdd1f27b937a4adca7e75532db49a_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \frac{1}{2} \int_0^\infty \frac{ds}{1+s^2} \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-77f7617b1f4e50de052a71286cbc43b0_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \frac{1}{2} \Big [ \tan^{-1} s \Big ]_0^\infty \Bigg ]^{\frac{1}{2}} \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-d8d3af09e5879ea7e9a91605c23536bd_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \frac{2}{\sqrt{\pi }} \Bigg[ \frac{\pi}{4} \Bigg ]^{\frac{1}{2}} = 1 \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-407002ca893424fb3dd26c46006c9af0_l3.png)
Mean
The mean is defined by the expected value of the input variable over the entire feature space
![]()
![Rendered by QuickLaTeX.com \begin{equation*} = \int_{-\infty}^{\infty} x \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ - \frac{1}{2} \Bigg( \frac{x - \mu}{\sigma} \Bigg)^2 \Bigg] dx \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-c837d5382e0af2870cb9c8b9b805915d_l3.png)
Define
![]()
Substituting
![Rendered by QuickLaTeX.com \begin{equation*} \int_{-\infty}^{\infty} (a + \mu) \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ - \frac{1}{2} \Bigg( \frac{a}{\sigma} \Bigg)^2 \Bigg] da\end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-0c9b3b9cda2847276b0263bdb9f1102f_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} = \int_{-\infty}^{\infty} a \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ - \frac{1}{2} \Bigg( \frac{a}{\sigma} \Bigg)^2 \Bigg] da \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-2e89cb3abf62df93f5ad2b8cee8ba36d_l3.png)
![Rendered by QuickLaTeX.com \begin{equation*} + \mu \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ - \frac{1}{2} \Bigg( \frac{a}{\sigma} \Bigg)^2 \Bigg] da \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-91dedf44e207304da029cd0af5fafa99_l3.png)
The first term integrates to 0 because the integrand is an odd function and the integral is over the entire feature space. The integrand in the second term is another (zero-mean) gaussian distribution and as such integrates to 1 over the entire feature space. Thus
![]()
Variance
The variance is defined by the expected squared deviation of the input variable from the mean over the entire feature space.
![]()
![Rendered by QuickLaTeX.com \begin{equation*} = \int_{-\infty}^{\infty} (x - \mu)^2 \frac{1}{\sqrt{2 \pi } \sigma} \text{exp} \Bigg[ - \frac{1}{2} \Bigg( \frac{x - \mu}{\sigma} \Bigg)^2 \Bigg] dx \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-173c8c5371127ac6fa76bd32bd421025_l3.png)
Define
![]()
Substituting
![]()
![]()
Using integration by parts
![Rendered by QuickLaTeX.com \begin{equation*} \mathcal{E}[x] = \frac{2 \sigma^2}{\sqrt{\pi}} \Bigg( \Bigg[ a \frac{-1}{2} e^{-a^2} \Bigg]_{-\infty}^{\infty} - \int_{-\infty}^{\infty} \frac{-1}{2} e^{-a^2} da \Bigg) \end{equation*}](http://thebeardsage.com/wp-content/ql-cache/quicklatex.com-118cbc0950011e29ed90709a1998883e_l3.png)
The first term integrates to 0 because the integrand is an odd function and the integral is over the entire feature space. The second term is the Gaussian integral which evaluates to
. Thus
![]()