Confidence interval for a mean with paired data

WEBVTT
Kind: captions
Language: en

00:00:00.384 --> 00:00:02.675
- [Instructor] A group of
friends wondered how much faster

00:00:02.675 --> 00:00:05.179
they could snap their fingers on one hand

00:00:05.179 --> 00:00:06.545
versus the other hand.

00:00:06.545 --> 00:00:08.855
Very important question in life.

00:00:08.855 --> 00:00:11.802
Each person snapped their
fingers with their dominant hand

00:00:11.802 --> 00:00:13.046
for 10 seconds

00:00:13.046 --> 00:00:15.435
and their non-dominant
hand for 10 seconds.

00:00:15.435 --> 00:00:17.209
Where, if you're right-handed,

00:00:17.209 --> 00:00:18.683
right hand would be your dominant hand.

00:00:18.683 --> 00:00:19.551
If you're left-handed,

00:00:19.551 --> 00:00:21.559
left hand would be your dominant hand.

00:00:21.559 --> 00:00:24.174
Each participant flipped
a coin to determine

00:00:24.174 --> 00:00:26.639
which hand they would use first,

00:00:26.639 --> 00:00:28.697
because if you always used
your dominant hand first,

00:00:28.697 --> 00:00:30.457
maybe you're tired by
the time you're doing

00:00:30.457 --> 00:00:32.351
your non-dominant hand or
there's something else.

00:00:32.351 --> 00:00:35.682
So here it's random
which one you use first.

00:00:35.682 --> 00:00:37.465
Here are the data for how many snaps

00:00:37.465 --> 00:00:39.616
they performed with each hand,

00:00:39.616 --> 00:00:43.542
the difference for each
participant, and summary statistics.

00:00:43.542 --> 00:00:45.350
And this is actually real data

00:00:45.350 --> 00:00:47.391
from the Khan Academy Content Team,

00:00:47.391 --> 00:00:49.285
and so you see, for each
of the participants,

00:00:49.285 --> 00:00:50.425
for Jeff right over here,

00:00:50.425 --> 00:00:53.260
he was able to do 44 snaps in 10 seconds

00:00:53.260 --> 00:00:55.598
on his dominant hand, which is impressive,

00:00:55.598 --> 00:00:57.108
more than I think I could do,

00:00:57.108 --> 00:01:00.460
and he was even able to do
35 on his non-dominant hand,

00:01:00.460 --> 00:01:01.568
and so the difference here,

00:01:01.568 --> 00:01:05.702
the dominant hand minus
the non-dominant was nine,

00:01:05.702 --> 00:01:09.904
and then they tabulated this
data for all five members.

00:01:09.904 --> 00:01:14.348
Now they also calculated
summary statistics for them,

00:01:14.348 --> 00:01:17.116
but this is the really
interesting thing right over here.

00:01:17.116 --> 00:01:18.720
This is the difference
between the dominant

00:01:18.720 --> 00:01:20.593
and the non-dominant hand,

00:01:20.593 --> 00:01:23.084
and so what they did
here, the mean difference,

00:01:23.084 --> 00:01:26.027
what they did is they took
this row right over here

00:01:26.027 --> 00:01:30.194
and they calculated the mean,
which they got to be 6.8,

00:01:31.127 --> 00:01:34.223
and then they calculated
the standard deviation

00:01:34.223 --> 00:01:36.467
of these differences right over here,

00:01:36.467 --> 00:01:40.076
which they got to be approximately 1.64,

00:01:40.076 --> 00:01:41.909
and then we are asked:

00:01:43.761 --> 00:01:48.158
Create and interpret a
95% confidence interval

00:01:48.158 --> 00:01:51.522
for mean difference in number of snaps

00:01:51.522 --> 00:01:53.286
for these participants.

00:01:53.286 --> 00:01:54.274
So pause this video.

00:01:54.274 --> 00:01:55.769
See if you can make some headway here.

00:01:55.769 --> 00:01:58.307
See if you can think about
how to approach this.

00:01:58.307 --> 00:02:00.120
So what's interesting here is,

00:02:00.120 --> 00:02:02.509
we're not trying to construct
a confidence interval

00:02:02.509 --> 00:02:05.704
for just the mean number of
snaps for the dominant hand

00:02:05.704 --> 00:02:08.313
or the mean number of snaps
for the non-dominant hand,

00:02:08.313 --> 00:02:10.989
we're constructing a
95% confidence interval

00:02:10.989 --> 00:02:12.984
for a mean difference.

00:02:12.984 --> 00:02:14.682
Now you might say, wait, wait, wait,

00:02:14.682 --> 00:02:16.520
I have two different samples here

00:02:16.520 --> 00:02:20.429
and then this third data
is somehow constructed

00:02:20.429 --> 00:02:21.690
from these other two,

00:02:21.690 --> 00:02:22.523
but one way to think about it,

00:02:22.523 --> 00:02:24.828
this is matched pairs design.

00:02:24.828 --> 00:02:27.425
So in a matched pair
design, what you do is,

00:02:27.425 --> 00:02:30.244
for each participant, for
each member in your sample,

00:02:30.244 --> 00:02:32.805
you will make them do the
control and the treatment.

00:02:32.805 --> 00:02:34.426
So for example, you could do the control

00:02:34.426 --> 00:02:37.350
as how many they can do in the
dominant hand in 10 seconds,

00:02:37.350 --> 00:02:38.905
and the treatment is how many they can do

00:02:38.905 --> 00:02:40.201
in the non-dominant hand,

00:02:40.201 --> 00:02:42.100
and in matched pairs design,

00:02:42.100 --> 00:02:45.013
you're really concerned
about the difference,

00:02:45.013 --> 00:02:46.705
and so you can really view this as,

00:02:46.705 --> 00:02:49.281
is you just have one sample size of five

00:02:49.281 --> 00:02:51.609
for which you are
calculating the difference

00:02:51.609 --> 00:02:53.378
for each member of that sample

00:02:53.378 --> 00:02:57.170
and the standard deviation
across that entire sample.

00:02:57.170 --> 00:02:59.501
Now before we calculate
the confidence interval,

00:02:59.501 --> 00:03:02.612
let's just remind ourselves
some of our conditions

00:03:02.612 --> 00:03:04.710
that we like to think about
when we are constructing

00:03:04.710 --> 00:03:06.359
confidence intervals.

00:03:06.359 --> 00:03:07.620
The first condition we think about

00:03:07.620 --> 00:03:10.287
is whether our sample is random.

00:03:11.601 --> 00:03:13.891
Now if we were trying to
make some type of judgment

00:03:13.891 --> 00:03:16.751
about all human beings and
their snapping ability,

00:03:16.751 --> 00:03:18.974
this would not be a random sample.

00:03:18.974 --> 00:03:21.183
These people all work at Khan Academy.

00:03:21.183 --> 00:03:23.275
Maybe somehow, in our interview process,

00:03:23.275 --> 00:03:26.170
we select for people who
snap particularly well,

00:03:26.170 --> 00:03:27.950
but whatever inferences we make,

00:03:27.950 --> 00:03:30.481
we can say, hey, this is
roughly true about this group

00:03:30.481 --> 00:03:31.765
of friends.

00:03:31.765 --> 00:03:35.597
Now the next condition
we wanna think about is

00:03:35.597 --> 00:03:37.541
the normal condition.

00:03:37.541 --> 00:03:39.149
Now there's a couple of
ways to think about it.

00:03:39.149 --> 00:03:42.342
If we had sample size of 30 or larger,

00:03:42.342 --> 00:03:43.853
the central limit theorem says,

00:03:43.853 --> 00:03:47.992
okay, the sampling distribution
would be roughly normal,

00:03:47.992 --> 00:03:50.316
the sampling distribution
of the sample means,

00:03:50.316 --> 00:03:53.443
but obviously, our sample size
is much smaller than that.

00:03:53.443 --> 00:03:54.488
One way to think about it.

00:03:54.488 --> 00:03:56.081
We could just plot our data points

00:03:56.081 --> 00:03:59.671
and see whether they seem
to be skewed in any way,

00:03:59.671 --> 00:04:02.470
and if we just do a little
dot plot right over here,

00:04:02.470 --> 00:04:03.808
we could say.

00:04:03.808 --> 00:04:07.975
Let's see, make this, zero,
one, two, three, four, five,

00:04:09.167 --> 00:04:11.500
six, seven, eight, and nine.

00:04:13.677 --> 00:04:16.924
So we have one data point
where the difference was nine,

00:04:16.924 --> 00:04:19.339
one data point where
the difference is five,

00:04:19.339 --> 00:04:22.427
one data point where
the difference is eight,

00:04:22.427 --> 00:04:25.225
one data point where
the difference is six,

00:04:25.225 --> 00:04:28.633
and another data point
where the difference is six,

00:04:28.633 --> 00:04:32.046
and so this doesn't look
massively skewed in any way.

00:04:32.046 --> 00:04:33.830
Our mean difference was right over here.

00:04:33.830 --> 00:04:35.365
It's about 6.8.

00:04:35.365 --> 00:04:37.520
It looks roughly symmetric.

00:04:37.520 --> 00:04:41.021
So we can feel okay about
this normal distribution.

00:04:41.021 --> 00:04:44.674
This isn't the best study
that one could conduct.

00:04:44.674 --> 00:04:46.359
This is obviously a small sample size.

00:04:46.359 --> 00:04:48.825
It's not random of the entire population,

00:04:48.825 --> 00:04:50.336
but maybe we could go with it.

00:04:50.336 --> 00:04:52.747
Also, when you think about
biological processes,

00:04:52.747 --> 00:04:54.430
like how well someone snaps,

00:04:54.430 --> 00:04:56.305
which is a product of a
lot of things happening

00:04:56.305 --> 00:04:57.567
in the human body,

00:04:57.567 --> 00:04:59.643
and it's the sum of many many processes.

00:04:59.643 --> 00:05:01.168
Those things also tend to have

00:05:01.168 --> 00:05:02.539
a roughly normal distribution,

00:05:02.539 --> 00:05:04.434
but I won't go into too much depth there,

00:05:04.434 --> 00:05:06.080
but all of these things, once again,

00:05:06.080 --> 00:05:07.544
this isn't a super robust study,

00:05:07.544 --> 00:05:09.704
but this is a fun thing for friends to do

00:05:09.704 --> 00:05:11.541
if they have nothing else to do.

00:05:11.541 --> 00:05:12.453
All right.

00:05:12.453 --> 00:05:14.293
Now the third one is independence.

00:05:14.293 --> 00:05:16.870
And this one actually we
can feel pretty good about,

00:05:16.870 --> 00:05:18.867
because Jeff's difference right over here

00:05:18.867 --> 00:05:21.043
really shouldn't impact
David's difference,

00:05:21.043 --> 00:05:22.774
or David's difference
really shouldn't impact

00:05:22.774 --> 00:05:23.781
Kim's difference,

00:05:23.781 --> 00:05:25.298
especially if they're
not observing each other.

00:05:25.298 --> 00:05:26.782
And let's just say for sake of argument

00:05:26.782 --> 00:05:30.200
that they did it all
independently in a closed room

00:05:30.200 --> 00:05:31.736
with an independent observer,

00:05:31.736 --> 00:05:33.121
so they weren't trying to get competitive

00:05:33.121 --> 00:05:34.242
or something like that,

00:05:34.242 --> 00:05:35.173
but needless to say,

00:05:35.173 --> 00:05:36.740
this isn't a super robust study,

00:05:36.740 --> 00:05:40.385
but we can still calculate
a 95% confidence interval.

00:05:40.385 --> 00:05:41.606
So how do we do that?

00:05:41.606 --> 00:05:43.650
Well, we've done this so many times,

00:05:43.650 --> 00:05:46.400
our confidence interval
would be our sample mean,

00:05:46.400 --> 00:05:50.534
so it would be the mean of our difference,

00:05:50.534 --> 00:05:53.071
the mean of our difference plus or minus,

00:05:53.071 --> 00:05:55.646
Now we don't know the
population standard deviation,

00:05:55.646 --> 00:05:58.201
so we're going to use our
sample standard deviation

00:05:58.201 --> 00:06:00.552
and if you're using a
sample standard deviation

00:06:00.552 --> 00:06:03.799
and this confidence interval
is all about the mean,

00:06:03.799 --> 00:06:05.924
and so our critical
value here is going to be

00:06:05.924 --> 00:06:08.893
based on a t-table on a t-statistic,

00:06:08.893 --> 00:06:10.186
and they're going to multiply that

00:06:10.186 --> 00:06:14.884
times the sample standard
deviation of the differences,

00:06:14.884 --> 00:06:18.501
divided by the square
root of our sample size,

00:06:18.501 --> 00:06:20.371
divided by the square root of five.

00:06:20.371 --> 00:06:22.197
Now we know most of this data here,

00:06:22.197 --> 00:06:23.917
and let me just write it down over here.

00:06:23.917 --> 00:06:28.262
We know the mean, the sample
mean right over here, 6.8.

00:06:28.262 --> 00:06:32.030
So it's going to be 6.8 plus or minus,

00:06:32.030 --> 00:06:35.894
and now what will be
our critical value here?

00:06:35.894 --> 00:06:40.165
Well, we wanna have a
95% confidence interval

00:06:40.165 --> 00:06:42.383
and what's our degrees of freedom?

00:06:42.383 --> 00:06:44.333
Well, it's one less than our sample size,

00:06:44.333 --> 00:06:47.681
so our degrees of freedom right
over here is equal to four.

00:06:47.681 --> 00:06:51.096
And so we're ready to use a t-table.

00:06:51.096 --> 00:06:53.410
So this is a truncated
t-table that I could fit

00:06:53.410 --> 00:06:54.889
on my screen here,

00:06:54.889 --> 00:06:57.070
and so there's a couple
of ways to think about it.

00:06:57.070 --> 00:06:59.660
Here they actually give
us the confidence level,

00:06:59.660 --> 00:07:02.381
and the reason why that
corresponds to a tail probability

00:07:02.381 --> 00:07:06.381
of 0.025 is that if
you take the middle 95%

00:07:07.899 --> 00:07:09.379
of a distribution,

00:07:09.379 --> 00:07:12.650
you're going to have 2.5% on either end.

00:07:12.650 --> 00:07:14.890
That's going to be your tail probability,

00:07:14.890 --> 00:07:16.704
so that's all that's going on over there.

00:07:16.704 --> 00:07:19.771
So we're going to be in
this column right over here

00:07:19.771 --> 00:07:23.680
and which degrees of freedom do we use?

00:07:23.680 --> 00:07:24.885
Well, it's gonna be
four degrees of freedom.

00:07:24.885 --> 00:07:25.982
Our sample size is five.

00:07:25.982 --> 00:07:27.688
Five minus one is four,

00:07:27.688 --> 00:07:32.282
so this is going to be
our critical value, 2.776.

00:07:32.282 --> 00:07:35.532
So we have 2.776 as our critical value,

00:07:38.209 --> 00:07:42.533
and then times our sample
standard deviation.

00:07:42.533 --> 00:07:44.243
Well, the sample standard deviation

00:07:44.243 --> 00:07:48.816
for our difference is
right over here, is 1.64,

00:07:48.816 --> 00:07:51.340
and then we're going to divide that

00:07:51.340 --> 00:07:54.490
by the square root of our sample size.

00:07:54.490 --> 00:07:56.304
So the square root of our sample size,

00:07:56.304 --> 00:07:57.935
where I already wrote a five in there.

00:07:57.935 --> 00:07:59.766
Sometimes I just write an N there,

00:07:59.766 --> 00:08:02.092
and so, what is this going to be equal to?

00:08:02.092 --> 00:08:03.894
First, let's just calculate
just the margin of error

00:08:03.894 --> 00:08:04.727
right over here,

00:08:04.727 --> 00:08:07.977
so this is going to be 2.776 times 1.64

00:08:14.639 --> 00:08:17.556
divided by the square root of five,

00:08:19.933 --> 00:08:24.100
and we get a margin of error
of approximately 2.036,

00:08:25.755 --> 00:08:29.672
so this is going to be
6.8 plus or minus 2.036.

00:08:32.592 --> 00:08:34.375
It's approximately equal to that,

00:08:34.375 --> 00:08:36.189
where this is our margin of error,

00:08:36.189 --> 00:08:37.739
and if we actually wanted
to write out the interval,

00:08:37.739 --> 00:08:40.622
we could just take 6.8 minus
this, and 6.8 plus that,

00:08:40.622 --> 00:08:42.580
so let's do that again
with the calculator.

00:08:42.580 --> 00:08:45.663
So 6.8 minus 2.036 is equal to 4.764.

00:08:53.197 --> 00:08:57.364
So our confidence interval
starts at 4.764, approximately,

00:08:58.288 --> 00:08:59.807
and it goes to, let's see.

00:08:59.807 --> 00:09:01.486
I can actually do this one in my head,

00:09:01.486 --> 00:09:04.089
if I add 2.036 to 6.8,

00:09:04.089 --> 00:09:06.256
that is going to be 8.836.

00:09:10.374 --> 00:09:12.565
Now how would we interpret
this confidence interval

00:09:12.565 --> 00:09:13.723
right over here?

00:09:13.723 --> 00:09:17.810
One way to interpret it is to
say that we are 95% confident

00:09:17.810 --> 00:09:21.501
that this interval captures
the true mean difference

00:09:21.501 --> 00:09:24.326
in snaps for these friends.

00:09:24.326 --> 00:09:27.646
We could also say that there
appears to be a difference

00:09:27.646 --> 00:09:30.194
in the mean number of snaps,

00:09:30.194 --> 00:09:32.948
since zero is not
captured in this interval,

00:09:32.948 --> 00:09:36.026
and since the entire
interval is above zero,

00:09:36.026 --> 00:09:38.595
Zero is not captured
here and it's above zero,

00:09:38.595 --> 00:09:40.544
it seems that this group right over here,

00:09:40.544 --> 00:09:42.347
this group of friends at Khan Academy,

00:09:42.347 --> 00:09:45.209
can snap faster with their dominant hands.


Example constructing a t interval for a mean

WEBVTT
Kind: captions
Language: en

00:00:00.400 --> 00:00:02.396
- [Instructor] A nutritionist
wants to estimate

00:00:02.396 --> 00:00:04.017
the average caloric content

00:00:04.017 --> 00:00:06.509
of the burritos at a popular restaurant.

00:00:06.509 --> 00:00:09.364
They obtain a random sample of 14 burritos

00:00:09.364 --> 00:00:11.517
and measure their caloric content.

00:00:11.517 --> 00:00:13.865
Their sample data are roughly symmetric

00:00:13.865 --> 00:00:15.877
with a mean of 700 calories

00:00:15.877 --> 00:00:18.617
and a standard deviation of 50 calories.

00:00:18.617 --> 00:00:19.905
Based on this sample,

00:00:19.905 --> 00:00:23.626
which of the following is
a 95% confidence interval

00:00:23.626 --> 00:00:27.724
for the mean caloric
content of these burritos?

00:00:27.724 --> 00:00:31.767
So, pause this video and see
if you can figure it out.

00:00:31.767 --> 00:00:33.044
All right, what's going on here?

00:00:33.044 --> 00:00:35.956
So, there's a population of burritos here.

00:00:35.956 --> 00:00:39.156
There is a mean caloric
content that the nutritionist

00:00:39.156 --> 00:00:41.030
wants to figure out but doesn't know

00:00:41.030 --> 00:00:44.398
the true population parameter
here, the population mean

00:00:44.398 --> 00:00:48.286
and so, the take a sample of 14 burritos

00:00:48.286 --> 00:00:50.800
and they calculate some sample statistics.

00:00:50.800 --> 00:00:52.707
They calculate the sample mean

00:00:52.707 --> 00:00:54.581
which is 700,

00:00:54.581 --> 00:00:57.809
they also calculate the
sample standard deviation

00:00:57.809 --> 00:01:00.009
which is equal to 50

00:01:00.009 --> 00:01:01.691
and they want to use this data

00:01:01.691 --> 00:01:04.992
to construct a 95% confidence interval

00:01:04.992 --> 00:01:06.753
and so, our confidence
interval is going to take

00:01:06.753 --> 00:01:09.137
the form and we've seen this before,

00:01:09.137 --> 00:01:13.250
our sample mean plus or
minus our critical value

00:01:13.250 --> 00:01:16.167
times the sample standard deviation

00:01:17.455 --> 00:01:20.286
divided by the square root of N.

00:01:20.286 --> 00:01:22.098
The reason why we're using a T statistic

00:01:22.098 --> 00:01:23.042
is because we don't know

00:01:23.042 --> 00:01:25.349
the actual standard
deviation for the population.

00:01:25.349 --> 00:01:27.553
If we knew the standard
deviation for the population,

00:01:27.553 --> 00:01:30.685
we would use that instead of
our sample standard deviation

00:01:30.685 --> 00:01:33.039
and if we use that, if we use sigma

00:01:33.039 --> 00:01:34.553
which is a population parameter

00:01:34.553 --> 00:01:37.924
then we could use a Z
statistic right over here,

00:01:37.924 --> 00:01:39.406
we would use a Z distribution

00:01:39.406 --> 00:01:42.146
but since we're using this
sample standard deviation,

00:01:42.146 --> 00:01:44.414
that's why we're using a T statistic

00:01:44.414 --> 00:01:45.306
but now let's do that.

00:01:45.306 --> 00:01:46.765
So, what is this going to be?

00:01:46.765 --> 00:01:49.641
So, our sample mean is 700,

00:01:49.641 --> 00:01:52.403
they tell us that, so it's going to be 700

00:01:52.403 --> 00:01:53.570
plus or minus,

00:01:55.427 --> 00:01:57.650
so what would be our critical value

00:01:57.650 --> 00:02:00.215
for a 95% confidence interval?

00:02:00.215 --> 00:02:03.049
Well, we will just get out our T table

00:02:03.049 --> 00:02:04.253
and with the T table, remember,

00:02:04.253 --> 00:02:06.380
you have to care about degrees of freedom

00:02:06.380 --> 00:02:09.388
and if our sample size is 14,

00:02:09.388 --> 00:02:11.748
then that means you take 14 minus one,

00:02:11.748 --> 00:02:14.608
so degrees of freedom is N minus one,

00:02:14.608 --> 00:02:16.276
so that's gonna be 14 minus one

00:02:16.276 --> 00:02:17.881
is equal to 13.

00:02:17.881 --> 00:02:20.050
So, we have 13 degrees of freedom

00:02:20.050 --> 00:02:20.911
that we have to keep in mind

00:02:20.911 --> 00:02:22.408
when we look at our T table,

00:02:22.408 --> 00:02:23.731
so let's look at our T table,

00:02:23.731 --> 00:02:25.946
so 95% confidence interval

00:02:25.946 --> 00:02:28.113
and 13 degrees of freedom,

00:02:29.747 --> 00:02:31.858
so degrees of freedom right over here,

00:02:31.858 --> 00:02:35.296
so we have 13 degrees of freedom,

00:02:35.296 --> 00:02:38.213
so that is this row right over here

00:02:39.387 --> 00:02:42.970
and if we want a 95% confidence level,

00:02:44.124 --> 00:02:46.290
then that means our tail probability,

00:02:46.290 --> 00:02:48.851
remember, if our distribution,

00:02:48.851 --> 00:02:50.180
let me see, I'll draw it really small,

00:02:50.180 --> 00:02:53.112
a little small distribution
right over here,

00:02:53.112 --> 00:02:57.366
so if you want 95% of
the area in the middle,

00:02:57.366 --> 00:03:00.198
that means you have five
percent not shaded in

00:03:00.198 --> 00:03:01.854
and that's evenly divided on each side,

00:03:01.854 --> 00:03:03.645
so that means you have
two and a half percent

00:03:03.645 --> 00:03:06.828
at the tails, two and a half percent,

00:03:06.828 --> 00:03:07.936
so what you want to look for

00:03:07.936 --> 00:03:10.348
is the tail probability
of two and a half percent.

00:03:10.348 --> 00:03:13.910
So, that is this right over here, .025,

00:03:13.910 --> 00:03:14.952
that two and a half percent

00:03:14.952 --> 00:03:15.857
and so, there you go,

00:03:15.857 --> 00:03:18.690
that is our critical value, 2.160.

00:03:20.940 --> 00:03:23.440
So, this part right over here,

00:03:25.586 --> 00:03:27.806
so this is going to be two,

00:03:27.806 --> 00:03:30.271
let me do that in a darker color,

00:03:30.271 --> 00:03:32.354
this is going to be 2.160

00:03:33.207 --> 00:03:35.620
times what's our sample
standard deviation?

00:03:35.620 --> 00:03:38.453
It's 50 over the square root of N,

00:03:39.482 --> 00:03:40.982
square root of 14,

00:03:42.303 --> 00:03:44.899
so all of our choices have the 700 there,

00:03:44.899 --> 00:03:46.438
so we just need to figure out

00:03:46.438 --> 00:03:48.955
what our margin of error, this part of it

00:03:48.955 --> 00:03:51.891
and we could use a calculator for that.

00:03:51.891 --> 00:03:54.974
Okay, 2.16, ic an write a zero there,

00:03:56.798 --> 00:03:58.153
it doesn't really matter,

00:03:58.153 --> 00:03:58.986
times 50

00:04:00.937 --> 00:04:03.687
divided by the square root of 14,

00:04:07.559 --> 00:04:11.726
we get a little bit of a drum
roll here I think, 28.86.

00:04:12.594 --> 00:04:14.996
So, this part right over here

00:04:14.996 --> 00:04:16.913
is approximately 28.86.

00:04:17.813 --> 00:04:19.169
That's our margin of error

00:04:19.169 --> 00:04:21.467
and we see out of all
of these choices here

00:04:21.467 --> 00:04:22.868
if we round to the nearest 10th

00:04:22.868 --> 00:04:24.451
that would be 28.9,

00:04:26.031 --> 00:04:28.448
so this is approximately 28.9

00:04:29.971 --> 00:04:32.390
which is this choice right over here.

00:04:32.390 --> 00:04:33.601
This was an awfully close one.

00:04:33.601 --> 00:04:34.657
I guess they're trying to make sure

00:04:34.657 --> 00:04:37.187
that we're looking at enough digits.

00:04:37.187 --> 00:04:38.180
So, there we have it.

00:04:38.180 --> 00:04:41.679
We have established our
95% confidence interval.

00:04:41.679 --> 00:04:44.493
Now, one thing that we
should keep in mind is

00:04:44.493 --> 00:04:46.831
is this a valid confidence interval?

00:04:46.831 --> 00:04:50.348
Did we meet our conditions for
a valid confidence interval?

00:04:50.348 --> 00:04:52.257
And here we have to think well,

00:04:52.257 --> 00:04:53.745
did we take a random sample

00:04:53.745 --> 00:04:57.725
and they tell us that they
obtained a random sample

00:04:57.725 --> 00:05:00.360
of 14 burritos, so we check that one.

00:05:00.360 --> 00:05:04.313
Is the sampling
distribution roughly normal?

00:05:04.313 --> 00:05:07.627
Well, if you take over 30 samples

00:05:07.627 --> 00:05:11.295
then it would be but here we only took 14

00:05:11.295 --> 00:05:13.616
but they do tell us that the sample data

00:05:13.616 --> 00:05:15.146
is roughly symmetric

00:05:15.146 --> 00:05:16.374
and so, if it's roughly symmetric

00:05:16.374 --> 00:05:18.496
and it has no significant outliers,

00:05:18.496 --> 00:05:20.701
then this is reasonable

00:05:20.701 --> 00:05:21.534
that you can assume

00:05:21.534 --> 00:05:24.108
that it is roughly normal

00:05:24.108 --> 00:05:25.255
and then the last condition

00:05:25.255 --> 00:05:26.871
is the independence condition

00:05:26.871 --> 00:05:30.232
and here if we aren't
sampling with replacement

00:05:30.232 --> 00:05:31.681
and it doesn't look like we are,

00:05:31.681 --> 00:05:32.917
if we're not sampling with replacement,

00:05:32.917 --> 00:05:37.084
this has to be less than 10%
of the population of burritos

00:05:39.427 --> 00:05:41.177
and we're assuming that
there's going to be

00:05:41.177 --> 00:05:43.551
more than 140 burritos

00:05:43.551 --> 00:05:46.468
that this popular restaurant makes.

00:05:47.477 --> 00:05:50.154
So, I think we can meet the
independence condition as well,

00:05:50.154 --> 00:05:53.613
so assuming that you feel
good about constructing

00:05:53.613 --> 00:05:54.629
a confidence interval,

00:05:54.629 --> 00:05:57.235
this is the one that you
would actually construct.


Conditions for valid t intervals

WEBVTT
Kind: captions
Language: en

00:00:00.396 --> 00:00:02.536
- [Instructor] Flavia wanted
to estimate the mean age

00:00:02.536 --> 00:00:05.230
of the faculty members
at her large university.

00:00:05.230 --> 00:00:08.631
She took an SRS, or simple random sample,

00:00:08.631 --> 00:00:12.499
of 20 of the approximately
700 faculty members,

00:00:12.499 --> 00:00:15.869
and each faculty member in
the sample provided Flavia

00:00:15.869 --> 00:00:16.896
with their age.

00:00:16.896 --> 00:00:19.996
The data were skewed to the
right with a sample mean

00:00:19.996 --> 00:00:20.829
of 38.75.

00:00:22.835 --> 00:00:24.661
She's considering using her data

00:00:24.661 --> 00:00:27.392
to make a confidence interval
to estimate the mean age

00:00:27.392 --> 00:00:29.452
of faculty members at her university.

00:00:29.452 --> 00:00:33.206
Which conditions for
constructing a t interval

00:00:33.206 --> 00:00:34.809
have been met?

00:00:34.809 --> 00:00:37.035
So pause this video and
see if you can answer this

00:00:37.035 --> 00:00:38.679
on your own.

00:00:38.679 --> 00:00:42.221
Okay, now let's try to
answer this together.

00:00:42.221 --> 00:00:46.023
So there's 700 faculty members over here.

00:00:46.023 --> 00:00:49.749
She's trying to estimate the
population mean, the mean age.

00:00:49.749 --> 00:00:53.049
She can't talk to all 700,
so she takes a sample,

00:00:53.049 --> 00:00:57.216
a simple random sample of 20,
so the n is equal to 20 here.

00:00:58.254 --> 00:01:02.421
From this 20, she calculates
a sample mean of 38.75.

00:01:04.066 --> 00:01:06.997
Now ideally, she wants to
construct a t interval,

00:01:06.997 --> 00:01:09.174
a confidence interval,
using the t statistic

00:01:09.174 --> 00:01:12.243
and so that interval would
look something like this.

00:01:12.243 --> 00:01:16.410
It would be the sample mean
plus or minus the critical value

00:01:17.307 --> 00:01:20.224
times the sample standard deviation

00:01:21.166 --> 00:01:23.954
divided by the square root of n.

00:01:23.954 --> 00:01:27.111
And we use a t statistic
like this and a t table

00:01:27.111 --> 00:01:29.825
and a t distribution when
we are trying to create

00:01:29.825 --> 00:01:34.364
confidence intervals for means
where we don't have access

00:01:34.364 --> 00:01:38.005
to the standard deviation of
the sampling distribution,

00:01:38.005 --> 00:01:41.715
but we can compute the
sample standard deviation.

00:01:41.715 --> 00:01:44.118
Now in order for this to hold
true, there's three conditions

00:01:44.118 --> 00:01:46.624
just like what we saw when
we thought about z intervals.

00:01:46.624 --> 00:01:50.124
The first is is that our sample is random.

00:01:51.171 --> 00:01:52.406
Well, they tell us that here

00:01:52.406 --> 00:01:54.863
that she took a simple
random sample of 20,

00:01:54.863 --> 00:01:57.736
and so we know that we are
meeting that constraint,

00:01:57.736 --> 00:01:58.894
and that's actually choice A,

00:01:58.894 --> 00:02:01.736
the data is a random sample
from the population of interest,

00:02:01.736 --> 00:02:04.008
so we can circle that in.

00:02:04.008 --> 00:02:07.572
So the next condition
is the normal condition.

00:02:07.572 --> 00:02:10.804
Now the normal condition
when we're doing a t interval

00:02:10.804 --> 00:02:13.825
is a little bit more involved
because we do need to assume

00:02:13.825 --> 00:02:16.847
that the sampling distribution
of the sample means

00:02:16.847 --> 00:02:18.928
is roughly normal.

00:02:18.928 --> 00:02:20.999
Now there's a couple of
ways that we can get there.

00:02:20.999 --> 00:02:25.792
Either our sample size is
greater than or equal to 30.

00:02:25.792 --> 00:02:27.501
The central limit theorem tells us

00:02:27.501 --> 00:02:29.145
that then our sampling distribution,

00:02:29.145 --> 00:02:32.210
regardless of what the
distribution is in the population,

00:02:32.210 --> 00:02:34.911
that the sampling distribution
actually would then be

00:02:34.911 --> 00:02:36.807
approximately normal.

00:02:36.807 --> 00:02:39.413
She didn't mean that
constraint right over here.

00:02:39.413 --> 00:02:41.525
Here, her sample size is only 20,

00:02:41.525 --> 00:02:43.836
so so far this isn't looking good.

00:02:43.836 --> 00:02:46.481
Now that's not the only way
to meet the normal condition.

00:02:46.481 --> 00:02:49.132
Another way to meet the normal condition,

00:02:49.132 --> 00:02:52.346
if we have a smaller
sample size smaller than 30

00:02:52.346 --> 00:02:57.124
is one, if the original
distribution of ages is normal,

00:02:57.124 --> 00:02:59.791
so original distribution normal,

00:03:03.162 --> 00:03:06.398
or even if it's roughly
symmetric around the mean,

00:03:06.398 --> 00:03:08.648
so approximately symmetric,

00:03:10.462 --> 00:03:11.632
but if look at it, this,

00:03:11.632 --> 00:03:14.135
they tell us that it has right skew.

00:03:14.135 --> 00:03:17.061
They say the data were skewed to the right

00:03:17.061 --> 00:03:20.115
with the sample mean of 38.75.

00:03:20.115 --> 00:03:22.424
So that tells us that the data set

00:03:22.424 --> 00:03:25.963
that we're getting in our
sample is not symmetric,

00:03:25.963 --> 00:03:29.456
and the original distribution
is unlikely to be normal.

00:03:29.456 --> 00:03:30.421
Think about it.

00:03:30.421 --> 00:03:32.889
It's not going to be, you're
likely to have people who are,

00:03:32.889 --> 00:03:35.116
you could have faculty
members who are 30 years older

00:03:35.116 --> 00:03:37.114
than this, 68 and three quarters,

00:03:37.114 --> 00:03:39.082
but you're very unlikely
to have faculty members

00:03:39.082 --> 00:03:40.694
who are 30 years younger than this,

00:03:40.694 --> 00:03:44.293
and that's actually what's
causing that skew to the right.

00:03:44.293 --> 00:03:47.144
So this one does not meet
the normal condition.

00:03:47.144 --> 00:03:49.712
We can't feel good that
our sampling distribution

00:03:49.712 --> 00:03:51.811
of the sample means is going to be normal,

00:03:51.811 --> 00:03:54.055
so I'm not gonna fill that one in.

00:03:54.055 --> 00:03:56.897
Choice C: Individual
observations can be considered

00:03:56.897 --> 00:03:57.988
independent.

00:03:57.988 --> 00:03:59.916
So there's two ways to
meet this constraint.

00:03:59.916 --> 00:04:02.583
One is is if we sample with replacement.

00:04:02.583 --> 00:04:04.656
Every faculty member we look at after

00:04:04.656 --> 00:04:06.557
asking them their age, we say,

00:04:06.557 --> 00:04:08.584
"Hey, go back into the pool
and we might pick 'em again

00:04:08.584 --> 00:04:10.533
"until we get our sample of 20."

00:04:10.533 --> 00:04:12.823
It does not look like she did that.

00:04:12.823 --> 00:04:15.111
It doesn't look like she
sampled with replacement,

00:04:15.111 --> 00:04:17.622
and so even if you're
sampling without replacement,

00:04:17.622 --> 00:04:22.159
the 10% rule says that, "Look,
as long as this is less than

00:04:22.159 --> 00:04:26.122
"10% or less than or equal
to 10% of the population,

00:04:26.122 --> 00:04:29.163
"then we're good," and
the 10% of this population

00:04:29.163 --> 00:04:33.732
is 70; 70 is 10% of 700,
and so this is definitely

00:04:33.732 --> 00:04:37.926
less than or equal to 10%,
and so it can be considered

00:04:37.926 --> 00:04:41.644
independent, and so we can
actually meet that constraint

00:04:41.644 --> 00:04:42.835
as well.

00:04:42.835 --> 00:04:46.020
So the main issue where our t
interval might not be so good

00:04:46.020 --> 00:04:47.969
is that our sampling distribution,

00:04:47.969 --> 00:04:52.136
we can't feel so confidant that
that is going to be normal.


Example finding critical t value

WEBVTT
Kind: captions
Language: en

00:00:00.326 --> 00:00:02.705
- [Instructor] We are asked,
what is the critical value

00:00:02.705 --> 00:00:05.733
t star or t asterisk for constructing

00:00:05.733 --> 00:00:09.137
a 98% confidence interval for a mean

00:00:09.137 --> 00:00:13.304
from a sample size of n is
equal to 15 observations?

00:00:14.205 --> 00:00:16.521
So just as a reminder
of what's going on here,

00:00:16.521 --> 00:00:19.630
you have some population,
there's a parameter here,

00:00:19.630 --> 00:00:21.368
let's say it's the population mean,

00:00:21.368 --> 00:00:25.046
we do not know what this
is so we take a sample.

00:00:25.046 --> 00:00:27.716
Here, we're gonna take a sample of 15.

00:00:27.716 --> 00:00:29.850
So n is equal to 15.

00:00:29.850 --> 00:00:33.078
And from that sample, we
can calculate a sample mean.

00:00:33.078 --> 00:00:36.310
But we also wanna construct
a 98% confidence interval

00:00:36.310 --> 00:00:37.874
about that sample mean.

00:00:37.874 --> 00:00:39.968
So we're gonna go take that sample mean

00:00:39.968 --> 00:00:42.731
and we're gonna go plus or
minus some margin of error.

00:00:42.731 --> 00:00:44.437
Now in other videos, we have talked about

00:00:44.437 --> 00:00:46.488
that we wanna use the t distribution here

00:00:46.488 --> 00:00:50.057
because we don't want to
underestimate the margin of error.

00:00:50.057 --> 00:00:51.885
So it's going to be t star

00:00:51.885 --> 00:00:55.360
times the sample standard deviation

00:00:55.360 --> 00:00:58.639
divided by the square
root of our sample size

00:00:58.639 --> 00:01:00.845
which in this case was going to be 15,

00:01:00.845 --> 00:01:02.165
so square root of n.

00:01:02.165 --> 00:01:03.881
But what they're asking us is well

00:01:03.881 --> 00:01:05.669
what is the appropriate critical value?

00:01:05.669 --> 00:01:10.036
What is the t star that we
should use in this situation?

00:01:10.036 --> 00:01:12.232
And so we're about to look at a,

00:01:12.232 --> 00:01:15.291
as you would call it, a t
table instead of a z table.

00:01:15.291 --> 00:01:16.821
But the key thing to realize

00:01:16.821 --> 00:01:19.639
is there's one extra variable
to take into consideration

00:01:19.639 --> 00:01:22.716
when we're looking up the
appropriate critical value

00:01:22.716 --> 00:01:27.479
on a t table and that's this
notion of degree of freedom.

00:01:27.479 --> 00:01:29.592
Sometimes it's abbreviated df.

00:01:29.592 --> 00:01:31.983
And I'm not gonna go in
depth on degrees of freedom.

00:01:31.983 --> 00:01:34.793
It's actually a pretty deep concept.

00:01:34.793 --> 00:01:36.111
But it's this idea that you actually have

00:01:36.111 --> 00:01:37.800
a different t distribution

00:01:37.800 --> 00:01:40.714
depending on the different sample sizes.

00:01:40.714 --> 00:01:42.623
Depending on the degrees of freedom.

00:01:42.623 --> 00:01:45.041
And your degree of freedom is going to be

00:01:45.041 --> 00:01:47.195
your sample size minus one.

00:01:47.195 --> 00:01:49.116
So in this situation,
our degree of freedom

00:01:49.116 --> 00:01:51.758
is going to be 15 minus one.

00:01:51.758 --> 00:01:54.175
So in this situation,
our degree of freedom

00:01:54.175 --> 00:01:55.972
is going to be equal to 14.

00:01:55.972 --> 00:01:58.469
And this isn't the first
time that we have seen this.

00:01:58.469 --> 00:02:00.259
We talked a little bit
about degrees of freedom

00:02:00.259 --> 00:02:03.461
when we first talked about
sample standard deviations

00:02:03.461 --> 00:02:04.973
and how to have an unbiased estimate

00:02:04.973 --> 00:02:07.077
for the population standard deviation.

00:02:07.077 --> 00:02:08.345
And in future videos, we're going

00:02:08.345 --> 00:02:11.088
to more advanced conversations
about degrees of freedom.

00:02:11.088 --> 00:02:13.283
But for the purposes of this example,

00:02:13.283 --> 00:02:17.274
you need to know that when
you're look at the t distribution

00:02:17.274 --> 00:02:18.990
for a given degree of freedom,

00:02:18.990 --> 00:02:21.053
your degree of freedom is
based on this sample size,

00:02:21.053 --> 00:02:22.829
and it's going to be your
sample size minus one

00:02:22.829 --> 00:02:24.609
when we're thinking about
a confidence interval

00:02:24.609 --> 00:02:26.548
for your mean.

00:02:26.548 --> 00:02:28.722
So now let's look at the t table.

00:02:28.722 --> 00:02:32.437
So we want a 98% confidence interval

00:02:32.437 --> 00:02:35.604
and we want a degree of freedom of 14.

00:02:36.657 --> 00:02:39.541
So let's get our t table out

00:02:39.541 --> 00:02:41.391
and I actually copy and
pasted this bottom part,

00:02:41.391 --> 00:02:43.421
moved it up so you can
see the whole thing here.

00:02:43.421 --> 00:02:45.565
And what's useful about this t table is

00:02:45.565 --> 00:02:48.032
they actually give our confidence
levels right over here.

00:02:48.032 --> 00:02:50.339
So if you want a confidence level of 98%,

00:02:50.339 --> 00:02:52.735
you're going to look at this column,

00:02:52.735 --> 00:02:55.561
you're gonna look at this
column right over here.

00:02:55.561 --> 00:02:59.015
Another way of thinking about
a confidence level of 98%,

00:02:59.015 --> 00:03:02.686
if you have a confidence level of 98%,

00:03:02.686 --> 00:03:05.591
that means you're leaving 1%

00:03:05.591 --> 00:03:08.802
unfilled in at either end of the tail

00:03:08.802 --> 00:03:10.964
and so if you're looking
at your t distribution

00:03:10.964 --> 00:03:14.012
everything up to including that top 1%,

00:03:14.012 --> 00:03:17.762
you would look for a
tail probability of 0.01

00:03:19.294 --> 00:03:21.489
which is, you can't see
it right over there,

00:03:21.489 --> 00:03:22.909
let me do it in a slightly brighter color,

00:03:22.909 --> 00:03:25.796
which would be that tail
probability to the right.

00:03:25.796 --> 00:03:27.677
But either way, we're in
this column right over here,

00:03:27.677 --> 00:03:29.526
we have a confidence level of 98%.

00:03:29.526 --> 00:03:33.109
And remember, our degree
of freedom here is

00:03:34.565 --> 00:03:38.303
we have 14 degrees of freedom and so,

00:03:38.303 --> 00:03:41.928
we'll look at this row right over here,

00:03:41.928 --> 00:03:43.260
and so there you have it,

00:03:43.260 --> 00:03:46.260
this is our critical t value, 2.624.

00:03:48.531 --> 00:03:50.948
Let's just go back over here.

00:03:52.078 --> 00:03:56.245
And so there you have it,
we have 2.624 is our answer.


Simulation showing value of t statistic

WEBVTT
Kind: captions
Language: en

00:00:00.339 --> 00:00:02.768
- In a previous video
we talked about trying

00:00:02.768 --> 00:00:06.328
to estimate a population
mean with a sample mean

00:00:06.328 --> 00:00:08.716
and then constructing
a confidence interval

00:00:08.716 --> 00:00:10.304
about that sample mean.

00:00:10.304 --> 00:00:12.154
And we talked about different scenarios.

00:00:12.154 --> 00:00:15.610
We could use a Z table plus the true

00:00:15.610 --> 00:00:18.558
population standard deviation,

00:00:18.558 --> 00:00:20.138
and that actually would construct

00:00:20.138 --> 00:00:22.141
pretty valid confidence intervals,

00:00:22.141 --> 00:00:23.172
but the problem is you don't know

00:00:23.172 --> 00:00:25.358
the population standard deviation.

00:00:25.358 --> 00:00:27.932
And so you might try to us a Z table

00:00:27.932 --> 00:00:29.505
to find your critical values

00:00:29.505 --> 00:00:31.685
plus the sample standard deviation,

00:00:31.685 --> 00:00:33.971
but what we talked about
is this doesn't actually

00:00:33.971 --> 00:00:37.001
do a good job of calculating
our confidence intervals,

00:00:37.001 --> 00:00:39.621
and we're gonna see that
experimentally in a few seconds.

00:00:39.621 --> 00:00:42.620
And so instead we have
something called a t-statistic

00:00:42.620 --> 00:00:44.563
where if we want our critical
value we use a t-table

00:00:44.563 --> 00:00:46.421
instead of a z-table.

00:00:46.421 --> 00:00:48.592
And then we use that in conjunction

00:00:48.592 --> 00:00:50.937
with our sample standard deviation,

00:00:50.937 --> 00:00:53.666
and then all of a sudden
we are actually going

00:00:53.666 --> 00:00:56.321
to have pretty good confidence intervals.

00:00:56.321 --> 00:00:58.341
To make this a little bit more real,

00:00:58.341 --> 00:01:01.044
let's look at a simulation.

00:01:01.044 --> 00:01:03.289
So this is a scratch pad on Khan Academy,

00:01:03.289 --> 00:01:06.399
made by Khan Academy user Charlotte Allen.

00:01:06.399 --> 00:01:08.159
And the whole point there is to see what

00:01:08.159 --> 00:01:09.806
our confidence intervals look like

00:01:09.806 --> 00:01:11.435
with these different scenarios.

00:01:11.435 --> 00:01:15.195
So let's say we have a true
population mean of 2.0,

00:01:15.195 --> 00:01:17.875
let's say it the average number,

00:01:17.875 --> 00:01:20.463
the mean number of
apples people eat a day.

00:01:20.463 --> 00:01:22.498
The true population mean
is two, that seems high,

00:01:22.498 --> 00:01:23.889
but maybe it's in a certain country

00:01:23.889 --> 00:01:25.064
that has a lot of apples.

00:01:25.064 --> 00:01:26.789
And let's say that we
know that the population

00:01:26.789 --> 00:01:29.474
standard deviation is 0.5.

00:01:29.474 --> 00:01:31.650
And we're going to create
confidence intervals with

00:01:31.650 --> 00:01:34.170
a goal of having a 95
percent confidence level,

00:01:34.170 --> 00:01:37.187
and we're gonna take sample sizes of 12.

00:01:37.187 --> 00:01:39.505
So first, we can construct
our confidence intervals

00:01:39.505 --> 00:01:43.483
using z and sigma, which is
a legitimate way to do it.

00:01:43.483 --> 00:01:47.432
And so let's just draw
a bunch of samples here.

00:01:47.432 --> 00:01:49.344
And so we do see that it looks like

00:01:49.344 --> 00:01:51.681
it is roughly 95 percent.

00:01:51.681 --> 00:01:54.098
When we keep making these
samples, and constructing

00:01:54.098 --> 00:01:56.962
these confidence
intervals, that 95 percent

00:01:56.962 --> 00:01:59.858
of the time these confidence
intervals contain our

00:01:59.858 --> 00:02:01.666
true population mean.

00:02:01.666 --> 00:02:04.392
So these look like a good
confidence intervals,

00:02:04.392 --> 00:02:06.622
but what we've talked
about is normally when your

00:02:06.622 --> 00:02:08.234
doing this type of thing,

00:02:08.234 --> 00:02:09.865
this type of inferential statistics,

00:02:09.865 --> 00:02:12.311
you don't know the population
standard deviation.

00:02:12.311 --> 00:02:16.027
You don't know sigma. So
instead, you might be tempted to

00:02:16.027 --> 00:02:19.800
use z with our sample standard deviations.

00:02:19.800 --> 00:02:22.503
But if you look at that for
these exact same samples

00:02:22.503 --> 00:02:25.081
we just calculated,
notice, now when we did it

00:02:25.081 --> 00:02:28.777
over and over again,
we've done this 625 times,

00:02:28.777 --> 00:02:31.108
in this scenario, where
we keep calculating the

00:02:31.108 --> 00:02:35.682
confidence intervals with z
and s, the true population

00:02:35.682 --> 00:02:37.737
mean is contained in the intervals

00:02:37.737 --> 00:02:40.335
only 92.2 percent of the the time.

00:02:40.335 --> 00:02:41.905
Now we could keep going.

00:02:41.905 --> 00:02:44.684
So we have a much lower
hit rate than we would

00:02:44.684 --> 00:02:47.689
hope to have if we were
actually using z and sigma.

00:02:47.689 --> 00:02:50.580
Now what's neat is, if
we use t, use a t-table,

00:02:50.580 --> 00:02:53.454
notice, this is getting much
closer, and this is neat!

00:02:53.454 --> 00:02:56.281
Because with a t-table, and
something we can actually

00:02:56.281 --> 00:02:58.795
get from the sample, the
sample standard deviation,

00:02:58.795 --> 00:03:00.677
we're actually able to have a pretty close

00:03:00.677 --> 00:03:02.452
hit rate to what we would have

00:03:02.452 --> 00:03:06.481
if we actually knew the
population standard deviation.

00:03:06.481 --> 00:03:09.631
So that's the value of t and t-statistics,

00:03:09.631 --> 00:03:11.519
and we're going to give
more and more examples,

00:03:11.519 --> 00:03:13.836
including using a
t-table in future videos.


Introduction to t statistics

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:01.695
- [Instructor] We have
already seen a situation

00:00:01.695 --> 00:00:05.517
multiple times where there
is some parameter associated

00:00:05.517 --> 00:00:07.625
with a population, maybe
it's the proportion of a

00:00:07.625 --> 00:00:09.884
population that supports
a candidate, maybe it's

00:00:09.884 --> 00:00:11.350
the mean of a population.

00:00:11.350 --> 00:00:13.358
The mean height of all
the people in the city.

00:00:13.358 --> 00:00:15.423
And we've determined
that's it's unpractical or

00:00:15.423 --> 00:00:18.202
there's no way for us to know
the true population parameter.

00:00:18.202 --> 00:00:21.460
But, we can try to estimate
it by taking a sample size.

00:00:21.460 --> 00:00:25.627
So, we take n samples and
then we calculate a statistic

00:00:26.573 --> 00:00:28.071
based on that.

00:00:28.071 --> 00:00:30.476
We've also seen that, not
only can we calculate the

00:00:30.476 --> 00:00:33.276
statistic, which is trying
to estimate this parameter,

00:00:33.276 --> 00:00:36.453
but we can construct a
confidence interval about that

00:00:36.453 --> 00:00:39.541
statistic based on some confidence level.

00:00:39.541 --> 00:00:43.718
And so, that confidence
interval would look something

00:00:43.718 --> 00:00:44.620
like this.

00:00:44.620 --> 00:00:47.666
It would be the value of the
statistic that we have just

00:00:47.666 --> 00:00:51.055
calculated plus or minus
some margin of error.

00:00:51.055 --> 00:00:55.488
And so, we'll often say this
critical value, z, and this

00:00:55.488 --> 00:00:57.886
will be based on the number
of standard deviations we want

00:00:57.886 --> 00:00:59.763
to go above and below that statistic.

00:00:59.763 --> 00:01:02.484
And so, then we'll multiply
that times the standard

00:01:02.484 --> 00:01:06.651
deviation of the sampling
distribution for that statistic.

00:01:08.543 --> 00:01:11.413
Now, what we'll see is
we often don't know this.

00:01:11.413 --> 00:01:13.164
To know this, you
oftentimes even need to know

00:01:13.164 --> 00:01:14.380
this parameter.

00:01:14.380 --> 00:01:17.095
For example, in the situation
where the parameter that we're

00:01:17.095 --> 00:01:19.933
trying to estimate and construct
confidence intervals for

00:01:19.933 --> 00:01:22.054
is say, the population proportion.

00:01:22.054 --> 00:01:23.839
What percentage of the
population supports a certain

00:01:23.839 --> 00:01:24.924
candidate?

00:01:24.924 --> 00:01:27.730
Well, in that world, the statistic
is the sample proportion.

00:01:27.730 --> 00:01:31.854
So, we would have the sample
proportion plus or minus

00:01:31.854 --> 00:01:35.903
z star times, well we can't calculate this

00:01:35.903 --> 00:01:38.428
unless we know the population proportion,

00:01:38.428 --> 00:01:41.335
so instead we estimate this
with the standard error

00:01:41.335 --> 00:01:43.793
of the statistic, which, in this case,

00:01:43.793 --> 00:01:47.053
is p hat times one minus p hat.

00:01:47.053 --> 00:01:50.069
The sample proportion times
one minus the sample proportion

00:01:50.069 --> 00:01:52.425
over our sample size.

00:01:52.425 --> 00:01:55.012
If the parameter we're trying
to estimate is the population

00:01:55.012 --> 00:01:58.155
mean, then our statistic is
going to be the sample mean.

00:01:58.155 --> 00:02:01.544
So, in that scenario we're
going to be looking at,

00:02:01.544 --> 00:02:05.711
our statistic is our sample
mean plus or minus z star.

00:02:07.139 --> 00:02:10.969
Now, if we knew the standard
deviation of this population,

00:02:10.969 --> 00:02:13.570
we would know what the standard
deviation of the sampling

00:02:13.570 --> 00:02:15.784
distribution of our statistic is.

00:02:15.784 --> 00:02:18.708
It would be equal to the
standard deviation of our

00:02:18.708 --> 00:02:22.875
population times the square
root of our sample size.

00:02:23.993 --> 00:02:26.041
But, we often will not know this.

00:02:26.041 --> 00:02:28.692
In fact, it's very unusual to know this.

00:02:28.692 --> 00:02:31.365
And so, sometimes, you'll say,
okay, if we don't know this,

00:02:31.365 --> 00:02:34.372
let's just figure out the
sample standard deviation of our

00:02:34.372 --> 00:02:35.730
sample here.

00:02:35.730 --> 00:02:39.369
So, instead, we'll say, okay,
let's take our sample mean

00:02:39.369 --> 00:02:41.036
plus or minus z star

00:02:42.111 --> 00:02:45.028
times the sample standard deviation

00:02:45.911 --> 00:02:48.323
of our sample, which we can
calculate, divided by the

00:02:48.323 --> 00:02:50.105
square root of n.

00:02:50.105 --> 00:02:53.081
Now, this might seem pretty
good if we're trying to

00:02:53.081 --> 00:02:57.652
construct a confidence
interval for our sample,

00:02:57.652 --> 00:03:02.518
for our mean, but, it
turns out, that this is not

00:03:02.518 --> 00:03:06.995
not so good because it turns
out that this right over here

00:03:06.995 --> 00:03:10.740
is going to actually
underestimate the actual interval,

00:03:10.740 --> 00:03:14.409
the true margin of error you
need for your confidence level.

00:03:14.409 --> 00:03:17.480
And so, that's why statisticians
have invented another

00:03:17.480 --> 00:03:18.355
statistic.

00:03:18.355 --> 00:03:20.824
Instead of using z, they call
it t and instead of using

00:03:20.824 --> 00:03:23.794
a z-table, they use a t-table.

00:03:23.794 --> 00:03:25.988
Now, we're going to see
this in future videos.

00:03:25.988 --> 00:03:28.838
And so, if you are actually
trying to construct a confidence

00:03:28.838 --> 00:03:31.088
interval for a sample mean,

00:03:32.141 --> 00:03:34.730
and you don't know the true
standard deviation of your

00:03:34.730 --> 00:03:36.626
population, which is normally the case,

00:03:36.626 --> 00:03:40.012
instead of doing this, what
we're going to do is we're going

00:03:40.012 --> 00:03:43.739
to take our sample mean, plus
or minus, and our critical

00:03:43.739 --> 00:03:48.233
value, we'll call that t star
times our sample standard

00:03:48.233 --> 00:03:50.742
deviation, which we can
calculate, divided by the

00:03:50.742 --> 00:03:52.050
square root of n.

00:03:52.050 --> 00:03:54.480
And so, the real, functional
difference is that this

00:03:54.480 --> 00:03:58.144
actually is going to give us
the confidence interval that

00:03:58.144 --> 00:04:00.652
actually has the level of
confidence that we want.

00:04:00.652 --> 00:04:05.346
If we want a 95% level of
confidence, if we keep computing

00:04:05.346 --> 00:04:09.104
this over and over again
for multiple samples,

00:04:09.104 --> 00:04:13.954
that roughly 95% of the time,
this interval will contain

00:04:13.954 --> 00:04:16.037
our true population mean.

00:04:17.153 --> 00:04:19.256
And, to functionally do it,
and we'll do it in future

00:04:19.256 --> 00:04:22.732
videos, you really just have
to look up a t-table instead

00:04:22.732 --> 00:04:23.815
of a z-table.


Determining sample size based on confidence and margin of error

WEBVTT
Kind: captions
Language: en

00:00:00.473 --> 00:00:01.867
- [Instructor] We're
told Della wants to make

00:00:01.867 --> 00:00:05.675
a one-sample z interval to
estimate what proportion

00:00:05.675 --> 00:00:08.809
of her community members
favor a tax increase

00:00:08.809 --> 00:00:11.062
for more local school funding.

00:00:11.062 --> 00:00:14.266
She wants her margin
of error to be no more

00:00:14.266 --> 00:00:16.820
than plus or minus 2%

00:00:16.820 --> 00:00:19.978
at the 95% confidence level.

00:00:19.978 --> 00:00:22.486
What is the smallest sample size required

00:00:22.486 --> 00:00:25.481
to obtain the desired margin of error?

00:00:25.481 --> 00:00:27.571
So let's just remind
ourselves what the confidence

00:00:27.571 --> 00:00:29.568
interval will look like
and what part of it

00:00:29.568 --> 00:00:30.868
is the margin of error,

00:00:30.868 --> 00:00:33.515
and then we can think about
what is her sample size

00:00:33.515 --> 00:00:35.094
that she would need.

00:00:35.094 --> 00:00:38.949
So she wants to estimate the
true population proportion

00:00:38.949 --> 00:00:40.783
that favor a tax increase.

00:00:40.783 --> 00:00:42.200
She doesn't know what this is,

00:00:42.200 --> 00:00:45.265
so she's going to take
a sample size of size n,

00:00:45.265 --> 00:00:46.797
and in fact this question is all about

00:00:46.797 --> 00:00:48.933
what n does she need in order to have

00:00:48.933 --> 00:00:51.418
the desired margin of error.

00:00:51.418 --> 00:00:53.461
Well whatever sample she takes there,

00:00:53.461 --> 00:00:56.689
she's going to calculate
a sample proportion.

00:00:56.689 --> 00:00:58.686
And then the confidence
interval that she's going

00:00:58.686 --> 00:01:01.147
to construct is going to
be that sample proportion

00:01:01.147 --> 00:01:04.189
plus or minus critical value,

00:01:04.189 --> 00:01:07.695
and this critical value is
based on the confidence level.

00:01:07.695 --> 00:01:09.321
We'll talk about that in a second.

00:01:09.321 --> 00:01:12.153
What z star, what critical
value would correspond

00:01:12.153 --> 00:01:14.429
to a 95% confidence level,

00:01:14.429 --> 00:01:18.725
times and then you would
have times the standard error

00:01:18.725 --> 00:01:20.698
of her statistic.

00:01:20.698 --> 00:01:22.904
And so in this case it
would be the square root,

00:01:22.904 --> 00:01:26.201
it would be the standard error
of her sample proportion,

00:01:26.201 --> 00:01:28.779
which is the sample
proportion times one minus

00:01:28.779 --> 00:01:33.493
the sample proportion, all
of that over her sample size.

00:01:33.493 --> 00:01:38.137
Now she wants the margin of
error to be no more than 2%.

00:01:38.137 --> 00:01:41.480
So the margin of error is
this part right over here.

00:01:41.480 --> 00:01:42.780
So this part right over there,

00:01:42.780 --> 00:01:45.335
she wants to be no more than 2%,

00:01:45.335 --> 00:01:47.657
has to be less than or equal to 2%,

00:01:47.657 --> 00:01:50.768
that green color is kind of too shocking.

00:01:50.768 --> 00:01:52.719
It's unpleasant, all right. (laughing)

00:01:52.719 --> 00:01:55.644
Less than or equal to 2% right over here.

00:01:55.644 --> 00:01:58.013
So how do we figure that out?

00:01:58.013 --> 00:01:59.870
Well the first thing let's
just make sure we incorporate

00:01:59.870 --> 00:02:02.750
the 95% confidence level.

00:02:02.750 --> 00:02:04.677
So we could look at a z-table.

00:02:04.677 --> 00:02:06.604
Remember 95% confidence level,

00:02:06.604 --> 00:02:09.785
that means if we have a
normal distribution here,

00:02:09.785 --> 00:02:12.966
if we have a normal distribution here,

00:02:12.966 --> 00:02:15.799
95% confidence level means

00:02:15.799 --> 00:02:18.168
the number of standard
deviations we need to go

00:02:18.168 --> 00:02:22.162
above and beyond this
in order to capture 95%

00:02:22.162 --> 00:02:24.460
of the area right over here.

00:02:24.460 --> 00:02:27.641
So this would be 2.5% that
is unshaded at the top

00:02:27.641 --> 00:02:30.776
right over there, and
then this would be 2.5%

00:02:30.776 --> 00:02:31.728
right over here.

00:02:31.728 --> 00:02:33.400
And we could look up in a z-table,

00:02:33.400 --> 00:02:34.700
and if you were to look up in a z-table,

00:02:34.700 --> 00:02:36.535
you would not look up 95%.

00:02:36.535 --> 00:02:39.530
You would look up the
percentage that would leave 2.5%

00:02:39.530 --> 00:02:41.086
unshaded at the top.

00:02:41.086 --> 00:02:44.383
So you would actually look up 97.5%.

00:02:44.383 --> 00:02:47.100
But it's good to know
in general that at a 95%

00:02:47.100 --> 00:02:48.632
confidence level,

00:02:48.632 --> 00:02:51.883
you're looking at a
critical value of 1.96.

00:02:51.883 --> 00:02:53.091
And that's just something good to know.

00:02:53.091 --> 00:02:55.482
We could of course look
it up on a z-table.

00:02:55.482 --> 00:02:56.815
So this is 1.96.

00:02:58.152 --> 00:03:01.914
And so this is going to
be 1.96 right over here.

00:03:01.914 --> 00:03:03.191
But what about p hat?

00:03:03.191 --> 00:03:05.304
We don't know what p
hat is until we actually

00:03:05.304 --> 00:03:07.115
take the sample, but
this whole question is,

00:03:07.115 --> 00:03:09.600
how large of a sample should we take.

00:03:09.600 --> 00:03:12.642
Well remember we want
this stuff right over here

00:03:12.642 --> 00:03:15.985
that I'm now circling or
squaring in this less,

00:03:15.985 --> 00:03:20.002
less bright color,
(laughing) this blue color.

00:03:20.002 --> 00:03:22.673
We want this thing to be
less than or equal to 2%.

00:03:22.673 --> 00:03:24.066
This is our margin of error.

00:03:24.066 --> 00:03:25.668
And so what we could do is we could pick

00:03:25.668 --> 00:03:27.688
a sample proportion,

00:03:27.688 --> 00:03:29.290
we don't know if that's
what it's going to be,

00:03:29.290 --> 00:03:32.170
that maximizes this right over here.

00:03:32.170 --> 00:03:34.143
Because if we maximize this,

00:03:34.143 --> 00:03:36.605
we know that we're
essentially figuring out

00:03:36.605 --> 00:03:39.229
the largest thing that
this could end up being,

00:03:39.229 --> 00:03:41.458
and then we'll be safe.

00:03:41.458 --> 00:03:43.756
So the p hat, the maximum p hat,

00:03:43.756 --> 00:03:47.923
and so if you wanna maximize
p hat times one minus p hat,

00:03:48.818 --> 00:03:50.792
you could do some trial and error here.

00:03:50.792 --> 00:03:53.021
This is a fairly simple quadratic.

00:03:53.021 --> 00:03:55.506
It's actually going to be p hat

00:03:55.506 --> 00:03:58.826
is 0.5, and I wanna be, I
wanna emphasize we don't know.

00:03:58.826 --> 00:04:01.659
She didn't even perform the sample yet.

00:04:01.659 --> 00:04:02.983
She didn't even take the random sample

00:04:02.983 --> 00:04:04.585
and calculate the sample proportion,

00:04:04.585 --> 00:04:06.419
but we wanna figure out what n to take,

00:04:06.419 --> 00:04:08.045
and so to be safe she says okay,

00:04:08.045 --> 00:04:11.644
well what sample proportion would maximize

00:04:11.644 --> 00:04:13.315
my margin of error?

00:04:13.315 --> 00:04:15.150
And so let me just
assume that and then let

00:04:15.150 --> 00:04:16.520
me calculate n.

00:04:16.520 --> 00:04:18.702
So let me set up an inequality here.

00:04:18.702 --> 00:04:21.559
We want 1.96, that's our critical value,

00:04:21.559 --> 00:04:23.857
times the square root of,

00:04:23.857 --> 00:04:27.503
we're just going to assume
0.5 for our sample proportion,

00:04:27.503 --> 00:04:29.802
although of course we
don't know what it is yet

00:04:29.802 --> 00:04:32.193
until we actually take the sample.

00:04:32.193 --> 00:04:33.517
So that's our sample proportion.

00:04:33.517 --> 00:04:35.583
That's one minus our sample proportion.

00:04:35.583 --> 00:04:40.158
All of that over n needs to
be less than or equal to 2%.

00:04:40.158 --> 00:04:44.105
We don't want our margin of
error to be any larger than 2%.

00:04:44.105 --> 00:04:48.238
Let me just write this as a decimal, 0.02.

00:04:48.238 --> 00:04:50.142
And now we just have to
do a little bit of algebra

00:04:50.142 --> 00:04:52.023
to calculate this.

00:04:52.023 --> 00:04:54.275
So let's see how we could do this.

00:04:54.275 --> 00:04:56.876
So this could be rewritten as,

00:04:56.876 --> 00:05:00.293
we could divide both sides by 1.96, 1.96.

00:05:02.333 --> 00:05:03.500
One over 1.96.

00:05:06.002 --> 00:05:08.300
And so this would be equal to,

00:05:08.300 --> 00:05:10.344
on the left-hand side
we'd have the square root

00:05:10.344 --> 00:05:11.574
of all of this,

00:05:11.574 --> 00:05:13.153
but that's the same thing
as the square root of

00:05:13.153 --> 00:05:16.729
0.5 times 0.5 so that would just be 0.5

00:05:16.729 --> 00:05:18.819
over the square root of n

00:05:18.819 --> 00:05:21.582
needs to be less than or equal to,

00:05:21.582 --> 00:05:22.720
actually let me write it this way.

00:05:22.720 --> 00:05:25.437
This is the same thing as two over 100.

00:05:25.437 --> 00:05:28.362
So two over 100 times one over 1.96

00:05:28.362 --> 00:05:32.279
needs to be less than or
equal to two over 196.

00:05:33.982 --> 00:05:35.212
Let me scroll down a little bit.

00:05:35.212 --> 00:05:36.884
This is fancier algebra than we typically

00:05:36.884 --> 00:05:38.138
do in statistics,

00:05:38.138 --> 00:05:40.808
or at least in introductory
statistics class.

00:05:40.808 --> 00:05:43.084
All right so let's see we
could take the reciprocal

00:05:43.084 --> 00:05:44.129
of both sides.

00:05:44.129 --> 00:05:47.588
We could say the square
root of n over 0.5,

00:05:47.588 --> 00:05:49.005
and 196 over two.

00:05:50.909 --> 00:05:53.533
Now let's see what's 196 divided by two?

00:05:53.533 --> 00:05:55.450
That is going to be 98.

00:05:56.319 --> 00:05:57.986
So this would be 98.

00:05:59.291 --> 00:06:01.706
And so if we take the
reciprocal of both sides,

00:06:01.706 --> 00:06:03.123
then you're gonna swap the inequality.

00:06:03.123 --> 00:06:05.003
So it's gonna be greater than or equal to.

00:06:05.003 --> 00:06:08.486
Let's see I could multiply
both sides of this by 0.5.

00:06:08.486 --> 00:06:09.319
So 0.5,

00:06:11.087 --> 00:06:15.708
that's why I said 0.5 but
my fingers wrote down 0.4.

00:06:15.708 --> 00:06:16.875
Let's see 0.5.

00:06:18.076 --> 00:06:20.329
And so there we get

00:06:20.329 --> 00:06:22.465
the square root of n needs to be

00:06:22.465 --> 00:06:24.798
greater than or equal to 49,

00:06:26.041 --> 00:06:30.661
or n needs to be greater
than or equal to 49 squared.

00:06:30.661 --> 00:06:33.239
And what's 49 squared?

00:06:33.239 --> 00:06:35.236
Well you know 50 squared is 2,500,

00:06:35.236 --> 00:06:36.536
so you know it's going
to be close to that,

00:06:36.536 --> 00:06:38.324
so you can already make
a pretty good estimate

00:06:38.324 --> 00:06:39.717
that it's going to be D.

00:06:39.717 --> 00:06:41.621
But if you wanna multiply it out we can.

00:06:41.621 --> 00:06:44.501
49 times 49, nine times nine is 81.

00:06:44.501 --> 00:06:47.751
Nine times four is 36 plus eight is 44.

00:06:48.796 --> 00:06:51.258
Four times nine, 36.

00:06:51.258 --> 00:06:54.601
Four times four is 16 plus three,

00:06:54.601 --> 00:06:55.518
we have 19.

00:06:56.366 --> 00:06:58.177
And then you add all of that together,

00:06:58.177 --> 00:07:00.522
and you indeed do get,

00:07:00.522 --> 00:07:03.355
so that's 10, and so this is a 14.

00:07:05.933 --> 00:07:07.933
You do indeed get 2,401.

00:07:09.230 --> 00:07:12.527
So that's the minimum sample
size that Della should take

00:07:12.527 --> 00:07:16.080
if she genuinely wanted
her margin of error

00:07:16.080 --> 00:07:18.448
to be no more than 2%.

00:07:18.448 --> 00:07:20.190
Now it might turn out
that her margin of error

00:07:20.190 --> 00:07:24.416
when she actually takes
the sample of size 2,401,

00:07:24.416 --> 00:07:28.201
if her sample proportion is less than 0.5

00:07:28.201 --> 00:07:30.314
or greater than 0.5,

00:07:30.314 --> 00:07:32.891
well then she's going to
be in a situation where

00:07:32.891 --> 00:07:35.097
her margin of error
might be less than this.

00:07:35.097 --> 00:07:37.280
But she just wanted to
be no more than that.

00:07:37.280 --> 00:07:39.555
Another important thing to appreciate is,

00:07:39.555 --> 00:07:42.086
it just the math all worked
out very nicely just now,

00:07:42.086 --> 00:07:45.848
where I got our n to be
actually a whole number.

00:07:45.848 --> 00:07:47.598
But if I got 2,401.5,

00:07:49.888 --> 00:07:52.140
then you would have to round
up to the nearest whole number

00:07:52.140 --> 00:07:54.787
because you can't have a your sample size

00:07:54.787 --> 00:07:57.365
is always going to be
a whole number value.

00:07:57.365 --> 00:07:59.532
So I will leave you there.


Example constructing and interpreting a confidence interval for p

WEBVTT
Kind: captions
Language: en

00:00:00.497 --> 00:00:02.099
- [Instructor] We're told
that Della has over 500 songs

00:00:02.099 --> 00:00:03.399
on her mobile phone,

00:00:03.399 --> 00:00:05.535
and she wants to estimate

00:00:05.535 --> 00:00:09.854
what proportion of the songs
are by a female artist.

00:00:09.854 --> 00:00:12.292
She takes a simple random sample,

00:00:12.292 --> 00:00:15.520
that's what SRS stands for,
of 50 songs on her phone

00:00:15.520 --> 00:00:18.562
and finds that 20 of the songs sampled

00:00:18.562 --> 00:00:20.605
are by a female artist.

00:00:20.605 --> 00:00:22.602
Based on this sample,

00:00:22.602 --> 00:00:25.806
which of the following is a 99%

00:00:25.806 --> 00:00:27.966
confidence interval for the proportion

00:00:27.966 --> 00:00:31.193
of songs on her phone that
are by a female artist?

00:00:31.193 --> 00:00:33.051
So like always pause this video and see

00:00:33.051 --> 00:00:35.698
if you can figure it out on your own.

00:00:35.698 --> 00:00:40.087
Della has a library of
500 songs right over here.

00:00:40.087 --> 00:00:41.898
And she's trying to
figure out the proportion

00:00:41.898 --> 00:00:43.871
that are sung by a female artist.

00:00:43.871 --> 00:00:46.402
She doesn't have the time
to go through all 500 songs

00:00:46.402 --> 00:00:49.676
to figure out the true
population proportion, p.

00:00:49.676 --> 00:00:53.159
So instead she takes a sample of 50 songs,

00:00:53.159 --> 00:00:55.063
n is equal to 50,

00:00:55.063 --> 00:00:58.036
and from that she calculates
a sample proportion,

00:00:58.036 --> 00:01:00.079
which we could denote with p hat.

00:01:00.079 --> 00:01:02.680
And she finds that 20 out of the 50

00:01:02.680 --> 00:01:04.375
are sung by a female,

00:01:04.375 --> 00:01:08.949
20 out of the 50 which
is the same thing as 0.4.

00:01:08.949 --> 00:01:13.500
And then she wants to construct
a 99% confidence interval.

00:01:13.500 --> 00:01:15.474
So before we even go about constructing

00:01:15.474 --> 00:01:16.867
the confidence interval,

00:01:16.867 --> 00:01:19.421
you wanna check to make
sure that we're making

00:01:19.421 --> 00:01:22.417
some valid assumptions or
using a valid technique.

00:01:22.417 --> 00:01:25.319
So before we actually calculate
the confidence interval,

00:01:25.319 --> 00:01:28.314
let's just make sure that
our sampling distribution

00:01:28.314 --> 00:01:30.520
is not distorted in some way,

00:01:30.520 --> 00:01:32.448
and so that we can with confidence

00:01:32.448 --> 00:01:34.328
make a confidence interval.

00:01:34.328 --> 00:01:37.115
So the first condition is to
make sure that your sample

00:01:37.115 --> 00:01:39.274
is truly random.

00:01:39.274 --> 00:01:41.411
And they tell us that it's
a simple random sample,

00:01:41.411 --> 00:01:43.849
so we'll take their word for it.

00:01:43.849 --> 00:01:47.355
The next condition is to assume that

00:01:47.355 --> 00:01:50.768
your sampling distribution
of the sample proportions

00:01:50.768 --> 00:01:53.229
is approximately normal.

00:01:53.229 --> 00:01:56.155
And there you wanna be
confident or you wanna see

00:01:56.155 --> 00:01:59.661
that in your sample you
have at least 10 successes

00:01:59.661 --> 00:02:01.728
and at least 10 failures.

00:02:01.728 --> 00:02:03.864
Well here we have 20 successes which means

00:02:03.864 --> 00:02:06.395
well 50 minus 20, we have 30 failures.

00:02:06.395 --> 00:02:08.137
So both of those are more than 10,

00:02:08.137 --> 00:02:10.505
and so meets that condition.

00:02:10.505 --> 00:02:12.734
And then the last condition is,

00:02:12.734 --> 00:02:15.799
sometimes called the independence test

00:02:15.799 --> 00:02:18.934
or the independence rule or the 10% rule.

00:02:18.934 --> 00:02:22.371
If you were doing this
sample with replacement,

00:02:22.371 --> 00:02:24.089
so if she were to look at one song,

00:02:24.089 --> 00:02:27.177
test whether it's a female
or not and then put it back

00:02:27.177 --> 00:02:29.406
in her pile and then look at another song,

00:02:29.406 --> 00:02:33.028
then each of those observations
would truly be independent.

00:02:33.028 --> 00:02:34.584
But we don't know that.

00:02:34.584 --> 00:02:36.976
In fact we'll assume that she
didn't do it with replacement.

00:02:36.976 --> 00:02:38.694
And so if you don't do
it with replacement,

00:02:38.694 --> 00:02:41.573
you can assume rough independence for each

00:02:41.573 --> 00:02:44.569
observation of a song
if this is no more than

00:02:44.569 --> 00:02:47.053
10% of the population.

00:02:47.053 --> 00:02:50.072
And so it looks like it is
exactly 10% of the population,

00:02:50.072 --> 00:02:52.626
so Della just squeezes through on our

00:02:52.626 --> 00:02:55.087
independence test right over there.

00:02:55.087 --> 00:02:57.363
So that out of the way
let's just think about

00:02:57.363 --> 00:02:58.803
what the confidence
interval's going to be.

00:02:58.803 --> 00:03:01.218
Well it's going to be her

00:03:01.218 --> 00:03:04.190
sample proportion plus or minus,

00:03:04.190 --> 00:03:06.163
there's going to be some critical value,

00:03:06.163 --> 00:03:08.787
and this critical value
is going to be dictated by

00:03:08.787 --> 00:03:10.714
our confidence level we wanna have,

00:03:10.714 --> 00:03:13.083
and then that critical value times

00:03:13.083 --> 00:03:15.707
the standard deviation of
the sampling distribution

00:03:15.707 --> 00:03:18.098
of the sample proportions
which we don't know.

00:03:18.098 --> 00:03:19.724
And so instead of having that,

00:03:19.724 --> 00:03:23.787
we use the standard error
of the sample proportion.

00:03:23.787 --> 00:03:26.086
And in this case it would be p hat

00:03:26.086 --> 00:03:28.431
times one minus p hat

00:03:28.431 --> 00:03:31.218
all of that over n our sample size,

00:03:31.218 --> 00:03:33.400
all of that over 50.

00:03:33.400 --> 00:03:35.072
So what's this going to be?

00:03:35.072 --> 00:03:37.417
We're gonna get p hat, our
sample proportion here,

00:03:37.417 --> 00:03:39.167
is 0.4 plus or minus,

00:03:40.227 --> 00:03:43.408
I'll save the z star
here, our critical value

00:03:43.408 --> 00:03:45.312
for a little bit.

00:03:45.312 --> 00:03:46.938
We're gonna use a z-table for that.

00:03:46.938 --> 00:03:49.399
And so we're gonna have
0.4 right over there,

00:03:49.399 --> 00:03:52.325
one minus 0.4 is times 0.6

00:03:52.325 --> 00:03:53.992
all of that over 50.

00:03:54.925 --> 00:03:56.272
So we can already look at some choices

00:03:56.272 --> 00:03:57.967
that look interesting here.

00:03:57.967 --> 00:04:01.241
This choice and this choice
both look interesting,

00:04:01.241 --> 00:04:03.284
and the main thing we
have to reason through

00:04:03.284 --> 00:04:05.699
is which one has a correct critical value.

00:04:05.699 --> 00:04:09.461
Do we wanna go 1.96 standard
errors above and below

00:04:09.461 --> 00:04:10.993
our sample proportion?

00:04:10.993 --> 00:04:14.453
Or do we wanna go 2.576 standard errors

00:04:14.453 --> 00:04:17.449
above and below our sample proportion?

00:04:17.449 --> 00:04:21.117
And the key is the 99% confidence level.

00:04:21.117 --> 00:04:23.672
Now if we have a 99% confidence level,

00:04:23.672 --> 00:04:26.528
one way to think about it is,

00:04:26.528 --> 00:04:28.780
so let me just do my best shot at drawing

00:04:28.780 --> 00:04:31.030
a normal distribution here.

00:04:32.634 --> 00:04:36.280
And so if you want a 99% confidence level,

00:04:36.280 --> 00:04:39.159
that means you wanna contain the 99%,

00:04:39.159 --> 00:04:43.919
the middle 99%, under the curve
right over here, that area.

00:04:43.919 --> 00:04:45.940
And so if this is 99%,

00:04:45.940 --> 00:04:49.330
then this right over
here is going to be 0.5%,

00:04:49.330 --> 00:04:52.697
and this right over here is 0.5%.

00:04:52.697 --> 00:04:56.864
We want the z value that's
going to leave 0.5% above it.

00:04:57.967 --> 00:05:02.426
And so that's actually going to be 99.5%

00:05:02.426 --> 00:05:04.724
is what we wanna look up on the table.

00:05:04.724 --> 00:05:06.559
And that's because many z-tables,

00:05:06.559 --> 00:05:08.184
including the one that
you might see on something

00:05:08.184 --> 00:05:10.065
like an AP Stats exam,

00:05:10.065 --> 00:05:14.430
they will have the area
up to and including,

00:05:14.430 --> 00:05:17.635
up to and including, a certain value.

00:05:17.635 --> 00:05:20.235
And so they're not going to
leave this free right over here.

00:05:20.235 --> 00:05:24.624
So let's just look up
99.5% on our z-table.

00:05:24.624 --> 00:05:28.307
All right, so let me move
this down so you can see it.

00:05:28.307 --> 00:05:30.095
All right that's our z-table.

00:05:30.095 --> 00:05:34.274
Let's see we're at 99.
okay it's gonna be right

00:05:34.274 --> 00:05:36.875
in this area right over here.

00:05:36.875 --> 00:05:38.458
And so that is 2.5,

00:05:40.892 --> 00:05:42.225
looks like 2.57,

00:05:43.585 --> 00:05:44.418
or 2.5,

00:05:46.279 --> 00:05:47.696
2.58 around that.

00:05:49.878 --> 00:05:53.378
And so this right over here is about 2.57,

00:05:54.661 --> 00:05:56.960
it's between 2.57 and 2.58,

00:05:56.960 --> 00:05:59.723
which gives us enough information
to answer this question.

00:05:59.723 --> 00:06:02.324
It's definitely not going to
be this one right over here.

00:06:02.324 --> 00:06:06.491
We have 2.576, which is
indeed between 2.57 and 2.58.

00:06:08.547 --> 00:06:09.917
So let's remind ourselves,

00:06:09.917 --> 00:06:12.169
we've been able to construct
our confidence interval

00:06:12.169 --> 00:06:13.818
right over here.

00:06:13.818 --> 00:06:16.720
But what does that actually mean?

00:06:16.720 --> 00:06:19.158
That means that if we were
to repeatedly take samples

00:06:19.158 --> 00:06:22.293
of size 50 and repeatedly use

00:06:22.293 --> 00:06:25.730
this technique to construct
confidence intervals,

00:06:25.730 --> 00:06:28.121
that roughly 99%

00:06:28.121 --> 00:06:30.583
of those intervals constructed this way

00:06:30.583 --> 00:06:34.526
are going to contain our
true population parameter.


Sample statistic bias worked example

WEBVTT
Kind: captions
Language: en

00:00:00.146 --> 00:00:02.124
- [Instructor] We're told
Alejandro was curious

00:00:02.124 --> 00:00:05.174
if sample median was an unbiased estimator

00:00:05.174 --> 00:00:07.225
of population median.

00:00:07.225 --> 00:00:11.422
He placed ping pong balls
numbered from zero to 32

00:00:11.422 --> 00:00:13.828
so I guess that would be
what, 33 ping pong balls

00:00:13.828 --> 00:00:15.485
in a drum and mixed them well.

00:00:15.485 --> 00:00:18.826
Note that the median of the
population is 16, alright?

00:00:18.826 --> 00:00:22.401
The median number of course
yes in that population is 16.

00:00:22.401 --> 00:00:25.165
He then took a random sample of five balls

00:00:25.165 --> 00:00:27.594
and calculated the median of the sample.

00:00:27.594 --> 00:00:29.545
So we have this population of balls.

00:00:29.545 --> 00:00:32.886
He takes a, we know the
population parameter.

00:00:32.886 --> 00:00:36.219
We know that the population median is 16

00:00:37.509 --> 00:00:40.341
but then he starts taking
a sample of five balls

00:00:40.341 --> 00:00:44.624
so n equals five and he
calculates a sample median,

00:00:44.624 --> 00:00:45.791
sample median,

00:00:47.320 --> 00:00:50.721
and then he replaced the balls
and repeated this process

00:00:50.721 --> 00:00:52.804
for a total of 50 trials.

00:00:54.024 --> 00:00:57.456
His results are summarized
in the dot plot below

00:00:57.456 --> 00:01:00.870
where each dot represents
the sample median

00:01:00.870 --> 00:01:02.627
from a sample of five balls.

00:01:02.627 --> 00:01:04.557
So he does this, he
takes these five balls,

00:01:04.557 --> 00:01:06.458
puts them back in then he does it again

00:01:06.458 --> 00:01:08.348
then he does it again and
every time he calculates

00:01:08.348 --> 00:01:10.439
the sample median for that sample

00:01:10.439 --> 00:01:12.323
and he plots that on the dot plot so,

00:01:12.323 --> 00:01:15.285
and he will do this for 50 samples

00:01:15.285 --> 00:01:18.617
and each dot here represents
that sample statistic

00:01:18.617 --> 00:01:21.798
so it shows that four times
we got a sample median,

00:01:21.798 --> 00:01:26.216
in four of those 50 samples,
we got a sample median of 20.

00:01:26.216 --> 00:01:29.662
In five of those sample medians,

00:01:29.662 --> 00:01:32.636
we got a sample median of 10

00:01:32.636 --> 00:01:35.398
and so what he ends up
creating with these dots

00:01:35.398 --> 00:01:39.594
is really an approximation
of the sampling distribution

00:01:39.594 --> 00:01:41.515
of the sample medians.

00:01:41.515 --> 00:01:44.919
Now, to judge whether it is a
biased or unbiased estimator

00:01:44.919 --> 00:01:46.829
for the population median,

00:01:46.829 --> 00:01:48.129
well, actually, pause the video,

00:01:48.129 --> 00:01:49.804
see if you can figure that out.

00:01:49.804 --> 00:01:50.751
Alright, now let's do this together.

00:01:50.751 --> 00:01:51.739
Now, to judge it,

00:01:51.739 --> 00:01:54.039
let's think about where the
true population parameter is,

00:01:54.039 --> 00:01:54.978
the population median.

00:01:54.978 --> 00:01:58.259
It's 16, we know that and
so that is right over here,

00:01:58.259 --> 00:02:00.249
the true population parameter.

00:02:00.249 --> 00:02:02.778
So if we were dealing with a biased,

00:02:02.778 --> 00:02:05.938
a biased estimator for
the population parameter

00:02:05.938 --> 00:02:07.380
then as we get that,

00:02:07.380 --> 00:02:09.293
our approximation of the
sampling distribution,

00:02:09.293 --> 00:02:11.354
we would expect it to be somewhat skewed.

00:02:11.354 --> 00:02:13.052
So for example, if the sampling,

00:02:13.052 --> 00:02:15.116
if this approximation of
the sampling distribution

00:02:15.116 --> 00:02:16.501
looked something like that then we'd say,

00:02:16.501 --> 00:02:18.534
okay, that looks like a biased estimator

00:02:18.534 --> 00:02:20.505
or if it was looking something like that,

00:02:20.505 --> 00:02:23.077
we'd say, okay, that looks
like a biased estimator

00:02:23.077 --> 00:02:25.718
but if this approximation
for our sampling distribution

00:02:25.718 --> 00:02:27.474
that Alejandro was constructing

00:02:27.474 --> 00:02:30.066
where we see that roughly
the same proportion

00:02:30.066 --> 00:02:32.430
of the sample statistics came out below

00:02:32.430 --> 00:02:35.581
as came out above the true parameter

00:02:35.581 --> 00:02:37.197
and it doesn't have to be exact

00:02:37.197 --> 00:02:41.411
but it seems roughly the case,
this seems pretty unbiased

00:02:41.411 --> 00:02:44.033
and so to answer the question
based on these results,

00:02:44.033 --> 00:02:46.361
it does appear that the sample median

00:02:46.361 --> 00:02:50.407
is an unbiased estimator
of the population median.


Critical value (z*) for a given confidence level

WEBVTT
Kind: captions
Language: en

00:00:00.845 --> 00:00:02.494
- [Instructor] We're told
that Elena wants to build

00:00:02.494 --> 00:00:05.953
a one-sample z interval to
estimate what proportion

00:00:05.953 --> 00:00:09.831
of computers produced at a
factory have a certain defect.

00:00:09.831 --> 00:00:14.011
She chooses a confidence level of 94%.

00:00:14.011 --> 00:00:16.751
A random sample of 200
computers shows that

00:00:16.751 --> 00:00:18.933
12 computers have the defect.

00:00:18.933 --> 00:00:23.206
What critical value z
star should Elena use

00:00:23.206 --> 00:00:25.992
to construct this confidence interval?

00:00:25.992 --> 00:00:27.943
So before I even ask
you to pause this video,

00:00:27.943 --> 00:00:29.661
let me just give you a
little reminder of what

00:00:29.661 --> 00:00:31.379
a critical value is.

00:00:31.379 --> 00:00:34.375
Remember, the whole point
behind confidence intervals are

00:00:34.375 --> 00:00:37.393
we have some true population parameter,

00:00:37.393 --> 00:00:40.296
in this case it is the
proportion of computers

00:00:40.296 --> 00:00:41.898
that have a defect.

00:00:41.898 --> 00:00:44.359
So there's some true
population proportion.

00:00:44.359 --> 00:00:46.611
We don't know what that is,
but we try to estimate it.

00:00:46.611 --> 00:00:49.026
We take a sample, in
this case it's a sample,

00:00:49.026 --> 00:00:51.070
a random sample of 200 computers,

00:00:51.070 --> 00:00:52.579
we take a random sample,

00:00:52.579 --> 00:00:54.181
and then we estimate this by calculating

00:00:54.181 --> 00:00:56.014
the sample proportion.

00:00:57.107 --> 00:01:00.265
But then we also wanna
construct a confidence interval.

00:01:00.265 --> 00:01:01.472
And remember a confidence interval,

00:01:01.472 --> 00:01:04.816
at a 94% confidence level means

00:01:04.816 --> 00:01:07.068
that if we were to keep doing this,

00:01:07.068 --> 00:01:09.297
and if we were to keep
creating intervals around

00:01:09.297 --> 00:01:12.293
these statistics, so maybe
that's the confidence

00:01:12.293 --> 00:01:13.825
interval around that one,

00:01:13.825 --> 00:01:15.427
maybe if we were to do it again,

00:01:15.427 --> 00:01:17.842
that's the confidence
interval around that one,

00:01:17.842 --> 00:01:22.695
that 94% that roughly as
I keep doing this over

00:01:22.695 --> 00:01:23.717
and over again,

00:01:23.717 --> 00:01:26.527
that 90, that roughly
94% of these intervals

00:01:26.527 --> 00:01:31.449
are going to overlap with our
true population parameter.

00:01:31.449 --> 00:01:34.328
And the way that we do this
is we take the statistic.

00:01:34.328 --> 00:01:36.070
Let me just write this in general form,

00:01:36.070 --> 00:01:37.742
even if we're not talking
about a proportion.

00:01:37.742 --> 00:01:42.386
It could be if we're trying to
estimate the population mean.

00:01:42.386 --> 00:01:45.386
So we take our statistic, statistic,

00:01:47.959 --> 00:01:50.397
and then we go plus or
minus around that statistic,

00:01:50.397 --> 00:01:52.742
plus or minus around that statistic,

00:01:52.742 --> 00:01:55.366
and then we say okay how
many standard deviations

00:01:55.366 --> 00:01:58.291
for the sampling
distribution do we wanna go

00:01:58.291 --> 00:01:59.801
above or beyond?

00:01:59.801 --> 00:02:01.705
So the number of standard
deviations we wanna go,

00:02:01.705 --> 00:02:03.771
that is our critical value,

00:02:03.771 --> 00:02:06.024
and then we multiply
that times the standard

00:02:06.024 --> 00:02:07.024
deviation of

00:02:09.274 --> 00:02:10.784
the statistic,

00:02:10.784 --> 00:02:12.293
of the statistic.

00:02:12.293 --> 00:02:15.103
Now in this particular situation,

00:02:15.103 --> 00:02:18.888
our statistic is p hat
from this one sample

00:02:18.888 --> 00:02:20.699
that Elena made.

00:02:20.699 --> 00:02:22.371
So it's that one sample proportion

00:02:22.371 --> 00:02:23.740
that she was able to calculate,

00:02:23.740 --> 00:02:26.782
plus or minus z star, and
we're gonna think about

00:02:26.782 --> 00:02:28.872
which z star because that's
essentially the question,

00:02:28.872 --> 00:02:30.381
the critical value.

00:02:30.381 --> 00:02:32.634
So plus or minus some critical value

00:02:32.634 --> 00:02:35.815
times and what we do
because in order to actually

00:02:35.815 --> 00:02:38.578
calculate the true standard deviation of

00:02:38.578 --> 00:02:42.200
the sampling distribution
of the sample proportions,

00:02:42.200 --> 00:02:43.501
well then you actually have to know

00:02:43.501 --> 00:02:44.662
the population parameter.

00:02:44.662 --> 00:02:45.707
But we don't know that,

00:02:45.707 --> 00:02:48.423
so we multiply that
times the standard error

00:02:48.423 --> 00:02:49.840
of the statistic.

00:02:50.722 --> 00:02:53.392
And we've done this in previous videos.

00:02:53.392 --> 00:02:54.855
But the key question here is,

00:02:54.855 --> 00:02:57.131
what is our z star?

00:02:57.131 --> 00:02:59.058
And what we really
needed to think about is,

00:02:59.058 --> 00:03:03.748
assuming that the sampling
distribution is roughly normal,

00:03:03.748 --> 00:03:06.628
and this is the mean of
it which would actually

00:03:06.628 --> 00:03:08.137
be our true population parameter,

00:03:08.137 --> 00:03:10.343
which we do not know.

00:03:10.343 --> 00:03:12.758
But how many standard
deviations above and below

00:03:12.758 --> 00:03:15.916
the mean in order to capture

00:03:15.916 --> 00:03:18.249
94% of the probability?

00:03:19.259 --> 00:03:21.009
94% of the area.

00:03:21.860 --> 00:03:23.369
So this distance right over here,

00:03:23.369 --> 00:03:25.286
where this is 94%,

00:03:26.272 --> 00:03:28.106
this number of standard deviations,

00:03:28.106 --> 00:03:31.241
that is z star right over here.

00:03:31.241 --> 00:03:33.470
Now all we have to really do is look it up

00:03:33.470 --> 00:03:35.049
on a z-table,

00:03:35.049 --> 00:03:36.512
but even there we have to be careful.

00:03:36.512 --> 00:03:38.532
And you should always
be careful which type

00:03:38.532 --> 00:03:40.529
of z-table you're using or
if you're using a calculator

00:03:40.529 --> 00:03:42.317
function what your
calculator function does.

00:03:42.317 --> 00:03:45.034
Because a lot of z-tables will actually

00:03:45.034 --> 00:03:46.659
do something like this.

00:03:46.659 --> 00:03:48.981
For a given z, they'll say,

00:03:48.981 --> 00:03:51.976
what is the total area going all the way

00:03:51.976 --> 00:03:54.623
from negative infinity up to including

00:03:54.623 --> 00:03:56.956
z standard deviations above,

00:03:57.874 --> 00:03:59.360
above the mean?

00:03:59.360 --> 00:04:00.916
So when you look up a lot of z-tables,

00:04:00.916 --> 00:04:04.585
they will give you, they
will give you this area.

00:04:04.585 --> 00:04:06.512
So one way to think about this,

00:04:06.512 --> 00:04:08.764
we wanna find the critical value,

00:04:08.764 --> 00:04:10.738
we wanna find the z,

00:04:10.738 --> 00:04:13.733
that leaves not 6% unshaded in,

00:04:13.733 --> 00:04:15.846
but leaves 3% unshaded in.

00:04:15.846 --> 00:04:17.147
Where did I get that from?

00:04:17.147 --> 00:04:20.699
Well 100% minus 94% is 6%.

00:04:20.699 --> 00:04:22.348
But remember this is going to be symmetric

00:04:22.348 --> 00:04:23.555
on the left and the right,

00:04:23.555 --> 00:04:25.947
so you're gonna want 3%
not shaded in over here

00:04:25.947 --> 00:04:28.942
and 3% not shaded in over here.

00:04:28.942 --> 00:04:30.986
So when I look at a traditional z-table,

00:04:30.986 --> 00:04:33.819
that is viewing it from
this point of view,

00:04:33.819 --> 00:04:35.235
this cumulative area,

00:04:35.235 --> 00:04:37.696
what I really wanna do is find the z

00:04:37.696 --> 00:04:40.413
that is leaving 3% open over here,

00:04:40.413 --> 00:04:44.580
which would mean the z that
is filling in 97% over here,

00:04:45.707 --> 00:04:47.426
not 94%.

00:04:47.426 --> 00:04:48.981
But if I find this z,

00:04:48.981 --> 00:04:51.001
but if I were to stop it
right over there as well,

00:04:51.001 --> 00:04:53.393
then I would have 3% available there,

00:04:53.393 --> 00:04:55.344
and then the true area
that we're filling in

00:04:55.344 --> 00:04:57.642
would be 94%.

00:04:57.642 --> 00:04:59.175
So that out of the way let's look that up.

00:04:59.175 --> 00:05:03.342
What z gives us fills us,
fills in 97% of the area?

00:05:04.771 --> 00:05:06.837
So I got a z-table.

00:05:06.837 --> 00:05:08.416
This is actually the
one that you would see

00:05:08.416 --> 00:05:10.553
if you were say taking AP Statistics.

00:05:10.553 --> 00:05:14.523
And we would just look up
where do we get to 97%.

00:05:14.523 --> 00:05:16.273
And so it is 97%

00:05:17.913 --> 00:05:20.444
looks like it is right about here.

00:05:20.444 --> 00:05:22.116
That looks like the closest number.

00:05:22.116 --> 00:05:24.624
This is .0006 above it.

00:05:24.624 --> 00:05:26.876
This is only .0001 below it.

00:05:26.876 --> 00:05:28.455
And so this is,

00:05:28.455 --> 00:05:30.870
let's see you would look at the row first.

00:05:30.870 --> 00:05:33.537
If we look at the row it is 1.8,

00:05:34.655 --> 00:05:35.488
1.88

00:05:37.511 --> 00:05:38.344
is our z.

00:05:39.392 --> 00:05:41.551
So going back to

00:05:41.551 --> 00:05:43.107
this right over here,

00:05:43.107 --> 00:05:45.274
if our z is equal to 1.88,

00:05:46.149 --> 00:05:48.232
so this is equal to 1.88,

00:05:49.307 --> 00:05:52.952
then all of this area
up to and including 1.88

00:05:52.952 --> 00:05:54.624
standard deviations above the mean,

00:05:54.624 --> 00:05:56.876
that would be 97%.

00:05:56.876 --> 00:05:59.268
But if you were to go
1.88 standard deviations

00:05:59.268 --> 00:06:01.985
above the mean and 1.88
standard deviations

00:06:01.985 --> 00:06:03.262
below the mean,

00:06:03.262 --> 00:06:05.445
that would leave 3% open on either side,

00:06:05.445 --> 00:06:07.945
and so this would be 94%.

00:06:09.903 --> 00:06:11.853
So this would be 94%.

00:06:11.853 --> 00:06:14.686
But to answer their question
what critical z value

00:06:14.686 --> 00:06:16.312
or what critical value is z star?

00:06:16.312 --> 00:06:19.353
Well this is going to be 1.88,

00:06:19.353 --> 00:06:20.603
and we're done.


Conditions for confidence intervals worked examples

WEBVTT
Kind: captions
Language: en

00:00:00.888 --> 00:00:02.848
- [Instructor] Ali is in
charge of the dinner menu

00:00:02.848 --> 00:00:05.605
for his senior prom, and he
wants to use a one-sample

00:00:05.605 --> 00:00:08.283
Z interval to estimate
what proportion of seniors

00:00:08.283 --> 00:00:11.130
would order a vegetarian option.

00:00:11.130 --> 00:00:14.880
He randomly selects 30
of the 150 total seniors

00:00:14.880 --> 00:00:17.194
and finds that seven of those sampled

00:00:17.194 --> 00:00:19.653
would order the vegetarian option.

00:00:19.653 --> 00:00:22.916
Which conditions for constructing
this confidence interval

00:00:22.916 --> 00:00:25.487
did Ali's sample meet?

00:00:25.487 --> 00:00:27.053
So, pause this video, and you can select

00:00:27.053 --> 00:00:28.659
more than one of these.

00:00:28.659 --> 00:00:31.138
Alright now, let's work
through this together.

00:00:31.138 --> 00:00:32.924
So one thing that you might
be wondering is, well,

00:00:32.924 --> 00:00:36.303
what is a one-sample Z interval?

00:00:36.303 --> 00:00:38.355
Well, you could really interpret
that as he's gonna take

00:00:38.355 --> 00:00:40.949
one sample and then construct
a confidence interval

00:00:40.949 --> 00:00:42.175
based on that.

00:00:42.175 --> 00:00:44.627
The reason why it might
be called a Z interval

00:00:44.627 --> 00:00:48.270
is the whole idea behind a
confidence interval is you're

00:00:48.270 --> 00:00:50.960
going to pick a number of
standard deviations above and

00:00:50.960 --> 00:00:54.362
below the true parameter that
you are actually trying to

00:00:54.362 --> 00:00:57.716
estimate, and then use that
to make your inferences.

00:00:57.716 --> 00:01:00.930
And one way of thinking
about the number of standard

00:01:00.930 --> 00:01:03.405
deviations, people will
often call that a Z score,

00:01:03.405 --> 00:01:06.128
or Z is often used as a variable
for the number of standard

00:01:06.128 --> 00:01:09.045
deviations above or below something.

00:01:09.045 --> 00:01:11.296
So really, he's just trying
to construct a confidence

00:01:11.296 --> 00:01:13.329
interval, but remember,
in order to construct

00:01:13.329 --> 00:01:16.241
a confidence interval, we
have to make some assumptions.

00:01:16.241 --> 00:01:19.391
He's taking, there's 150
students, right over here.

00:01:19.391 --> 00:01:22.741
He's finding it impractical
to survey all 150

00:01:22.741 --> 00:01:26.611
to figure out the true
population proportion.

00:01:26.611 --> 00:01:30.028
So instead, he samples 30 of the seniors.

00:01:31.201 --> 00:01:33.391
So, N is equal to 30.

00:01:33.391 --> 00:01:36.907
And from that, he calculates
a sample proportion.

00:01:36.907 --> 00:01:39.043
Looks like seven out of the 30 are,

00:01:39.043 --> 00:01:42.029
they want the vegetarian option.

00:01:42.029 --> 00:01:45.170
And he's going to determine
some confidence level

00:01:45.170 --> 00:01:47.538
and then construct a confidence interval.

00:01:47.538 --> 00:01:49.651
But remember the conditions
that we've talked about

00:01:49.651 --> 00:01:50.987
in the previous videos.

00:01:50.987 --> 00:01:52.956
The first thing is, we
have to be confident that,

00:01:52.956 --> 00:01:54.901
is this a random sample?

00:01:54.901 --> 00:01:57.294
So that would be the random condition,

00:01:57.294 --> 00:01:59.272
and that's what choice A is telling us.

00:01:59.272 --> 00:02:02.370
The data is a random sample
from the population of interest.

00:02:02.370 --> 00:02:03.372
Do we know that?

00:02:03.372 --> 00:02:05.466
Well, it tells us in the passage here,

00:02:05.466 --> 00:02:08.486
he randomly selects 30
of the total seniors.

00:02:08.486 --> 00:02:10.584
So I guess we'll take their word for it.

00:02:10.584 --> 00:02:13.312
We don't know his methodology
of what he considers random,

00:02:13.312 --> 00:02:15.259
but we'll take their
word for it, that yes,

00:02:15.259 --> 00:02:16.528
this has been met.

00:02:16.528 --> 00:02:19.556
The data is a random sample.

00:02:19.556 --> 00:02:22.432
If it said he sampled
the football team, well,

00:02:22.432 --> 00:02:24.669
that would not have been a random sample.

00:02:24.669 --> 00:02:26.770
The next condition here
looks all mathematical,

00:02:26.770 --> 00:02:29.613
but this is really the normal condition.

00:02:29.613 --> 00:02:32.698
And the idea behind the
normal condition is that,

00:02:32.698 --> 00:02:35.149
in order to construct
these confidence intervals,

00:02:35.149 --> 00:02:36.785
we're assuming that the
sampling distribution

00:02:36.785 --> 00:02:39.650
of the sample proportions
is roughly normal,

00:02:39.650 --> 00:02:43.662
and it is not skewed to the right

00:02:43.662 --> 00:02:46.329
or skewed to the left like this.

00:02:47.236 --> 00:02:51.402
And so, right here it says,
look, the sample size times

00:02:51.402 --> 00:02:53.759
our sample proportion has to
be greater than/equal to 10.

00:02:53.759 --> 00:02:56.569
Or our sample size times one
minus our sample proportion

00:02:56.569 --> 00:02:59.355
has to be greater than/equal to 10.

00:02:59.355 --> 00:03:01.282
Well, another way to think about this is,

00:03:01.282 --> 00:03:04.449
our successes in our sample need to be

00:03:05.688 --> 00:03:10.286
greater than/equal to 10,
and our failures need to be

00:03:10.286 --> 00:03:12.166
greater than/equal to 10.

00:03:12.166 --> 00:03:13.745
Well, how many successes were there?

00:03:13.745 --> 00:03:15.162
There were seven.

00:03:16.459 --> 00:03:19.488
And you could even say,
look, our N is 30 times

00:03:19.488 --> 00:03:21.971
our sample proportion is seven over 30,

00:03:21.971 --> 00:03:23.606
which is going to be seven.

00:03:23.606 --> 00:03:27.027
So our successes is less
than 10, so actually,

00:03:27.027 --> 00:03:29.045
we violate the normal condition.

00:03:29.045 --> 00:03:32.101
Once again, this is a rule of
thumb, but this is telling us

00:03:32.101 --> 00:03:36.854
that our actual sampling
distribution might be skewed.

00:03:36.854 --> 00:03:38.751
Remember, this is just
based on one sample,

00:03:38.751 --> 00:03:40.090
what we're able to figure out.

00:03:40.090 --> 00:03:41.189
This is one sample Z interval.

00:03:41.189 --> 00:03:43.278
We might be wrong, but
we wouldn't feel good

00:03:43.278 --> 00:03:45.129
that we're meeting the
normal condition here,

00:03:45.129 --> 00:03:47.128
so I would rule this one out.

00:03:47.128 --> 00:03:50.659
Individual observations can
be considered independent.

00:03:50.659 --> 00:03:54.826
Well, if he randomly selected
people with replacement,

00:03:55.780 --> 00:03:57.503
then they could be independent.

00:03:57.503 --> 00:03:59.975
Or, if the people he is
selecting, if his sample size

00:03:59.975 --> 00:04:03.217
is less than 10% of the total population,

00:04:03.217 --> 00:04:05.439
then it could be considered independent,

00:04:05.439 --> 00:04:07.678
even though it wouldn't
be perfectly independent.

00:04:07.678 --> 00:04:11.600
But we see here that he
sampled 30 people out of 150.

00:04:11.600 --> 00:04:14.683
So his sample size was 30 out of 150,

00:04:15.576 --> 00:04:17.794
which is the same thing as
one fifth of the population,

00:04:17.794 --> 00:04:20.091
which is the same thing as 20%.

00:04:20.091 --> 00:04:22.664
And since this is greater than 10%,

00:04:22.664 --> 00:04:26.177
we are violating the
independence condition.

00:04:26.177 --> 00:04:28.566
We could have met the
independence condition if he was

00:04:28.566 --> 00:04:32.008
sampling with replacement, which
it doesn't seem like he is,

00:04:32.008 --> 00:04:35.333
or if this thing right over
here was less than 10%.

00:04:35.333 --> 00:04:38.057
But we're not meeting that, so we cannot

00:04:38.057 --> 00:04:40.296
feel good about that constraint.

00:04:40.296 --> 00:04:43.161
And so, since we're not meeting
two of the three constraints

00:04:43.161 --> 00:04:46.540
for, I would say, valid
confidence intervals,

00:04:46.540 --> 00:04:49.044
or confidence intervals we
would feel confident in,

00:04:49.044 --> 00:04:53.211
this is not so good of an
analysis on Ali's part.