In the last class we learned about the central limit theorem.
Another way we can quickly explain that concept is to say that if we took a sequence of samples
and averaged them, then we would get a particular value.
That calculated average value is from the the normal distribution.
If we repeated that and took another set of samples from the same process,
and calculated the average, we would get a different average value.
But that second value is also from the normal distribution.
To see why this important, let's first quickly recap what the normal distribution looks like,
and learn more about its properties.
The distribution appears as shown here.
It is clearly a symmetric distribution.
The peak is where the mean of the distribution lies.
We have shown the distribution here centered at zero.
Let's take a little diversion.
In practice, your data will have a mean that is non-zero.
Take a look at the Ammonia dataset; the concentration of ammonia is, by definition,
a value that exceeds zero, and ammonia concentrations cannot be negative.
The histogram confirms this.
But, we can go find the average ammonia concentration value and subtract it
from every point in the data set, and so create a new vector.
We call this action: "mean centering".
We have re-centered the data.
If I calculate the mean of this new vector, it must be zero.
And if I draw a histogram, we can confirm it is centered at zero as well,
just like the ideal histogram from the normal distribution.
All that mean centering does is to slide the histogram left or right along the axis:
it does not change the height or the shape of the bars.
I'll explain the red lines in a minute.
So back to the normal distribution.
The standard normal distribution is centered at zero.
And at that point we have the highest probability,
a value around 0.4 of obtaining values.
You can confirm this in R for yourself.
Type "dnorm(0)", for example.
Try "dnorm(1)", or "dnorm(-1)", and confirm that you get the same values as shown here.
The total area under this normal distribution curve,
all the way from minus infinity to plus infinity is exactly 1.
Again, this is a helpful feature of the standard normal distribution.
I can quickly tell that the probability of obtaining a value smaller than zero is 50%.
And because it is symmetrical, the probability of obtaining a value greater than 0 is also 50%.
Let's look at some other features.
We introduced the concept of spread earlier,
and we used the standard deviation, "sigma", as the symbol for it.
On the normal distribution we see sigma here has a length of 1 unit.
In fact, that is what sets the area under the curve to be 1.
Let's deviate back now to our centered ammonia data.
We can get our histogram to line up with the standard distribution quite simply:
take every entry in the centered column vector and divide them, one at a time,
by the standard deviation of the vector.
All that this is doing, for those of you that are more algebraically inclined,
is nothing more than multiplying by a constant.
We are squeezing the data to have an area of 1.0.
I've added the vertical red lines to visually indicate to you
where the standard deviation has moved to from before to afterwards.
When we divide our data this way, we call that a scaling step.
You can convert any vector of data this way.
Start with your original raw data, shown here as "x", first subtract the sample mean
in the numerator, and then divide by the standard deviation.
If you were doing this with population data,
then we simply use the lGreek letters, "mu" and "sigma" instead.
Now once you have done this centering and scaling, your recalculated data, called "z" now,
has a mean of zero and a standard deviation of 1.0.
We call this a standardized data vector.
Notice also that standardization removes the units.
If your "x" variable had units of time, the "z",
the standardized variable, will be dimensionless.
Now I hope you can see why we standardize.
It is so that we can compare our vector to the normal distribution, or that we can compare it
to any other variable that has been standardized.
Standardization does not change any features in the data: in particular,
any outliers in the data before, will still be outliers afterwards.
If the data were independent before, they will still be independent afterwards.
Let's go back to the normal distribution and I want to point
out two features you must remember.
You should never have to look these up.
The area under a normal distribution, all the way from minus 1 standard deviation
to plus 1 standard deviation is about 70%.
That is, the vast majority of our data lies in this range.
There is 15% left over in the left tail, and 15% remaining in the right tail.
Also remember, that the area from minus 2 standard deviations
to plus 2 standard deviations is 95% of the area.
That leaves 2.5% in the left and right tails - remember it is symmetric.
Now in the next video we are going to introduce some notation, and learn how to read values
from the normal distribution using both R, as well as statistical tables.