Now, the next measure in the descriptive statistics is the measures of variability.
Which is also point the measure of spreading.
Measure of spread sends us about how five the values are spread out.
So here, if you see we have these values ranging from 1 to 100.
So here to show that how these values are spreading, how these values are going from 1 to 100, if
the values are more present toward between 1 to 12, I'm there's very few values between 12, 100.
So this kind of data is shown by the measure of variability.
This shows that how much the values are reading in between.
So.
We have 9 million more, which can provide information about the central points of the data, but they
do not tell us about how the detail varies.
So we use range in the four day range variance and standard deviation as the measures of.
While 9 million and more are the measures of center attendance.
Now let us discuss about.
The quartiles and in the dating.
So let us see.
We have these values.
We have data ranging from 3 to 19.
So these values are ranging from 3 to 19 and then at a total of 15 values which represent.
So quartiles are basically the data divided into four quarters.
So the detail from 3 to 7 is the first quarter, but with just 25% of the values.
Then 8 to 11 is the next 25% of the values.
Then 12 to 15 is the next 25% of the value, and then 17 onwards is the next.
25% of the values, the values from 3 to 11 mean that this is the 50% of the value.
While 2217 mean that this contains 75% of the values.
So each quarter versus 25% of the entire data.
Which is shown here.
So each quarter will have 25%, be they net.
On the line, which is dividing this data is called coordinates.
So this one becomes the Q one.
This becomes Q, which is also the median of these values.
And the third division between the 25, the 75 and 25 of the.
This becomes the third quarter.
But just three.
Now interquartile range is the difference between Q3 and Q1.
So the in the model range for this particular data would be 17 minus seven, which is day.
Now to find out if a value is an outlier or not.
We have the simple formula present.
So the outlier is calculated by Q one, which is seven -1.5 times the in the quartile range.
And so it will be something there below.
Q What?
I'm the next outlier, which is the above range would be Q three plus 1.5 times the in the quartile
range.
So 17 plus 115 would be 30.
So any value above 32 will be an outlier on any value below minus eight would be an outlier.
So this is what Cornell done in the ages.
Now, here, let us see this data.
And here we have a box.
BLOCK three.
This kind of diagram is called a box plot.
So here, this again shows the same thing.
So this law was good.
Usually shows the law most value.
And this second line, which is the beginning of the box, shows the Q one line.
Which is which means that this much area contains 25% of the data.
The next portion from the Q one line to the Q2 line.
This is the line for the Q2 and this is called the median also.
So this much area contains that 50% of the data and the area above this line is the next 50% of the
data on this middle line or the end of the box line is the.
Range from 50% to 75% of.
I'm the line above.
This end of the line is the values above 75% of the data.
The above, the score shows the maximum value.
In peace, there is any outlier present.
Then this upper was this good and the lower good will not show the minimum and maximum value, but in
dawn they will sure be.
Outlier line.
So this line would then go on.
Endo.
Q One -1.5 base IQ and any value above this line, this particular value which is depicted by this stuff,
is the outlier value.
So here the lower cost quartile value.
Q one is seven, this is seven, which is Q1 and Q2 is 8.5.
Which is also the median.
Then Q3 is nine.
Then the lower whisker is £1.5 in the port range, which is at fourth.
Because that is data presented below what we are showing it as the outlier.
Now the upper school would be calculated by people as 1.5 frames in the model range, which is nine
plus three.
Well, so this is the maximum one.
If there is no datapoint that will then the highest point, less than 12 would be considered as the
upper whisker.
This means the 1.52 out of a school can be uneven in.
So this whiskey would either be the maximum value or 1.5 things that up.
And this one would be either the minimum value or.
Q one -1.5 things like you are.
Now that we have learned about the different measures of central tendency, let us go ahead and have
a look at how we can get to know about the spread of data.
Or you can also see this.
Now the measures of central tendency let us know about what are the central values or the data which
we have.
But that does not give us an insight of how the day district.
So that is what we will get
for that.
Let us first have a look at what are the values.
The first one is variants, and the second one is standard deviation.
Standard deviation is calculated by one upon N multiplied by v.
Thus the square of difference of the mean.
And
these are some together and divided by in to find the same condition.
Now we have considered mean as a value for calculating the standard deviation, and standard deviation
is nothing but a square root of readings.
So if you look at the formula, it is just the same.
It is mean minus that for a minus that particular number or you can see the number minus the mean.
You can see it anyway because it is being squared.
So it doesn't make a difference.
And further, your summing all the values up and dividing by n.
Similarly, you're doing the same thing but taking an underscore and the root of square root of the
medians here
if made too complicated for now.
But as we go forward, you'll understand.
So let us try to understand why we have chosen this formula.
How did this formula get formulated?
So let's understand that.
So this is just an example.
So let's say we are considering these numbers.
These are the set of numbers which we have, and we are trying to find out how this particular data
is spread out.
So when we are looking at the spread of this particular data, I can clearly see that the numbers are
ranging from 1 to 16.
There are some numbers which are one and two, which is the lower side of the numbers.
Then I have numbers like seven, 12, 15, 16.
Now these are few numbers.
So you can see that there is a slight difference between the median.
So if I calculate the mean of this particular list of numbers, the mean comes out to be 8.44.
So you can see these are a few numbers which are actually very near to the mean.
But apart from that, all of the numbers are distributed in the dataset.
So there are very low numbers also and very high numbers are also present.
But because these numbers are spread out, that is why the mean is coming out as 8.4.
Now, what should we use to find out how the did they spread?
So let us look this up.
In Excel, women do the calculations in Xs so that you will get an infusion of what we are doing and
why we are doing it.
Now, these were the numbers which we were looking at.
So let us first of all, find out the meaning of these numbers.
The mean will come out when
I'm taking an average of these numbers.
So this is the mean of these numbers.
Now we need to find out the state of these numbers.
So I need to compare these numbers with a particular number to actually find out how the data is being
changed.
I need to have a number with which I can compare these so that I can get an idea of what is this thing?
So what I'm doing is I'll be comparing these for the first number, the last number, and the mean of
the numbers.
And please note that these numbers are sorted in meters.
So the first number and last.
Are actually having a logical meaning that proposed in the last them what is actually the meaning and
max of the list of numbers which we have to first find out that deviation from the first number.
So the deviation from the first number will be this minus this.
Now when we are finding the deviation we want to keep.
This number is constant
and I keep finding out the values.
So here you can see this is basically one minus two, one minus four, one minus seven, one minus seven,
one -12, one -12, one -15, one -16.
These are the values which you're getting here.
Now, I will again take the average of these numbers.
Let me just copy the formulas here.
And here I give the average of these numbers.
I copy this formula here as well,
so that once we have the values, we get the results accordingly.
Now, this is the deviation from the first number.
Now, similarly, I will calculate the deviation from the last number.
So deviation will be what will be this number minus each in every number in the list.
So for that, I will have fixed this number again.
So I put a dollar here.
Now, here, I'm also giving you a slide inside about how we can use formulas in Excel.
So you can take that as a additional point here.
You will get to know how you can perform these in using an Excel.
Also, we will be learning that how we can do this in by hand, how we can do this from using Python.
So in the demo.
So here we have again 16 minus one, 16 minus two, 16 minus four and so on and 16 -16 and last.
So these are the values which we have here and here.
You can see that the deviation from the force number is -7.44.
Here we have 7.55.
If you take more of these numbers or you ignore the same and you can see that these values are somewhat
similar, these values are near to each other as of now.
So it doesn't really make a difference if we are calculating this based on the first number, last number
and so on.
So let's do it on the basis of the mean.
So here I will find of the mean gap as constant minus again all the numbers.
So let me just keep doing it.
So here you can see if I subtract these numbers from the mean, then these numbers again have not changed
much.
So here is with respect to the mean, the deviation from the mean is coming out to be zero.
Now, again, if I take more of these numbers, then it might change a little bit.
Now let us do the same for the mean.
Now, if you see we have followed the values from mean now, then we are calculating the deviation from
mean.
It is coming out to be zero, which is quite understandable because we are finding out the deviation
from the sample values.
So it will be balanced out when we are calculating in a positive direction and in the negative direction
is one.
So what we can do is instead of picking these values, we can take the square of these values so that
these the impact of the sign is not considered.
So we take a square of these values, so it will be free to put this into this set.
So these are the values, and we will do the same for all the numbers.
Now, because we have taken the square of these deviation from the means, what happens is the value
is increased.
Don't skip.
Now we want to bring it back to the normal scale so that we can compare the deviation that the values
which we have here.
So let's do that.
So we'll do a square root
of this particular number.
So it comes out to be 5.2305.
Now, if you will calculate the square root, basically we will conclude the variance and standard deviation
directly for these number.
It will come out to be somewhat similar to this, but it is doing that as well.
So let me find the values for you.
So this is variance and I'm taking variance for these numbers.
Similarly, I'm calculating the.
Standard deviation
for these numbers again.
So it is coming out with the exact same number.
Now, I have done scene calculation for two different data sets as well.
So let's have a look at those data sets, everything answering the same how we do the calculation is
also remaining the same.
So let us look at that.
So here you can see that we have we will consider the values which are having similar scaling.
So here you can see the values are distributed evenly.
We can see that the values are not changing.
My instead of having one, two, four, seven, 12, 15, 16, which is a nice spread out.
There is no outlier present in the data as well.
So we are getting the average to be 8.4 for the we do from the first number as -7.4.
Then the last number is 7.5.
This is actually zero.
And when we are taking the square root of the square deviation of the mean, it is coming out to be
5.230.
Now, I have changed these numbers a bit and here I have all these numbers.
Apart from that, I have included this 59, which is an outlier towards the upper limit of the values.
So basically I have increased the maximum value a lot.
So what happens now is the time to give you is the average.
The mean value turns out to be 13.22 instead of 8.44.
Because we have changed just one single value.
It has modified the mean so much.
Instead, if you would have loved that median, the median value would not have changed.
The mean value has changed.
Now, similarly, when we look at the deviation from the force number, it comes out to be -12.
The deviation from the last number comes out to be 45 point something, while the deviation from the
mean comes out, the hero and squared deviation from the mean comes out to be 16.79.
This shows that there is a change in the values.
Now, if you look further here, the deviation from the force number and the last number remains somewhat
seen.
But when we introduce an outlier, the deviation from the force number and last number have a huge difference.
Same thing happens here when I introduce an outlier towards the minimum value.
The deviation from the force number and last number have a huge difference.
While the deviation from the mean remains zero everywhere.
In all the values, the original, the mean remains the same.
But because there is an impact from the positive and negative values, that is something which needs
to be taken care of.
Otherwise we will not get a good information out of it.
You can clearly see that the mean is changing a lot here.
It was 8.4 for we introduced an outlier towards the maximum value.
It changed to 13.
We introduced an outlier towards the negative side of it.
It changed to 2.3.
So mean is highly influenced by a single location and so are the deviation from the first number and
the last numbers.
While the squared deviation from the mean if you see it is 20 here.
Here it is 16 and here it is five.
So these values are giving us a good idea of how the details are spread.
So that is why we use the standard deviation to see how the the how the values are spread.
The calculation which we have done here is exactly the same, which is to be done for the calculation
of standard deviation and variance.
The value which we have calculated by doing the square root is the standard deviation.
And if we would have kept it as it is, that is, we would have found no deviation from this from the
mean.
That is the mean value minus each and every number.
I'm thinking the sum of that deviation from the mean.
If we were taking this division of that mean after doing the sum.
So we are basically taking the difference, doing squaring, squaring all these mean deviations and
then taking an average of that, basically dividing by the total number of values which we have.
And that is the variance.
And then when we take a square root of it, it is the standard deviation.
That is exactly what needs to be done.
That is the bottom line.
This is the best way to remember this because this actually tells you why we are doing this.
So this is the formula for obedience.
And here you can clearly see that in probability theory that this experience is the average of the squared
differences from the mean informally.
It measures how what a set of numbers are spread out from their average values that you have seen that
this is changing a lot.
We are checking from the based on the basis of the plus number, the last number.
But you mean gives us the most reliable values.
That is why we use this Formula One variance and standard deviation.
Now, if you look, there are two formulas here.
First is for the population and second one is for the sum.
Similarly, we have here one for the population and one for the sample.
The only difference between the formula for its population and some food is that the for the values
are divided by n minus one instead of in when we are calculating for the sample variance.
Now why this is done, you will get to know in the next section where we are taking this business connection.
Now why have we divided the standard deviation by in minus one instead of dividing it by in which is
done in case of population?
So this is done because of vessel selection.
So vessels correction refers to the PN minus one found in several formulas, including the sample readings
and sample standard deviation formula.
This correction is made to correct for the fact that these sample statistics tend to underestimate the
actual pattern we found in the population.
Now, because the standard deviation and the variance which we are calculating for the sample is kind
of considering, not considering the entire picture and might be a little lower than the actual variance
or actual standard deviation of the population.
So what we do is we reduce the in value in the sample so that when we reduce the denominator, the entire
value of the variance and the standard deviation kind of increases a little.
So it.
Balances out and makes it closer to the population, standard deviation and the population readings.
So this is why we use the vessels.