We talked briefly before about this idea that a sample mean, let's say we call it X bar might be a
good or a bad estimate of the associated population mean.
MU It really just depends on the sample that we take.
We might get lucky and pull a random sample that does a good job representing the population and therefore
that sample mean is close to the population mean.
Or we might get unlucky or just do a bad job and find a non representative sample where the sample mean
does not do a good job estimating that associated population parameter.
The population mean this is what we call a point estimate.
So the sample mean is a point estimate for the population mean because these are single points.
They're single values in the same way that sample standard deviation is a point estimate for population
standard deviation.
Now, the benefit of using just a point estimate is that it's pretty easy to do, right?
If this is what we're doing here, we can pull a sample, we calculate sample standard deviation, and
we say, okay, based on the value we found for this standard deviation for this single sample, we
estimate that population standard deviation is equivalent to that sample standard deviation that we
found.
It's pretty easy to do.
But the drawback, of course, is that calculating just that one point estimate doesn't really tell
us how good or bad that estimate really is.
Again, the point estimate could be good.
It could be a bad estimate.
We wouldn't really know either way.
So in contrast to a.
Point estimate, which doesn't necessarily do a great job.
What we instead may do, may choose to do is calculate an interval estimate, which gives us a range
of values in which the population parameter may lie.
Of course, finding an interval estimate is a little harder to do.
It takes a little more work than the point estimate, but it gives us a lot more information.
So if we use an interval estimate and we touched on this very briefly in a previous lesson, but if
we use an interval estimate, we're able to make statements like I'm 95% confident that the population
mean lies in the interval A to B.
Now, that confidence we just mentioned, the 95% confidence is what's called the confidence level confidence
level or we'll call it c L for short.
And when it comes to confidence levels, we will very often use either 90% confidence, 95% confidence
or 99% confidence.
Those are the most commonly used confidence levels.
And what the confidence level really tells us is the probability that an interval estimate will actually
include the population parameter.
So for instance, if we choose a 95% confidence level and using that 95% confidence level, the interval
we calculate is let's say 11 to 15.
Then what we're saying is that there's a 95% chance that the population parameter will say the population
mean lies somewhere between 11 and 15.
Or another way to put that is that for 95% of the samples that we could take.
So if we were to take 100 samples, then 95% of them would give us an interval where the population
mean lies inside of that interval.
5% of the samples we take will give us an interval outside of the population mean.
So let's say that the population mean is actually we'll say 13.
What we're saying is that 95% of our samples will give us a confidence interval around 13 like this
111 to 15.
But 5% of our samples might give us an interval like we'll say 14 to 18.
And obviously the interval 14 to 18 does not include the population mean 13, 13 lies outside of the
interval, 14 to 18.
Now, before we go further, you might be wondering why wouldn't we always just choose the largest or
highest confidence level?
Don't we always want to be as confident as we possibly can be?
The answer is yes.
Of course.
We want to be as confident as we can be.
But choosing a higher confidence level comes with drawbacks.
For example, in order to achieve this higher confidence level, we may need to take a larger sample.
And taking a larger sample might not always be possible.
So there are other factors we have to balance against our level of confidence in general.
Yes, we want the highest confidence level we can get, but not at the expense of some other important
aspect of our sampling and hypothesis testing procedure.
And so we kind of have to balance those two things against each other, and we'll talk about that in
more detail later on.
Now, this idea of confidence level is directly related to a really important value in statistics,
which is called the alpha value.
We indicate it with the Greek letter alpha, and the alpha value is simply the percentage that remains
outside of this confidence level.
So the alpha value associated with a 90% confidence level is 10%.
The alpha value associated with a 95% confidence level is 5%, and the alpha value associated with a
99% confidence level is 1%.
We also call this the level of significance.
So the level of significance or and we'll talk about this later on to we can also call this the probability
of making a type one error.
But either way, for now, we'll just recognize that the alpha value is always equal to one minus the
confidence level.
Now we can always visualize the alpha value as the total area under the normal distribution outside
of what's called the confidence interval.
Here, we're going to be talking about the confidence interval for the mean.
We'll get to that confidence interval in a second.
But if we look here at a normal distribution, so this is the standard, normal distribution with the
mean of zero and a standard deviation of one.
We can show here as an example, a confidence level of 90%.
What that means is that 90% of the area under this distribution or the area under the curve is contained
within these boundaries that we've set, which means, of course, that 10% of the area under the curve
lies outside of these two boundaries.
So if 10% is the alpha value, it's the area outside of this 90% that we've set.
Entered here in the middle, then that means that in this lower tail we're going to have this 5% value
alpha divided by two.
And in the upper tail, we're going to have alpha divided by two or 5%.
So we take the total 10% that lies outside of this 90%, and we divide it exactly in half to put half
of the alpha value in the lower tail and half of the alpha value in the upper tail.
So everything's evenly distributed here.
The 90% in the middle, half the alpha value in the lower tail, half the alpha value in the upper tail,
and in this case with a 90% confidence level, that 90% goes in the middle, which means we have 5%
on the left and 5% on the right.
What we can say then, because this is the standard normal distribution.
Z we know that to find this boundary right here between the lower 5% and that middle 90%, we would
need to look up in the body of our Z table.
This 5% value here.
If we locate that 5% value in the Z table, we find a Z score of -1.65 to find this boundary right here,
this upper boundary, we have the 5% in this lower tail and then the middle 90%, which means this boundary
right here separates 95% of the area on the left from this last 5% of the area on the right.
So we would look up 95% in the body of our Z table or 0.9500.
And when we find that value in the body, we see that it's associated with the Z score of positive 1.65.
Now, of course, it makes sense here that we get exactly opposite Z values because this middle 90%
is perfectly centered at the mean.
It's symmetric around the mean.
And so the distance from the mean to this lower boundary here is the same as the distance from the mean
to this upper boundary here.
And so we're going to get opposite Z scores.
That being said, now is a good time to mention.
Remember we said that 90%, 95% and 99% are the most commonly used confidence levels.
Well, because we're always centering that percentage of the area in the middle of this standard normal
distribution.
That means we're going to have these little symmetric lower and upper tails on either side of that middle
90%, 95% or 99%, which means we're always going to get opposite Z scores.
So when we choose a 90% confidence level, we will always find the Z scores -1.65 and positive 1.65
that bound that middle 90% of the area.
If we use a 95% confidence level, our Z scores are positive and -1.96 And if we use a 99% confidence
level, our Z scores are always positive or -2.58.
So because we very commonly use these confidence levels, that means of course that we will very commonly
use these Z scores.
So we'll see these values 1.65, 1.96 and 2.58 come up all the time over and over again as we start
to work through the hypothesis testing process.
So it's worth pointing them out here.
Now, with all that background, let's talk about this main idea here, which is the confidence interval
for the mean.
Going back to this idea of point estimates versus interval estimates, the confidence interval is the
interval estimate that we're talking about.
Now, the formula that we use to find it and we'll break this down is this formula right here.
So this is the interval from A to B, this is the left edge of the interval A or the lower edge.
This is the upper edge or the right edge of the interval.
B So we have this interval from A on the left side to be on the right side, and it's equal to, you
can see here the sample mean plus or minus the T score that we find multiplied by.
And this value here you may recognize as standard error, which is sample standard deviation divided
by the square root of the sample size.
So sometimes you'll see the formula written this way where we have standard error written out as sample
standard deviation divided by square root of sample size.
And sometimes you'll see the formula written this way where we have se sub x bar, which indicates standard
error.
But either way, here's the first thing we want to point out.
We are showing in our confidence interval formula a T score both here and here in both representations
of the formula.
But up to now we've been talking about Z scores.
We talked about the standard normal distribution here with Z, We talked about these Z scores associated
with each confidence level.
Well, we can use a Z score if we happen to know population standard deviation, but whenever population
standard deviation is unknown, which of course, as you can imagine in the real world, it is almost
always unknown.
Then we need to use a T score instead of a Z score.
But if you did happen to know population standard deviation, then instead of using T here in these
formulas we would use Z.
In its place.
But assuming, of course, that population standard deviation is unknown, which is most likely the
case, then we'll need to use a TX score and this will be our formula for the confidence interval.
Basically, the idea for using a PT score when population standard deviation is unknown is that sample
standard deviation is of course a less reliable predictor of population standard deviation than population
standard deviation itself.
So because s here may not be perfectly accurate, we need to use a more conservative t value instead
of a z value to find the confidence interval In the same way, even if we did no population standard
deviation, we would still have to use a PT score if our sample size was small, because in the same
way we would consider that small sample size to be maybe not so reliable and so we would use a more
conservative t score instead of a Z score.
So just to take a simple example here, so we can show how to calculate the confidence interval, let's
say that the mean exam score of a sample of ten randomly selected students is 86.7.
So we'll say that our sample size is n equals ten, that our sample mean is 86.7.
And we'll say that we calculated a sample standard deviation of.
5.72.
And what we want to do now is find a confidence interval for the population mean at a confidence level
of 99%.
So we want to be really confident here in our result and let's see what that looks like.
So because population standard deviation is unknown, and even if we did know it because our sample
size is small and by small we mean GN is less than 30, our sample size is ten.
We will have to use a T score instead of a Z score because we know that our sample size is n equals
ten.
That means degrees of freedom is equal to ten minus one or nine.
And so if we pull up our t table and this is just a section of the T table that we can use, we look
for degrees of freedom of nine.
We see that over here on the left hand side and then we want 99% confidence.
So if we come down along the bottom to 99% confidence, we see 99% confidence here.
We have degrees of freedom of nine.
And so if we find the intersection of that row and column, we get this value here, 3.25.
Now, if we substitute what we know into our confidence interval formula right here, let's say that
we get the sample mean, which we know is 86.7.
So 86.7 plus or minus the T score that we found 3.25.
So 3.25.
And then we multiply that by sample standard deviation, which we calculated from our sample to be 5.72.
So 5.72 divided by the square root of sample size, our sample size is and equals ten.
So we get square root ten.
And if we use a calculator to find this value, what we get here is 86.7 plus or minus.
This 3.25 times 5.72 divided by root ten is approximately 5.88, which means then that our confidence
interval is A to B equals on the lower end of the confidence interval.
We have 86.7 -5.88 and on the upper end of the confidence interval we have 86.7 plus.
5.88.
And the result there is a confidence interval A to B that is equal to on the lower end, 80.82 and on
the upper end 92.58.
And that is how we calculate a confidence interval.
What it says here, the conclusion that we're basically making is that we are investigating some population
of students.
We took a random sample of ten of those students and from those ten students we calculated a mean exam
score of 86.7.
So we added up the exam score for each of those ten students.
And for those ten students, we calculated a sample mean of 86.7.
So the mean test score was 86.7.
And from that sample we calculated a sample standard deviation of 5.72.
Now, if we were just using a point estimate like we talked about at the beginning, we could stop there
and say that we expect that the population mean.
So for all of the students, not just these ten, but for all the students in our population, we expect
that the mean exam score is about 86.7.
But again, going back to the original point, this particular sample of ten students might be a really
bad estimate of the larger population.
It might not be very representative, it might do a bad job estimating population mean it might also
do a really good job, but we don't really know either way.
It's just a quick and dirty way to find an estimate for population mean, but it doesn't say anything
about how confident we are that this is a good estimate or a bad estimate.
So instead we compute this confidence interval.
And because we used a confidence level of 99%, remember we looked up this 99% confidence level in our
t table.
We had to use a T score instead of a Z score because number one, we didn't know the population standard
deviation.
And even if we did know it, we were taking a small sample.
We had a sample size smaller than 30.
So either of those factors would have required us to use a T score.
We had both of them, so we certainly had to use a T score instead of a Z score, but we looked up that
T score and now this confidence interval is an interval estimate.
It tells us that we are 99% certain that the population mean the mean exam score for the entire group
of students.
The entire population falls somewhere between 80.82 and 92.58.
And as you can see in a lot of ways, that gives us a lot more information than just this single point
estimate where we calculated a sample mean of 86.7 off of just one sample of only ten students.
Now, remember, before we talked about trade offs with the confidence level here, we chose a 99% confidence
level and we found an interval.
Let's round here.
We found an interval that said that the population mean was probably between about 81 and 93, just
rounding these values to the nearest whole number to make it a little easier to see.
But going back to those trade offs, what happens is if we're willing to give up some confidence, so
maybe instead of choosing 99%, we're instead willing to settle for a lower level of confidence and
choose 90% confidence.
Decreasing our confidence level will actually narrow this confidence interval.
So maybe the confidence interval associated with 90% and I haven't actually calculated it, but maybe
it would be something like 85.
To 90 instead of 81 to 93.
In other words, the higher the confidence, the wider the confidence interval, the lower the confidence,
the narrower the confidence interval.
And we like a narrower confidence interval because it really hones in on or gets us closer to gives
us a smaller interval in which our population parameter or population mean likely lies.
But we can't be quite as confident about that narrower interval.
To give you another example, if you ask me to find an interval around the mean height of all American
females, so the entire population is every female in America, and we're interested in the mean height
of that population, I might be able to tell you that I am 99% confident that that population mean lies
somewhere between four feet ten inches and let's say six feet three inches tall.
We can be virtually guaranteed that the population mean is somewhere in this interval.
This is a really wide interval.
But if I start to narrow that interval and I maybe find an interval like five feet four inches to five
feet, six inches, well, I really narrowed the interval, but maybe I'm only 90% confident or even
less confident that the mean height of all American females is somewhere in that narrower interval.
So the higher the confidence level, the wider the interval has to be by definition, the narrower the
confidence interval, the lower our confidence level.
So that is how we calculate the confidence interval for the mean of a population.
Next, we'll use all of the information that we've gathered about Z scores and T scores, how to take
samples and calculate confidence intervals, and we will turn toward hypothesis testing and the steps
that we take to investigate a hypothesis from beginning to end.