[MUSIC]
Let me introduce you to normal distribution,
which is one of the most commonly used distributions in statistical analysis,
and even in everyday conversations.
A large body of academic, scholarly and professional work rests
on the assumption that the underlying data follows a normal distribution.
The defining characteristics of normal distribution is this bell shaped curve
which you're familiar with from your textbooks.
Mathematically, normal distribution is presented by this equation.
We can say that the normal distribution relies on three inputs and
f stands for functions, so function of x, mu and sigma.
X is your data, x is a random variable and it can attain any reasonable value.
Mu stands for the mean.
And sigma is standard deviation.
And the mathematical formulation is right here,
which is 1 divided by sigma times and
then square root of 2 times pi, pi is 3.142 or 22/7.
And then you have the exponential here.
Do not forget this minus sign so exponential of this entity
which is minus and in the numerator x- mean or
x- mu d hold squared divided by 2 times sigma squared.
So let me explain.
1 divided by the standard deviation and
then square root of 2 times pi, 2 is known and pi's known.
So is the value for exponential and
what is not known is the sigma which you'd obtained from the data,
that is standard deviation and the mean, which is also coming from data.
So you have the mean and the standard deviation, and
x is the random variable who's mean and standard deviation you're using.
You put this all together and then you get the normal distribution,
the bell shaped curve that you saw earlier.
I also introduce you to the standard normal.
And standard normal is when we say that x is a variable that has a mean 0 and
standard deviation of 1.
So what's mean 0 and standard deviation 1 look like?
If you replace mu with 0 and standard deviation or sigma with 1,
the equation reduce to this entity which is 1 / 2 times pi.
Notice the sigma here which have great out a bit so that it doesn't interfere.
Sigma is 1 so one times anything would be the same, so I've removed this.
And then e to the power -(x- mu), but because mu is 0 so
x- 0 is x, so ((x)2/2) times sigma squared, sigma,
remember is 1, the square of 1 is 1, so 2 times 1.
So removing sigma because it's 1 and
anything multiplied with 1 is the same entity.
So how do I generate this normal density or a bell curve?
Let's assume that the underlying variable has a mean 0 and
the stand deviation of 1 and x varies between -4 and 4.
So the mean is 0 and the minimum value is -4, the maximum value is 4.
And I would substitute these -4 to 4 values in this equation.
This is the only thing that's changing, the x here is the only entity that is
changing, and let's see if this could generate the standard normal curve.
>> Let us do this in Python, we'll use the matplotlib function which
you are already familiar with for the graphics, NumPy library,
as well as the norm.pdf function in the SciPy stats library.
In this example, I have used increments of 0.1.
This will generate the standard normal curve that you hear about in statistics.
[MUSIC]