# Gaussian Notes

## Page Contents

## Understanding The Curve Formula

### An intuitive look...

The gaussian is a bell shaped curve who's basic shape is defined by the following equation. The familiar bell-shaped curve is plotted below. Most of the plots on this page are done using the amazing MPLD3 JS library, with data saved from IPython matplotlib MPLD3 plots. This means you should be able to interactively zoom in and pan the graphs if you like...

Below is an exponential curve . It is easy to see that as increases the value increases at an exponential rate. This kinda looks like one of the sides of a gaussian curve... if we could add the mirror image in and make a smooth "join" between the two, we'd be getting there...

The exponential will just tend to infinity. Note that it hits a -value of 1 when is zero. Note that the guassian above hits a value of 1 at the some point. So, what if we made the input to the exponential function a series of values that increased up towards zero and then decreased in a mirror image fashion? The input to our exponential could be defined as , ie., we'd plot This would give us the following graph...

The green curve is the exponential. The blue is the input we've given the exponential function. Now the -range is always negative, and taking the exponent of the negative number produces a small number which exponentially increases to 1 when as approaches 0. That's why we see a graph increasing from zero to one and then decreasing in the mirror image...

It's beginning to look a little like a gaussian but the peak is somewhat discontinuous right at the top... it ends in a pin head as increases linearly towards zero.

To smooth this pin head out we need to exponentially increase in the middle of the curve on either side of centre but as we approach the center we want to decrease our rate of increase. In other words as x approaches zero the input to the exp function needs to increase less than linearly, to the point where the rate of increase at is zero and we smoothly accelerate in and out of this point.

We've transformed our input to the exponential function from a basic series to something that helps produce a steeple-like curve. Can we transform this further so that for each element in the series the distance between each pair of values decreases towards zero as approaches zero?

Have a look at an inverted parabola...

It's clear to see that for values of closer to zero the rate of increase in is far less. Thus at large absolute values of the rate of increase in is large and as we get closer to the rate of increase in approaches zero. So, the values can become our input to the exponential function as they still have this property of symmetry about zero and being all negative. They also have the extra property we're looking for... the smoothness at .

So, this is how we get to our Gaussian function!

The green curve is the exponential. The blue is the input we've given the exponential function.

### Some Properties Of This Curve

The integral of the above function, , is
. Therefore, if we divide the function by we get a curve under which the area is 1, and doing this gives us
something that almost looks like the Guassian probability function!
If we added in terms to adjust the mean of the function and the standard deviation we'd get the final function...
The above is called the *normal distribution*. For any normal distribution the following applies:

- About 68% of the data will fall within one standard deviation, , of the mean ,
- About 95% of the data will fall within two standard deviations, , of the mean ,
- Over 99% of the data will fall within three standard deviations, , of the mean .