Current time:0:00Total duration:12:23

0 energy points

# Statistics: Variance of a population

Video transcript

I realized I made a slight
error in the last video, when I talk about the
population and the sample mean. So I will rewrite the equations. I realize I made a
slight notational error, and it might have
confused you a little bit. So just to review a little
bit, it never hurts. The mean of a
population-- once again, that's mu-- the mean of
a population is equal to, you take the sum of
each of the data points. So you take the sum--
that's that big sigma is for-- of each of
the data points. So x sub i. I had written x sub n, before. And if you review
that last video, you can see why might
be a little confusing. And you start with
the first data point. So i is equal to 1. You start with the
first data point, and you take the sum all the
way to the n-th data point. Right? Where we have a big
capital N, where N is the total number of
elements in the population. And then you divide that by N. So that's another way of writing
x sub 1 plus x sub 2, plus-- and you just keep
adding, bum, bum, bum, however many there
are-- x sub N. And then, you divide
that by N. And I think that's what you're familiar with
as just the arithmetic mean, or the average. You just add up all
of the elements, and you divide by the total
number of elements there are. That's just a fancy
way of writing that. And then, the sample mean is
essentially the same thing, although you use slightly
different notation. The sample mean is written
as x with a line over it. And that's equal to,
once again, the sum of the elements in
the sample, right, and then you have a slight
notational difference. You start at the first
element in the sample. And you go to the number
of elements in the sample. And that's why they
use that lowercase n. There are a big N elements
in the whole population. And if you took some
subset of that-- we're assuming that small n is
less than or equal to big N. And anyway, you divide
that by the total number of elements in the sample. So once again, this would be
x1 plus x2, plus dun, dun, dun, plus x lower case n,
divided by lowercase n. These are essentially
the same thing. If your sample was the
entire population, then these ends would be
equal to each other. And these numbers would
be equal to each other. But just the
notational difference, if you ever see this, you know
you're dealing with a sample. Here you know you're dealing
with the entire population. And similarly, big N,
entire population, small n, the sample. Fair enough. I think we're now ready to learn
a little bit about measures of dispersion. So the mean, and the
mode, and the median, that we covered in the first
video in this playlist, were all ways of measuring the
central tendency of a data set. Or kind of, picking
a number that is most representative
of all of the numbers. But we lose a lot
of information. We don't know whether all of
the numbers in the data set are close to that number,
close to the mean. Or maybe they're all really
far away from the mean. And that's why we want to come
up with measures of dispersion. And let me tell you, let
me show you what I mean. So let's say I have one set,
and let's say, I don't know, let's say it is a 2,
a 2, and a 3, and a 3. Let's say this is a population. Let's just deal with
population means and population disbursements for now. So what's the mean here? The mean here is going to
be 2 plus 2 plus 3 plus 3, all of that over 4. And what is that? That's equal to
2 and 1/2, right? 4 plus 6, divided by 4, right. That's equal to 2.5. Fair enough. Fair enough. Now what if we had this? What if we had the numbers, I
don't know, 0, 0, and 5, and 5. So these are the
numbers in the set. I'll put commas,
just so you know these are separate numbers. What's the mean here? Well, the mean here-- let's
say this is the population that we're sampling,
This isn't a sample, this is the entire population. And you'll see why I'm making
that distinction later-- so it'll be 0 plus
0 plus 5 plus 5. Well that's 10, divided
by 4 is equal to 2.5. So the arithmetic mean of
both of these populations are the same number. They're both 2.5. Right? But you see that these sets are
kind of, they are different. Here, all of the numbers are
pretty close to 2.5, right? Well, here, sure their mean,
their arithmetic mean, is 2.5, but they're further
away from 2.5. Or the distances of
each of these numbers, each of the numbers in the set,
their distance from the mean is further. So you can kind of view them
that they're more dispersed, they're further
away from the mean. Or another way you
could think of it is, the mean, although it does
measure its central tendency, it's not quite as indicative
of all the numbers. The numbers are much further
away from the mean, on average. So how do you measure that? Well, you measure
that with a variance. And this is something I
found, and even in my own, it seems complicated when
you first look at it. And most statistics textbooks
use fairly complex notations. But the idea is almost
as straightforward as the arithmetic mean. So what they'll do is, they'll
write, you know, the variance. And they'll write it
as this letter sigma, this Greek letter-- I wrote
the top part too long. Let me actually undo that. I don't want you to spend
the rest of your life writing with a big top part-- they
write it as sigma squared. And we'll talk,
in a few seconds, about why it's written as--
you know, why don't they just write v for variance? Why do they write this
weird letter squared? I'll talk about it in a second. But the variance of a
population is defined-- and once again, these are
just human-derived constructs of trying to get our
minds around data, being able to describe a set
of data, without having to list all the numbers. And then, being
able to understand what that data might
represent, or what can represent that data. So what you do is,
you take the sum, and you start with all of
the points in the population. But instead of taking
the sum of the points, you take each point, x sub i,
and you subtract from that-- and actually, it doesn't matter
if you subtract from that, or you subtract
that from the mean, the population mean,
and then you square it. So what is this? This is the distance between
each number and the mean. And then, when you square it,
it becomes a positive number. So you can kind of view it as
the squared absolute distance between each number and
the mean of that set. And then you take the
average of all of those. You divide that by n. Now that might seem like
a very complicated notion, but let's calculate it
for these two data sets. So here-- let me rewrite that
first data set-- it's 2, 2, 3, and 3. So what is-- let me, actually,
let me write it this way. I think this will help explain
it for you a little bit better. So if I wrote i. i1, i2, i3, i4. That's i. Then x sub i. And you know, it's
kind of arbitrary. It's just, you
know, this is saying the first term, the second
term, the third term. I could have had
this in any order. It doesn't matter. Maybe this was the first
term, and this was the second, and this was the third. It doesn't matter. Because we're just going to
add them all up, and then divide them. So it doesn't matter
what order we do it. But anyway, x sub 1 is equal
to 2, x sub 2 is equal to 2, x sub 3 is equal
to 3-- I'll stop writing this equal thing--
x sub 4 is equal to 4. Right? What's the mean? Well, we figured out
the mean up here. We just took these numbers and
added them and divided by 4. The mean is 2.5. So what is x sub
i minus the mean? Right? We're slowly building
up to this equation. What is x sub i minus the mean? Well, 2 minus 2.5,
that's minus 0.5. 2 minus 2.5, that's
once again, minus 0.5. 3 minus 2.5, that's 0.5. 3 minus 2.5, that's 0.5. Fair enough. Now this equation, they
want us to square this. So x sub i minus
the mean squared. There's several other properties
we'll talk about later. But the most important thing
that the squaring does, and the absolute value
could have done it as well. But the squaring makes
all of these positive. So minus 0.5 squared
is positive 0.25. This is positive 0.25. Plus 0.5 squared is
also positive 0.25. And this is positive 0.25. And so what is-- so if we
wanted to know the sum from i is equal to 1 to 4 of x
sub i minus the mean, which is 2.5 squared. This is equal to, what, the
sum of all of these numbers. This is just saying
sum all of these. So sum all of these. 0.25, so that's equal to 1. But this isn't the variance yet. The variance is this
thing-- let's look at the original formula-- the
variance is this thing, divided by the total number
of numbers you have. So you take this, and
then you-- so the variance is equal to this thing, divided
by the total number of numbers, which is 4. Which is equal to 0.25. And you see, I mean
here, the distance from every number to the
mean squared was 0.25. So the average of all of
these, which is essentially what the variance is, the
average was also 0.25. And I'll do another example
where these are different. The other example in this
video, actually, they're not different. But you see here, the average
squared distance from the mean, in that first data set, is 0.25. And here, what's the average
squared distance from the mean? So let's see. This is how far from the mean? It is-- So let's say x--
let me write-- x sub i. And then, x sub i minus the
mean for this population. So x sub i, there's a 0,
there's a 0, there's a 5, and a 5, right? There's the first term x sub 1,
this is x sub 2, and so forth. And then, each of these numbers
0 minus 2, that's minus 2.5. 0 minus 2.5. Right? This could be 2.5, right? That's the mean. It's minus 2.5. 5 minus 2.5 is 2.5,
5 minus 2.5 is 2.5. Now, if you took x sub i minus
the mean squared, 2.5 squared is what? 6.25 and it becomes positive. So it's 6.25. That's the same thing, 6.25. That's already
positive, so 6.25, 6.25. And so, the variance
is the sum of all of these, divided by the total
number of numbers there are, right? So we take the sum of all-- so
this is the average of these, and that's pretty
easy to calculate. If you added all of these
up and divided by 4, you're just going to get 6.25. So the variance of this
population is 6.25. So there you have it. You have two data sets where
their means are the same. But the variance of this
data set is equal to, we figured out, was 0.25. While the variance of this
data set is equal to 6.25. And it's hard right now to have
an intuition of what this-- you know, how does this
6 relate to the 0.25-- but you know that this
is a larger number. This is a much larger
number than this is. Which tells you, just kind
of at a intuitive feel, that the numbers in this that
are, on average, much further away from the mean than the
numbers in this data set. Anyway, I'm out of time. I'll see you in the
next video, and we'll talk a little bit about this. And we'll talk-- and we'll move
into the standard deviation. And then, what
happens if you take these of a sample
instead of a population. Everything we're doing
here, we're taking the mean and the variance of every
number in the data set. Later we'll do it
for the sample. See you soon.