So we've said that measures of central tendency attempt to measure or indicate some kind of center point
of the data set.
But now we want to talk about measurements of dispersion or measurements of spread, which really at
their core, attempt to quantify how much the data is spread out around the mean.
So let's return first to this idea of a population which we indicate with Capital N or a sample, which
we indicate with lowercase n.
If we are looking at an entire population, for instance, maybe all of the students in our school,
if we're thinking about students at the school, 100% of those students make up the population.
And we would indicate that entire student population with capital N.
If we want to take a sample of students in the school in an attempt to find a smaller representative
group of that larger population, we would take some subsection, some sample of that larger population
and we would indicate that sample with lowercase n.
So if there are 1000 students in the school, then capital N is equal to 1000.
If we're taking a sample of 100 students, then we would say lowercase n is equal to 100.
And of course, as we already know, the mean for both the population and the sample we can find using
the same formula.
Remember that these two formulas are identical.
The only difference is that when we indicate a population mean, we usually do so with this Greek letter
MU, and when we indicate the mean for a sample, we usually do so with this x bar notation.
And as we're summing up all of the data points in the population, we indicate that population here
with Capital N and we divide by capital N the number of subjects in the population.
Whereas with the sample mean formula, of course we're using lowercase end to indicate the number of
subjects in the sample.
But otherwise these formulas are going to calculate the same thing just one for the population and one
for the sample.
Now, when it comes to measurements of dispersion or measurements of spread, we're talking about how
much the data is spread out around the mean.
When we looked at measures of central tendency, we talked about mean, we talked about median, we
talked about mode.
But here we're really focusing on mean.
And when we're talking about measures of spread, we're interested in how the data is spread out around
this mean value.
Is it very tightly clustered around the mean where all the data sits really, really close to that mean
value, or is the data really spread out far from the mean?
Does it have a larger range?
Is a significant amount of the data far away from this mean value.
That's what we're talking about when we say measures of dispersion or measurements of spread, how much
is the data spread out?
How much is the data dispersed from the mean?
And when it comes to those measurements of dispersion or measurements of spread, we look at two things
variance and standard deviation, both of which are very closely related to one another.
Let's start by looking at this idea of variance, and again, we can calculate the variance for the
population Capital N or for the sample lowercase n, and with both variance and standard deviation,
the smaller the value we find, then of course the smaller the variance or the smaller the standard
deviation and the more tightly clustered the data is around the mean.
If we find a larger value for variance or a larger value for standard deviation, which we'll look at
in a second, that means that the data is more spread out, that it is farther away from the mean.
Now, when it comes to calculating variance, if we're talking about population variance, we indicate
that with this Greek letter sigma and when we talk about population variance, we call that value sigma
squared.
In the same way, when we talk about sample variance, we talk about that as this value F squared.
So we use sigma squared for population variance, SX squared for sample variance.
And you'll notice that just like the formulas with the mean, these two formulas are essentially identical,
except that here in the population formula we are using population mean mu you'll see that value here
MU and with the sample we're using the sample mean value x bar that we already calculated up here when
we found sample mean.
And of course we're using capital N in the population formula lowercase n in the sample formula.
Now these variance formulas look a little complicated, but really all they're calculating is the mean
of the squared deviations.
So what do we mean by that?
Well, let's look at this population variance formula here.
We already know from the formula we looked at for mean that x abi is just one data point in our population,
one value, one subject in our population.
And we know that mu here is population mean.
So when we take x abi minus mu, this value right here is giving us the distance between this one data.
And the mean of the data set.
So if we found that the mean of the population was four and this particular data point is ten, we would
take ten minus four and we'd get a value of six here, which just indicates that the particular data
point of ten is six units away or a distance of six away from this population mean we call that the
deviation.
How much does ten deviate from the mean of four?
Well, it deviates by six units or this idea of distance of six.
So this is just the deviation of each particular data point away from the mean.
And of course, once we find that deviation, then we square it.
So this whole value here, quantity x sub minus mu squared, we say that that is the squared deviation.
And then this notation here just tells us to add up all of the squared deviations, and then we're dividing
by the number of subjects in the population capital N but adding up all of the squared deviations and
then dividing by the number of squared deviations.
That's just like what we did when we took the mean.
We added up all the data points and then we divide it by n here we're adding up all the squared deviations
and dividing by N.
So this whole part of the formula here, this sigma notation and the divide by capital N is just taking
the mean of the squared deviations.
So this variance formula is really just calculating the mean of the squared deviations.
And of course that's the same for sample variance.
And so you can start to get an idea that what we're really doing here is we're kind of trying to find
a mean distance away from the mean itself.
In other words, in simple terms, on average, how far is each data point away from the mean away from
the center of the data set?
Because if we can find an average of how far away each data point is from that center point, then we
can start to get an idea that, oh, the data is really spread out or that variance value is small,
the data is really close together.
The only thing about this concept of variance that tends to throw people off is this squared exponent
here.
The fact that we're squaring the deviations, there's a couple of reasons why we square this deviation
value.
First, if we get a value x sub I that is less than the mean.
So thinking about our example before we said that maybe the mean of the population is four.
Well, if this particular data point in the population is two, we're going to take two minus four,
we're going to get a negative two.
Our deviation is now negative and things can start to get a little strange.
If we're working with negative values and trying to find a mean of both negative and positive values.
So one reason that we square this deviation is to force all of these deviations to be positive.
If we get a deviation of negative two and we square it, it becomes a positive four.
And so then when we start adding up all of these squared deviations, we're going to be adding only
positive values.
It makes this calculation a lot cleaner.
So we square this value to get everything to be positive, which makes our calculation easier.
And the other reason we do it is because squaring the deviations magnifies the larger deviations and
forces them to have a bigger effect on the variance than smaller deviations.
So you can imagine here, let's say that we find a deviation this x sub minus mu value.
If we find a deviation of ten and we square it.
Now the squared deviation for that particular data point is 100.
Whereas if we find a deviation of two and we square it, our squared deviation is four.
So we're talking about the difference in deviations being two versus ten, but the difference in squared
deviations being four versus 100.
Now all of a sudden that difference is much, much larger.
So it's really magnifying those values that are further from the mean.
And that's going to help give us a clear picture of how varied, how dispersed the data really is away
from the mean.
So that's the variance concept.
And then our other measure of dispersion is what's called standard deviation.
And luckily standard deviation is very, very easy to calculate once we calculate variance and once
we understand what variance is, because standard deviation is just the square root of variance.
So we use this sigma letter, Greek letter sigma to indicate standard deviation.
So notice that variance for the population with sigma squared, but standard deviation for the population
is just sigma.
It is the square root of sigma squared.
So to find standard deviation, we just take the square root of sigma squared, which of course is variance.
So we could also replace this sigma squared value underneath the square root with the entire right hand
side of this population variance formula that would give us another formula for standard deviation.
And then same thing over here.
For sample standard deviation, we indicate that with SE, which of course is just the square root of
x squared, and we know that SE squared is sample variance.
So.
Once we calculate population variance defined population standard deviation, we just take the square
root of population variance.
Or once we've calculated sample variance to find sample standard deviation, we just take the square
root of sample variance and that'll give us sample standard deviation.
Now some people wonder why we would ever bother using standard deviation.
Why would we bother taking the square root to get a standard deviation value when this standard deviation
value feels so similar to variance?
And we've already calculated variance like what's the point of standard deviation?
Well, the reason that we like to find standard deviation value and in fact we usually work with standard
deviation instead of variance.
So we'll talk much, much more about mean and standard deviation than we ever will about mean and variance
and going forward will usually just use variance as a step on our way to finding standard deviation,
which we're more interested in.
The reason we're more interested in standard deviation is because the units of standard deviation will
match the units of the mean and the units of our data set.
So for instance, if you think about maybe a data set where all the data is given in terms of centimeters,
so let's say that we have some sample of people's heights and that data is given to us in terms of centimeters.
Well, when we go to find variance, the units on this x sub value are going to be centimeters.
The units on X bar, the mean are also going to be centimeters, because all we did up here to find
the mean was add up a bunch of centimeter values and then divide by some whole number.
N And so the units of X bar are going to be in centimeters.
We're going to have a mean in terms of centimeters.
And so then when we calculate variance, the units of x sub by minus x bar are also going to be centimeters.
But then when we square that value, we're going to end up with a centimeters squared.
We're going to add up all those centimeter squared values, and we're going to have a centimeter squared
unit value in this numerator.
And then we'll divide by a whole number and we'll get a value for variance as squared in terms of centimeter
squared.
So if our units for the mean and for the data itself are in centimeters, then variance by definition
is going to be in centimeter squared.
But of course, as you can imagine, when we take the square root of this, when we take the square
root of variance to get standard deviation, the square root of centimeter squared will just be centimeters
again.
And so the units of standard deviation are going to be back in terms of centimeters.
And therefore the units of standard deviation and mean are always going to match one another, which
is really nice.
It's going to make these two values easier to interpret and compare and match up.
And so that's a big part of the reason and one easy to understand reason for why we like to work with
standard deviation, with the mean instead of variance with the mean.
So all that being said, now that we understand mean variance, standard deviation and how we're calculating
these, let's just do one quick example to make our calculation easy to do by hand.
Let's pick a really super simple data set and say that we have some data set where the values are.
We'll just pick something really easy one, two, three, four and five.
Let's say that this is sample data.
We've taken a sample of our population and so we can see that we have five subjects in the sample data
and so we can say lowercase n is equal to five.
These are our five sampled data points.
And so if we take the mean, we should be able to see right away that the mean is three because we have
this balancing point for the data here of three, but we could also use this formula to calculate sample
mean by adding up these values.
If we add up one, two, three, four and five, we get 15.
And if we divide by N equals five, we get 15 over five and we find three.
So we can say that x bar, the mean of the sample is equal to three.
So we have our sample mean.
Now we want to talk about how to find the variance of that sample just so we can see this formula in
action.
So again, we're going to start by looking at the deviation of each data point in the sample.
So we're going to take this x sub value for our first data point.
So that's one we'll take one minus three, that's x sub, B minus x bar, and that's our first deviation
for the sample.
So if we want to calculate here sample variance, we'll say x squared will do it down here.
And our first deviation we said was one minus three, so one minus three quantity squared and we're
just going to add up all of the squared deviations.
So next we have.
You minus three quantity squared.
So two minus three squared.
Then we take our third data point and we get three minus three quantity squared and then our fourth
data point.
And then our last data point five minus three quantity squared.
So this is the sum of all of the squared deviations.
And then we're going to divide that by MN minus one for sample variance.
So we already know lowercase n is five.
There are five data points in the sample, so n minus one is five minus one or four.
So we get four in the denominator.
Now, before we go forward, let's talk really briefly about this n minus one value, because you may
be tempted to think that this denominator should just be lowercase n in the same way that the denominator
for population variance is capital N and not capital N minus one.
So the question is why is this lowercase n minus one?
Well, the reason is because, of course, if we have our entire population, if we know all the data
from the population, then we can calculate a perfectly accurate population, mean mu.
And we can go through and find a perfectly accurate population variance and population standard deviation.
But when we're taking a sample, of course, remember that taking a sample automatically introduces
some variability into our calculations because of course we might take one sample as we did here and
find a mean X bar equals three, but we might take a different sample of five subjects and find a different
sample.
Mean for that sample.
Maybe that sample mean we find is x bar equals five.
We could find another sample, mean x bar equals four.
So the mean that we find the sample mean we find depends on the exact sample that we pull from our population.
And the sample mean might change each time depending on the sample we pull.
So we've got some variability here in this sample mean.
So when we jump down here then to calculating sample variance, what we're doing here when we find these
deviations is we're taking all of the values in our sample like up here, one, two, three, four and
five, four x sub I, and we're finding the distance between those values and this sample mean x bar
equals three.
But of course by the nature of the sample mean we calculated x bar.
We have already in a way minimized the distance, minimized the deviation of all of these sample values
from x bar because of course this x bar value we calculated this sample mean that we calculated is by
definition the single value we can find that is as close as possible to all of these values from our
sample.
It is the balancing point of all the values in our sample.
And so we're already in a way minimizing these deviations.
So it's kind of this idea that we are going to potentially underestimate deviation.
And so the reason that we divide by n minus one is to correct at least a little bit for that bias.
In other words, dividing by N minus one helps us undo a little bit of the bias that we introduced when
we minimized the deviation in our sample by calculating this x bar value and then finding the deviation
of each of these data points in the sample from that sample mean that we calculated.
So that's why when we find population variance, we divide just by population capital N But when we
find sample variance because of the nature of sampling and the bias and variability that we introduce,
we divide instead by lowercase n minus one.
And so in this case, this example we're working with, there were five subjects in the sample, so
we divide by five minus one or four.
So then all we have to do is calculate.
Here we get one minus three is a negative two, and when we square that we get four.
Two minus three is a negative one.
When we square it, we get one.
Here, we have zero, here we have four.
Minus three is one squared is positive one and five minus three is two, quantity squared is positive
four.
So we get four and then we divide by four.
And of course the value here then is ten over four or five over two.
Or we could also write that as 2.5.
So our sample variance then if this is our sample, our sample variance is 2.5.
And then of course if we wanted to find standard deviation, all we have to do is take the square root
of that value.
And so we would say then that if we put up here sample variance is five halves, then sample standard
deviation is the square root of five halves, the square root of five halves, and that value is approximately
equal to.
1.58.
And this is, of course, like we said, 2.5.
So hopefully that gives you an idea of what we're doing when we calculate variance or standard deviation
for a population or a sample, both of which variance in standard deviation, both of which are measurements
of dispersion or measurements of spread that give us an idea of how much the data is spread out around
the mean, whether the data is spread out far from the mean, there's a wide range of the data away
from the mean or whether that data is super tightly clustered around the mean.