Comparing P-values to different significance levels

WEBVTT
Kind: captions
Language: en

00:00:00.200 --> 00:00:01.580
- [Instructor] What we're
going to do in this video

00:00:01.580 --> 00:00:04.420
is talk about significance
levels which are denoted

00:00:04.420 --> 00:00:06.190
by the Greek letter alpha

00:00:06.190 --> 00:00:07.680
and we're gonna talk about two things,

00:00:07.680 --> 00:00:10.410
the different conclusions you might make

00:00:10.410 --> 00:00:13.010
based on the different significance levels

00:00:13.010 --> 00:00:16.010
that you might set and also
why it's important to set

00:00:16.010 --> 00:00:18.330
your significance levels ahead of time,

00:00:18.330 --> 00:00:21.840
before you conduct an experiment
and calculate the p-values,

00:00:21.840 --> 00:00:24.090
for, frankly, ethical purposes.

00:00:24.090 --> 00:00:27.420
So to help us get this,
let's look at a scenario

00:00:27.420 --> 00:00:30.230
right over here which tells us

00:00:30.230 --> 00:00:32.650
Rahim heard that spinning,
rather than flipping,

00:00:32.650 --> 00:00:35.734
a penny raises the probability above 50%

00:00:35.734 --> 00:00:38.410
that the penny lands showing heads.

00:00:38.410 --> 00:00:41.050
That's actually quite
fascinating if that's true.

00:00:41.050 --> 00:00:43.680
He tested this by spinning
10 different pennies

00:00:43.680 --> 00:00:46.700
10 times each, so that would
be a total of a hundred spins.

00:00:46.700 --> 00:00:50.170
His hypotheses were, his
null hypothesis is that

00:00:50.170 --> 00:00:53.010
by spinning, your
proportion doesn't change

00:00:53.010 --> 00:00:55.520
rather versus flipping, it's still 50%

00:00:55.520 --> 00:00:59.170
and his alternative hypothesis
is that by spinning,

00:00:59.170 --> 00:01:02.740
your proportion of heads
is greater than 50%,

00:01:02.740 --> 00:01:05.240
where p is the true proportion of spins

00:01:05.240 --> 00:01:07.730
that a penny would land showing heads.

00:01:07.730 --> 00:01:10.550
In his 100 spins, the penny landed

00:01:10.550 --> 00:01:13.020
showing heads in 59 spins.

00:01:13.020 --> 00:01:15.350
Rahim calculated that the statistic,

00:01:15.350 --> 00:01:17.570
so this is the sample proportion here,

00:01:17.570 --> 00:01:21.330
it's 59 out of a hundred
were heads so that's 0.59

00:01:21.330 --> 00:01:23.410
or 59 hundredths, and he calculated

00:01:23.410 --> 00:01:27.210
had an associated p-value
of approximately 0.036.

00:01:29.087 --> 00:01:33.050
So based on this scenario,
if ahead of time,

00:01:33.050 --> 00:01:37.360
Rahim had set his
significance level at 0.05,

00:01:38.770 --> 00:01:41.330
what conclusions would he now make?

00:01:41.330 --> 00:01:43.820
And while you're pausing
it, think about how

00:01:43.820 --> 00:01:45.710
that may or may not have been different

00:01:45.710 --> 00:01:50.615
if he set his significance
levels ahead of time at 0.01.

00:01:50.615 --> 00:01:53.870
Pause the video and
try to figure that out.

00:01:53.870 --> 00:01:56.070
So let's first of all remind ourselves

00:01:56.070 --> 00:01:58.610
what a p-value even is.

00:01:58.610 --> 00:02:00.570
You could view it as the probability

00:02:00.570 --> 00:02:04.180
of getting a sample
proportion at least this large

00:02:04.180 --> 00:02:07.200
if you assume that the
null hypothesis is true.

00:02:07.200 --> 00:02:09.162
And if that is low enough,

00:02:09.162 --> 00:02:12.120
if it's below some threshold,

00:02:12.120 --> 00:02:13.770
which is our significance level,

00:02:13.770 --> 00:02:16.930
then we will reject the null hypothesis.

00:02:16.930 --> 00:02:19.270
And so in this scenario,

00:02:19.270 --> 00:02:24.270
we do see that 0.036, our p-value
is indeed less than alpha.

00:02:25.570 --> 00:02:27.760
It is indeed less than 0.05

00:02:28.660 --> 00:02:33.660
and because of that, we would
reject the null hypothesis.

00:02:35.290 --> 00:02:38.610
And in everyday language,
rejecting the null hypothesis

00:02:38.610 --> 00:02:42.380
is rejecting the notion that
the true proportion of spins

00:02:42.380 --> 00:02:46.170
that a penny would land
showing heads is 50%.

00:02:46.170 --> 00:02:48.240
And if you reject your null hypothesis,

00:02:48.240 --> 00:02:53.240
you could also say that suggests
our alternative hypothesis

00:02:55.410 --> 00:02:58.060
that the true proportion of spins

00:02:58.060 --> 00:03:02.940
that a penny would land showing
heads is greater than 50%.

00:03:02.940 --> 00:03:04.040
Now what about the situation

00:03:04.040 --> 00:03:06.410
where our significance level was lower?

00:03:06.410 --> 00:03:08.643
Well in this situation, our p-value,

00:03:08.643 --> 00:03:12.240
our probability of getting
that sample statistic

00:03:12.240 --> 00:03:15.480
if we assumed our null
hypothesis were true,

00:03:15.480 --> 00:03:18.110
in this situation, it's
greater than or equal to,

00:03:18.110 --> 00:03:20.650
and it's greater than in
this particular situation,

00:03:20.650 --> 00:03:23.190
than our threshold, than
our significance level.

00:03:23.190 --> 00:03:27.200
And so here, we would say that we fail

00:03:27.200 --> 00:03:32.200
to reject our null hypothesis
so we're failing to reject

00:03:32.650 --> 00:03:37.640
this right over here and
it will not help us suggest

00:03:37.640 --> 00:03:39.840
our alternative hypothesis.

00:03:39.840 --> 00:03:41.530
And so because of the difference

00:03:41.530 --> 00:03:43.420
between what you would conclude

00:03:43.420 --> 00:03:45.760
given this change in significance levels,

00:03:45.760 --> 00:03:47.150
that's why it's really important

00:03:47.150 --> 00:03:49.610
to set these levels ahead of time

00:03:49.610 --> 00:03:51.830
because you could imagine
it's human nature,

00:03:51.830 --> 00:03:54.080
if you're a researcher of some kind,

00:03:54.080 --> 00:03:56.300
you want to have an interesting result.

00:03:56.300 --> 00:03:57.810
You want to discover something,

00:03:57.810 --> 00:03:59.070
you want to be able to tell your friends,

00:03:59.070 --> 00:04:02.410
hey, my alternative hypothesis
it actually is suggested,

00:04:02.410 --> 00:04:05.560
we can reject the
assumption, the status quo.

00:04:05.560 --> 00:04:08.140
I found something that
actually makes a difference

00:04:08.140 --> 00:04:10.670
and so it's very tempting for a researcher

00:04:10.670 --> 00:04:12.890
to calculate your p-values and then say

00:04:12.890 --> 00:04:14.670
oh, well maybe no one will notice

00:04:14.670 --> 00:04:17.740
if I then set my significance values

00:04:17.740 --> 00:04:20.300
so that it's just high enough

00:04:20.300 --> 00:04:22.930
so that I can reject my null hypothesis.

00:04:22.930 --> 00:04:26.700
If you did that, that
would be very unethical.

00:04:26.700 --> 00:04:29.120
In future videos, we'll start
thinking about the question of

00:04:29.120 --> 00:04:30.500
okay, if I'm doing it ahead of time,

00:04:30.500 --> 00:04:33.070
if I'm setting my significance
level ahead of time,

00:04:33.070 --> 00:04:34.860
how do I decide to set the threshold?

00:04:34.860 --> 00:04:36.260
When should it be one-hundredths?

00:04:36.260 --> 00:04:37.450
When should it be five-hundredths?

00:04:37.450 --> 00:04:38.560
When should it be 10-hundredths?

00:04:38.560 --> 00:04:40.490
Or when should it be something else?


Free response example: Significance test for a mean

WEBVTT
Kind: captions
Language: en

00:00:00.530 --> 00:00:02.810
- [Instructor] Regulations
require that product labels

00:00:02.810 --> 00:00:05.060
on containers of food that
are available for sale

00:00:05.060 --> 00:00:07.960
to the public accurately
state the amount of food

00:00:07.960 --> 00:00:09.500
in those containers.

00:00:09.500 --> 00:00:12.050
Specifically, if milk
containers are labeled

00:00:12.050 --> 00:00:15.820
to have 128 fluid ounces and
the mean number of fluid ounces

00:00:15.820 --> 00:00:18.730
of milk in the containers is at least 128,

00:00:18.730 --> 00:00:20.710
the milk processor is considered

00:00:20.710 --> 00:00:23.370
to be in compliance with the regulations.

00:00:23.370 --> 00:00:26.630
The filling machines can be
set to the labeled amount.

00:00:26.630 --> 00:00:28.710
Variability in the filling process

00:00:28.710 --> 00:00:31.240
causes the actual contents
of milk containers

00:00:31.240 --> 00:00:33.170
to be normally distributed.

00:00:33.170 --> 00:00:36.880
A random sample of 12
containers of milk was drawn

00:00:36.880 --> 00:00:39.710
from the milk processing line in a plant,

00:00:39.710 --> 00:00:43.680
and the amount of milk in
each container was recorded.

00:00:43.680 --> 00:00:47.280
The sample mean and standard
deviation of this sample

00:00:47.280 --> 00:00:51.070
of 12 containers of milk were 127.2 ounces

00:00:51.070 --> 00:00:53.880
and 2.1 ounces, respectively.

00:00:53.880 --> 00:00:56.860
Is there sufficient evidence to conclude

00:00:56.860 --> 00:00:59.410
that the packaging plant is not

00:00:59.410 --> 00:01:01.630
in compliance with the regulations?

00:01:01.630 --> 00:01:04.830
Provide statistical
justification for your answer.

00:01:04.830 --> 00:01:08.020
So pause this video, and see
if you can have a go at it.

00:01:08.020 --> 00:01:09.790
All right, now let's do this together.

00:01:09.790 --> 00:01:12.060
So first, let's say what
we're talking about.

00:01:12.060 --> 00:01:13.910
So let me define mu.

00:01:13.910 --> 00:01:16.610
And this is going to be the mean,

00:01:16.610 --> 00:01:18.060
mean amount,

00:01:18.900 --> 00:01:20.910
amount of

00:01:20.910 --> 00:01:21.743
milk

00:01:23.360 --> 00:01:25.730
in population,

00:01:25.730 --> 00:01:27.570
population

00:01:27.570 --> 00:01:30.139
of containers,

00:01:30.139 --> 00:01:31.600
containers

00:01:32.950 --> 00:01:34.870
at the plant

00:01:34.870 --> 00:01:36.360
that we care about.

00:01:36.360 --> 00:01:39.260
And so then we can set up our hypotheses.

00:01:39.260 --> 00:01:43.150
Our null hypothesis over here
is that we are in compliance.

00:01:43.150 --> 00:01:44.820
We could say that the mean

00:01:44.820 --> 00:01:49.210
for our population of
containers is actually 128.

00:01:49.210 --> 00:01:51.750
That's our minimum we
need to be in compliance.

00:01:51.750 --> 00:01:53.550
And then our alternative hypothesis is

00:01:53.550 --> 00:01:55.380
that we are not in compliance.

00:01:55.380 --> 00:01:56.750
So that's that our mean,

00:01:56.750 --> 00:02:00.920
the true population mean, is less than 128

00:02:00.920 --> 00:02:02.350
fluid ounces.

00:02:02.350 --> 00:02:06.570
And so this is a situation
where we are not in compliance,

00:02:06.570 --> 00:02:09.730
not in compliance,

00:02:09.730 --> 00:02:11.630
compliance in

00:02:12.560 --> 00:02:14.980
the alternative hypothesis.

00:02:14.980 --> 00:02:16.430
Now, if you're going to
do a significance test,

00:02:16.430 --> 00:02:18.000
you need to set a significance level.

00:02:18.000 --> 00:02:19.570
So let's do that over here,

00:02:19.570 --> 00:02:21.190
significance level.

00:02:21.190 --> 00:02:23.314
And if you haven't noticed,

00:02:23.314 --> 00:02:24.900
I'm trying to do, in this video,

00:02:24.900 --> 00:02:26.860
what would be expected of you on a test.

00:02:26.860 --> 00:02:29.370
This is an actual
question from an AP exam.

00:02:29.370 --> 00:02:33.050
So our significance level here,
I'll just pick it to be 0.05

00:02:34.980 --> 00:02:36.930
because, well, that's
a fairly typical one.

00:02:36.930 --> 00:02:38.440
And since they didn't give one to us,

00:02:38.440 --> 00:02:40.470
it's important to set one ahead of time.

00:02:40.470 --> 00:02:43.150
And now we want to check our
conditions for inference.

00:02:43.150 --> 00:02:46.200
So let me do that over here, conditions,

00:02:46.200 --> 00:02:47.770
conditions

00:02:47.770 --> 00:02:49.200
for

00:02:49.200 --> 00:02:50.100
inference.

00:02:50.100 --> 00:02:53.300
And this is to feel good that
the sample that we're using

00:02:53.300 --> 00:02:56.410
to make our inference, to
do our significance test,

00:02:56.410 --> 00:02:59.420
that it's a reasonable one
to make inferences from.

00:02:59.420 --> 00:03:03.260
And so the first one is,
are the random condition.

00:03:03.260 --> 00:03:05.210
And do we need that?

00:03:05.210 --> 00:03:08.380
Well, they tell us here
it's a random sample

00:03:08.380 --> 00:03:10.260
of 12 containers

00:03:10.260 --> 00:03:11.510
of milk.

00:03:11.510 --> 00:03:13.470
If I was doing this on the AP exam,

00:03:13.470 --> 00:03:14.850
I would write it out here.

00:03:14.850 --> 00:03:18.930
So I would say, in the
passage or in the question,

00:03:18.930 --> 00:03:20.300
in the question,

00:03:22.010 --> 00:03:23.700
they say,

00:03:23.700 --> 00:03:25.250
they say

00:03:26.500 --> 00:03:28.130
a random,

00:03:28.130 --> 00:03:29.930
a random

00:03:29.930 --> 00:03:30.920
sample

00:03:32.510 --> 00:03:36.830
of 12, and then they go
on to say more things.

00:03:36.830 --> 00:03:40.160
And so I would say that meets condition,

00:03:40.160 --> 00:03:42.300
meets condition.

00:03:43.220 --> 00:03:44.840
Now the next one we want to care about

00:03:44.840 --> 00:03:47.920
is our normal condition,
and this is to feel good

00:03:47.920 --> 00:03:52.050
that our sampling distribution
is roughly normal.

00:03:52.050 --> 00:03:54.150
Now, there's a couple of
ways that we could do that.

00:03:54.150 --> 00:03:58.220
One is if our sample
size is greater than 30

00:03:58.220 --> 00:04:00.150
or greater than or equal
to 30, then we'd say, okay,

00:04:00.150 --> 00:04:02.950
our sampling distribution's
going to be roughly normal.

00:04:02.950 --> 00:04:07.950
But in this situation, our
sample size N, so sample size,

00:04:09.220 --> 00:04:10.980
sample size

00:04:10.980 --> 00:04:14.040
is less than 30, but,

00:04:14.040 --> 00:04:17.090
but there's another way to
meet the normal condition.

00:04:17.090 --> 00:04:19.470
And that's if the underlying parent data

00:04:19.470 --> 00:04:20.900
is normally distributed.

00:04:20.900 --> 00:04:22.390
And they actually say it right over here.

00:04:22.390 --> 00:04:24.340
Variability in the filling process

00:04:24.340 --> 00:04:26.460
causes the actual contents of milk

00:04:26.460 --> 00:04:29.210
to be normally distributed.

00:04:29.210 --> 00:04:31.920
So we could say in passage,

00:04:33.220 --> 00:04:35.360
in passage says,

00:04:36.470 --> 00:04:38.380
and let's see, I could quote part of this.

00:04:38.380 --> 00:04:40.730
So actual contents,

00:04:40.730 --> 00:04:41.950
actual

00:04:43.130 --> 00:04:44.100
contents

00:04:45.590 --> 00:04:48.380
and dot, dot, dot, normally distributed,

00:04:48.380 --> 00:04:49.500
normally

00:04:51.000 --> 00:04:52.020
distributed.

00:04:53.370 --> 00:04:55.520
So that meets condition,

00:04:55.520 --> 00:04:57.740
meets condition.

00:04:57.740 --> 00:04:59.040
And then the last condition we want

00:04:59.040 --> 00:05:01.594
to think about is the
independence condition,

00:05:01.594 --> 00:05:03.430
independence.

00:05:03.430 --> 00:05:07.590
And this is to feel good
that the observations,

00:05:07.590 --> 00:05:09.810
that the individual
observations in our sample

00:05:09.810 --> 00:05:12.610
can be considered to
be roughly independent.

00:05:12.610 --> 00:05:15.030
Now one way is if they were
sampling with replacement,

00:05:15.030 --> 00:05:15.940
which they're not doing here.

00:05:15.940 --> 00:05:18.520
Looks like they took all
12 containers at once.

00:05:18.520 --> 00:05:21.420
But another way is if
this is less than 10%

00:05:21.420 --> 00:05:23.370
of the overall population,

00:05:23.370 --> 00:05:24.520
then you could say, okay, they're gonna,

00:05:24.520 --> 00:05:26.310
you could view them as
roughly independent.

00:05:26.310 --> 00:05:28.020
And so you can say didn't,

00:05:28.020 --> 00:05:29.650
didn't

00:05:29.650 --> 00:05:30.810
sample

00:05:32.360 --> 00:05:33.780
with replacement,

00:05:33.780 --> 00:05:36.020
with replacement,

00:05:36.020 --> 00:05:36.853
but,

00:05:38.060 --> 00:05:38.893
but

00:05:39.900 --> 00:05:41.290
assume,

00:05:41.290 --> 00:05:42.210
assume

00:05:43.080 --> 00:05:43.913
that

00:05:44.850 --> 00:05:48.160
12 is less than 10%

00:05:48.160 --> 00:05:49.980
of the population.

00:05:49.980 --> 00:05:53.080
And in that case, you
would meet condition,

00:05:53.080 --> 00:05:55.900
meet this condition as well.

00:05:55.900 --> 00:05:56.890
So it looks like we are,

00:05:56.890 --> 00:05:59.620
we've met these three conditions

00:05:59.620 --> 00:06:00.900
that we needed to make for inference,

00:06:00.900 --> 00:06:02.230
or we can assume we've done it.

00:06:02.230 --> 00:06:05.350
They haven't given us any
information to the contrary.

00:06:05.350 --> 00:06:08.970
And so now, what we can do
is calculate a t-statistic

00:06:08.970 --> 00:06:10.920
and then, from that,
calculate our P-value,

00:06:10.920 --> 00:06:13.560
compare our P-value to
our significance level,

00:06:13.560 --> 00:06:15.710
and see what kind of
conclusions we can make.

00:06:15.710 --> 00:06:18.910
And so our t-statistic right
over here, and, once again,

00:06:18.910 --> 00:06:20.480
if at any point you're
inspired and if you haven't

00:06:20.480 --> 00:06:22.610
done so already, try to do it on your own.

00:06:22.610 --> 00:06:26.760
Our t-statistic is going
to be our sample mean

00:06:26.760 --> 00:06:30.220
minus the assumed mean
from the null hypothesis.

00:06:30.220 --> 00:06:32.410
And let me, since I'm
introducing this notation,

00:06:32.410 --> 00:06:36.150
this little sub zero, I'll
say that's the assumed,

00:06:36.150 --> 00:06:37.900
assumed mean

00:06:37.900 --> 00:06:39.310
from

00:06:39.310 --> 00:06:41.100
my null hypothesis.

00:06:41.100 --> 00:06:43.130
So I'll do that, and then I'll divide,

00:06:43.130 --> 00:06:44.980
ideally, if I was doing a z-statistic,

00:06:44.980 --> 00:06:46.940
I would divide by the standard deviation

00:06:46.940 --> 00:06:50.600
of the sampling distribution
of the sample mean,

00:06:50.600 --> 00:06:53.070
which is often known as the
standard error of the mean.

00:06:53.070 --> 00:06:55.340
But the whole reason why I'm
doing a t-statistic is, well,

00:06:55.340 --> 00:06:57.530
I don't know exactly what
that is, but I could estimate

00:06:57.530 --> 00:07:00.680
the standard deviation of
the sampling distribution

00:07:00.680 --> 00:07:04.930
of the sample mean using the
sample standard deviation

00:07:04.930 --> 00:07:07.230
divided by the square root of n.

00:07:07.230 --> 00:07:08.670
And once again, it's always good,

00:07:08.670 --> 00:07:11.260
if you're doing this on a
test, to explain what n is

00:07:11.260 --> 00:07:12.830
or what some of these things are.

00:07:12.830 --> 00:07:14.820
If you're using standard notation,

00:07:14.820 --> 00:07:16.430
people might assume what they are, but,

00:07:16.430 --> 00:07:18.980
if you have time on these tests,
you can always explain more

00:07:18.980 --> 00:07:20.830
of what these actual variables are.

00:07:20.830 --> 00:07:25.830
But in this case, this
is going to be 127.2,

00:07:26.360 --> 00:07:28.430
that is our sample mean,

00:07:28.430 --> 00:07:33.130
minus our assumed mean from
our null hypothesis, minus 128,

00:07:33.130 --> 00:07:38.080
all of that over our sample
standard deviation is 2.1,

00:07:38.080 --> 00:07:40.780
divided by the square root of 12.

00:07:40.780 --> 00:07:44.010
And so this is going to
be approximately equal to,

00:07:45.640 --> 00:07:47.610
get a calculator out here,

00:07:47.610 --> 00:07:51.370
and so we have, let's see,
the numerator, we have 127.2

00:07:54.030 --> 00:07:57.240
minus 128.

00:07:57.240 --> 00:08:00.120
And then we're gonna divide that by,

00:08:00.120 --> 00:08:03.690
I'll do another parentheses, 2.1

00:08:03.690 --> 00:08:05.620
divided by

00:08:05.620 --> 00:08:07.970
the square root

00:08:07.970 --> 00:08:10.370
of 12.

00:08:10.370 --> 00:08:11.870
And then

00:08:11.870 --> 00:08:13.840
let me close

00:08:13.840 --> 00:08:15.240
my parentheses.

00:08:15.240 --> 00:08:16.870
Did I type that in correctly?

00:08:16.870 --> 00:08:18.980
Yeah, that looks right.

00:08:18.980 --> 00:08:22.120
Click enter, and so this is negative,

00:08:22.120 --> 00:08:26.530
I'll say it's approximately negative 1.32.

00:08:26.530 --> 00:08:30.080
So negative 1.32.

00:08:30.080 --> 00:08:32.810
And now we can figure out our P-value,

00:08:32.810 --> 00:08:37.410
our P-value, which is the
same thing as the probability

00:08:37.410 --> 00:08:41.600
of getting a t-statistic
this low or lower.

00:08:41.600 --> 00:08:46.270
So we could say t is less than
or equal to negative 1.32,

00:08:47.430 --> 00:08:51.700
is equal to, so I'll get
my calculator back out.

00:08:51.700 --> 00:08:56.700
And so here, what I would
use is I would use the

00:08:57.190 --> 00:09:00.160
cumulative distribution
function for t-statistic.

00:09:00.160 --> 00:09:01.750
So that's that right over there.

00:09:01.750 --> 00:09:05.200
And so I do care about the left tail.

00:09:05.200 --> 00:09:07.410
So I care about the area under the curve

00:09:07.410 --> 00:09:11.250
from negative infinity up to
and including negative 1.32.

00:09:11.250 --> 00:09:12.950
So let's do negative,

00:09:12.950 --> 00:09:14.440
negative 1.32.

00:09:15.730 --> 00:09:17.990
And then my degrees of freedom,

00:09:17.990 --> 00:09:19.870
well, it's gonna be my
sample size minus one.

00:09:19.870 --> 00:09:23.330
My sample size was 12,
so that minus one is 11.

00:09:23.330 --> 00:09:25.630
And then I do paste.

00:09:25.630 --> 00:09:28.480
And so I have this tcdf

00:09:28.480 --> 00:09:31.030
from negative E 99

00:09:31.030 --> 00:09:33.670
to negative 1.32 comma 11.

00:09:33.670 --> 00:09:35.290
And actually, you'd
want to write this down

00:09:35.290 --> 00:09:36.900
on your exam if you were doing it,

00:09:36.900 --> 00:09:38.650
just so they know where you got that from.

00:09:38.650 --> 00:09:40.700
And so this is,

00:09:41.810 --> 00:09:44.480
this is equal to 0.107.

00:09:47.310 --> 00:09:48.143
So let me write it.

00:09:48.143 --> 00:09:52.150
This is approximately 0.107.

00:09:52.150 --> 00:09:54.600
And it's important to say
how you calculated this,

00:09:54.600 --> 00:09:56.420
so used,

00:09:56.420 --> 00:09:59.880
used tcdf.

00:09:59.880 --> 00:10:02.160
And we went from negative one

00:10:02.160 --> 00:10:05.870
times 10 to the 99th power.

00:10:05.870 --> 00:10:09.920
And we went up to negative 1.32,

00:10:09.920 --> 00:10:13.120
and then we had 11 degrees of freedom

00:10:13.120 --> 00:10:15.480
to get this result right over here.

00:10:16.350 --> 00:10:18.490
And it also might be good practice

00:10:18.490 --> 00:10:21.090
to draw your t-distribution
right over here.

00:10:22.130 --> 00:10:23.610
So that's our t-distribution.

00:10:23.610 --> 00:10:25.720
That's the mean of our t-distribution.

00:10:25.720 --> 00:10:28.600
So we say that this is the
area that we care about.

00:10:28.600 --> 00:10:30.370
So that is

00:10:30.370 --> 00:10:31.380
that right over there,

00:10:31.380 --> 00:10:33.910
just to make sure people know
what we're talking about.

00:10:33.910 --> 00:10:36.350
And so here, now we're
ready to make a conclusion.

00:10:36.350 --> 00:10:38.780
We can compare this to
our significance level.

00:10:38.780 --> 00:10:41.430
And so we can say since,

00:10:41.430 --> 00:10:42.630
since

00:10:42.630 --> 00:10:45.210
0.107

00:10:45.210 --> 00:10:47.100
is greater than,

00:10:47.100 --> 00:10:50.160
our significance level
is greater than 0.05,

00:10:51.640 --> 00:10:53.770
which is alpha,

00:10:53.770 --> 00:10:55.410
we fail,

00:10:56.510 --> 00:10:58.050
we fail

00:10:58.910 --> 00:11:00.390
to reject,

00:11:01.640 --> 00:11:03.850
reject the null hypothesis.

00:11:03.850 --> 00:11:05.810
And so let's just make sure
we read their question right.

00:11:05.810 --> 00:11:07.830
Is there sufficient evidence to conclude

00:11:07.830 --> 00:11:10.270
that the packaging plant
is not in compliance

00:11:10.270 --> 00:11:11.260
with the regulations?

00:11:11.260 --> 00:11:14.580
And so another way of
saying this is there is not,

00:11:14.580 --> 00:11:16.480
there is not

00:11:17.680 --> 00:11:18.730
sufficient,

00:11:19.570 --> 00:11:22.130
sufficient, I'm gonna have
to scroll down a little bit.

00:11:22.130 --> 00:11:24.100
I'm trying to squeeze it on the page, but

00:11:24.100 --> 00:11:25.260
I'm gonna have to go down.

00:11:25.260 --> 00:11:27.410
There is not

00:11:27.410 --> 00:11:28.930
sufficient evidence,

00:11:30.700 --> 00:11:33.030
sufficient evidence to conclude,

00:11:33.030 --> 00:11:35.240
to conclude

00:11:36.680 --> 00:11:37.513
that

00:11:38.590 --> 00:11:40.140
the plant

00:11:41.720 --> 00:11:43.340
is not

00:11:44.650 --> 00:11:47.750
in compliance with regulations.

00:11:48.930 --> 00:11:51.560
And then we are done.


Comparing P-value from t statistic to significance level

WEBVTT
Kind: captions
Language: en

00:00:00.360 --> 00:00:02.830
- [Instructor] Jude was curious
if the automated machine

00:00:02.830 --> 00:00:06.450
at his restaurant was filling
drinks with the proper amount.

00:00:06.450 --> 00:00:11.450
He filled a sample of 20 drinks
to test his null hypothesis,

00:00:11.760 --> 00:00:14.550
which is the actual population mean

00:00:14.550 --> 00:00:17.210
for how much drink
there was in the drinks,

00:00:17.210 --> 00:00:19.530
per drink is 530 milliliters,

00:00:19.530 --> 00:00:21.450
versus his alternative hypothesis is

00:00:21.450 --> 00:00:25.010
that the population mean
is not 530 milliliters,

00:00:25.010 --> 00:00:27.830
where mu is the mean filling amount.

00:00:27.830 --> 00:00:29.130
The drinks in the sample

00:00:29.130 --> 00:00:33.140
contained a mean amount of 528 milliliters

00:00:33.140 --> 00:00:36.530
with a standard deviation
of four milliliters.

00:00:36.530 --> 00:00:39.200
These results produced a test statistic

00:00:39.200 --> 00:00:42.970
of t is equal to negative 2.236

00:00:42.970 --> 00:00:47.720
and a P-value of approximately 0.038.

00:00:47.720 --> 00:00:50.650
Assuming the conditions
for inference were met,

00:00:50.650 --> 00:00:52.840
what is an appropriate conclusion

00:00:52.840 --> 00:00:55.810
at the alpha equals 0.05

00:00:55.810 --> 00:00:57.880
significance level?

00:00:57.880 --> 00:01:01.020
And they give us some choices here.

00:01:01.020 --> 00:01:04.550
And like always, I encourage
you to pause this video

00:01:04.550 --> 00:01:08.160
and see if you can figure
it out on your own.

00:01:10.130 --> 00:01:13.000
All right, so now let's
work through this together.

00:01:13.000 --> 00:01:15.420
So let's just remind
ourselves what's going on.

00:01:15.420 --> 00:01:18.160
So you have some population of drinks,

00:01:18.160 --> 00:01:21.990
and we care about the
true population mean.

00:01:21.990 --> 00:01:23.970
You have a null hypothesis around it,

00:01:23.970 --> 00:01:26.300
that the true mean is 530 milliliters,

00:01:26.300 --> 00:01:27.900
but then there's the
alternative hypothesis

00:01:27.900 --> 00:01:29.910
that it's not 530 milliliters.

00:01:29.910 --> 00:01:33.000
So to test your null
hypothesis, you take a sample.

00:01:33.000 --> 00:01:36.580
In this case, we had
a sample of 20 drinks.

00:01:36.580 --> 00:01:39.820
And using that sample, you
calculate a sample mean,

00:01:39.820 --> 00:01:43.680
and then you also calculate
a sample standard deviation.

00:01:43.680 --> 00:01:45.850
They tell us these things right over here.

00:01:45.850 --> 00:01:47.880
And then using this information

00:01:47.880 --> 00:01:49.870
and actually our sample size,

00:01:49.870 --> 00:01:52.520
you are able to calculate a t-statistic.

00:01:52.520 --> 00:01:54.350
You're able to calculate a t-statistic.

00:01:54.350 --> 00:01:56.400
And then using that t-statistic,

00:01:56.400 --> 00:01:59.370
you are able to calculate a P-value.

00:01:59.370 --> 00:02:03.000
And the P-value is what is the probability

00:02:03.000 --> 00:02:06.600
of getting a result at least this extreme

00:02:06.600 --> 00:02:10.100
if we assume that the
null hypothesis is true?

00:02:10.100 --> 00:02:11.610
And if that probability

00:02:11.610 --> 00:02:14.740
is lower than our significance level,

00:02:14.740 --> 00:02:17.040
then we say, hey, that's
a very low probability.

00:02:17.040 --> 00:02:19.700
We are going to reject
our null hypothesis,

00:02:19.700 --> 00:02:21.570
which would suggest our alternative.

00:02:21.570 --> 00:02:24.320
So the key to this
question is just to compare

00:02:24.320 --> 00:02:28.610
this P-value right over here
to our significance level.

00:02:28.610 --> 00:02:32.050
And as we see, the P-value 0.038

00:02:32.050 --> 00:02:33.450
is indeed

00:02:33.450 --> 00:02:36.510
less than 0.05.

00:02:36.510 --> 00:02:38.290
And so, because of this,

00:02:38.290 --> 00:02:41.770
we would reject the null hypothesis.

00:02:41.770 --> 00:02:44.610
We would reject the null hypothesis,

00:02:44.610 --> 00:02:46.470
which would suggest the alternative,

00:02:46.470 --> 00:02:47.960
that the true mean

00:02:47.960 --> 00:02:51.350
is something different
than 530 milliliters.

00:02:51.350 --> 00:02:54.860
And so if we look our choices here,

00:02:54.860 --> 00:02:58.130
so the first choice says
reject the null hypothesis.

00:02:58.130 --> 00:03:01.050
This is strong evidence
that the mean filling amount

00:03:01.050 --> 00:03:03.700
is different than 530 milliliters.

00:03:03.700 --> 00:03:05.200
Yeah, that one looks good.

00:03:05.200 --> 00:03:07.930
This suggests this is strong evidence,

00:03:07.930 --> 00:03:10.260
this suggests the alternative hypothesis,

00:03:10.260 --> 00:03:11.900
which is that right over there.

00:03:11.900 --> 00:03:13.220
But let's read the other
ones just to make sure

00:03:13.220 --> 00:03:14.053
that they don't make sense.

00:03:14.053 --> 00:03:15.730
So this is rejecting the null hypothesis.

00:03:15.730 --> 00:03:17.840
That looks true so far.

00:03:17.840 --> 00:03:20.490
This isn't enough evidence to conclude

00:03:20.490 --> 00:03:22.160
that the mean filling amount

00:03:22.160 --> 00:03:25.480
is different than 530 milliliters.

00:03:25.480 --> 00:03:28.890
No, not, the first one is
definitely much stronger.

00:03:28.890 --> 00:03:30.640
Fail to reject the null hypothesis.

00:03:30.640 --> 00:03:32.310
No, we are rejecting the null hypothesis

00:03:32.310 --> 00:03:35.220
'cause our P-value is lower
than our significance level.

00:03:35.220 --> 00:03:37.810
Fail to reject, no we'd
rule that one out as well.


Using a table to estimate P-value from t statistic

WEBVTT
Kind: captions
Language: en

00:00:00.170 --> 00:00:01.850
- [Instructor] Caterina was testing

00:00:01.850 --> 00:00:04.290
her null hypothesis is that the true

00:00:04.290 --> 00:00:08.970
population mean of some
data set is equal to zero

00:00:08.970 --> 00:00:10.810
versus her alternative hypothesis,

00:00:10.810 --> 00:00:13.110
is that it's not equal to zero and then

00:00:13.110 --> 00:00:15.520
she takes a sample of six observations

00:00:15.520 --> 00:00:17.160
and then using that sample her

00:00:17.160 --> 00:00:18.990
test statistic, I can never say that,

00:00:18.990 --> 00:00:23.580
test statistic was T is equal to 2.75.

00:00:23.580 --> 00:00:26.820
Assume that the conditions
for inference were met.

00:00:26.820 --> 00:00:30.310
What is the approximate
P-value for Caterina's test?

00:00:30.310 --> 00:00:31.610
Like always, pause this video and

00:00:31.610 --> 00:00:33.320
see if you can figure it out.

00:00:33.320 --> 00:00:35.090
I just always like to remind ourselves

00:00:35.090 --> 00:00:39.260
what's going on here, so
there's some population here.

00:00:39.260 --> 00:00:40.890
She has a null hypothesis that

00:00:40.890 --> 00:00:43.300
the mean is equal to
zero, or the alternative

00:00:43.300 --> 00:00:45.180
is that it's not equal to zero.

00:00:45.180 --> 00:00:47.220
She wants to test her null hypothesis

00:00:47.220 --> 00:00:51.450
so she takes a sample of size six.

00:00:51.450 --> 00:00:55.000
From that, since the population parameter

00:00:55.000 --> 00:00:56.750
we care about is a population mean,

00:00:57.697 --> 00:00:58.800
she would calculate the sample mean

00:00:58.800 --> 00:01:00.520
in order to estimate that and

00:01:00.520 --> 00:01:02.880
the sample standard deviation.

00:01:02.880 --> 00:01:06.110
From that, we can calculate this T value.

00:01:06.110 --> 00:01:08.080
The T value is going to be equal to

00:01:08.080 --> 00:01:10.000
the difference between her sample mean

00:01:10.000 --> 00:01:13.370
and the assumed population mean

00:01:13.370 --> 00:01:15.370
from the null hypothesis, that's what

00:01:15.370 --> 00:01:17.477
this little sub zero means, it means

00:01:17.477 --> 00:01:19.141
it's the assumed mean from the

00:01:19.141 --> 00:01:21.700
null hypothesis, divided by our

00:01:21.700 --> 00:01:24.610
estimate of the standard deviation

00:01:24.610 --> 00:01:26.070
of the sampling and distribution.

00:01:26.070 --> 00:01:27.910
I say estimate because unlike when

00:01:27.910 --> 00:01:29.894
we were dealing with proportions,

00:01:29.894 --> 00:01:31.514
with proportions we can actually

00:01:31.514 --> 00:01:32.480
calculate the assumed, based on

00:01:32.480 --> 00:01:35.060
the null hypothesis, sampling distribution

00:01:35.060 --> 00:01:37.990
standard deviation, but
here we have to estimate it.

00:01:37.990 --> 00:01:40.650
It's going to be our
sample standard deviation

00:01:40.650 --> 00:01:42.890
divided by the square root of N.

00:01:42.890 --> 00:01:45.100
In this example, they
calculated all of this for us.

00:01:45.100 --> 00:01:46.996
They said hey, this is going to

00:01:46.996 --> 00:01:49.530
be equal to 2.75 and so we can just

00:01:49.530 --> 00:01:53.219
use that to figure out our P-value.

00:01:53.219 --> 00:01:57.340
Let's just think about what
that is asking us to do.

00:01:57.340 --> 00:01:59.750
The null hypothesis is
that the mean is zero.

00:01:59.750 --> 00:02:03.240
The alternative is is that
it is not equal to zero.

00:02:03.240 --> 00:02:04.990
This is a situation where, if we're

00:02:04.990 --> 00:02:07.240
looking at the T
distribution right over here,

00:02:07.240 --> 00:02:09.750
my quick drawing of a T distribution.

00:02:09.750 --> 00:02:12.480
If this is the mean of our T distribution,

00:02:12.480 --> 00:02:15.210
what we care about is things that are

00:02:15.210 --> 00:02:19.270
at least 2.75 above the mean and at least

00:02:19.270 --> 00:02:21.670
2.75 below the mean because we care

00:02:21.670 --> 00:02:23.860
about things that are
different from the mean,

00:02:23.860 --> 00:02:25.990
not just things that are greater than

00:02:25.990 --> 00:02:27.470
the mean or less than the mean.

00:02:27.470 --> 00:02:29.350
We would look at, we would say

00:02:29.350 --> 00:02:32.300
what's the probability of getting

00:02:32.300 --> 00:02:37.300
a T value that is 2.75
or more above the mean,

00:02:37.600 --> 00:02:39.690
and similarly, what's the probability of

00:02:39.690 --> 00:02:44.690
getting a T value that is
2.75 or more below the mean?

00:02:47.940 --> 00:02:51.730
This is negative 2.75 right over there.

00:02:51.730 --> 00:02:53.700
What we have here is a T table

00:02:53.700 --> 00:02:55.340
and a T table is a little bit different

00:02:55.340 --> 00:02:57.030
than a Z table because there's

00:02:57.030 --> 00:02:58.470
several things going on.

00:02:58.470 --> 00:03:01.000
First of all, you have
your degrees of freedom.

00:03:01.000 --> 00:03:04.350
That's just going to be
your sample size minus one.

00:03:04.350 --> 00:03:06.270
In this example, our sample size is six,

00:03:06.270 --> 00:03:09.476
so six minus one is five, and so

00:03:09.476 --> 00:03:14.476
we are going to be in
this row right over here.

00:03:15.360 --> 00:03:16.630
Then what you want to do is,

00:03:16.630 --> 00:03:19.340
you want to look up your T value.

00:03:19.340 --> 00:03:21.340
This is T distribution critical values,

00:03:21.340 --> 00:03:25.140
so we want to look up 2.75 on this row.

00:03:25.140 --> 00:03:28.740
We see 2.75, it's a little bit less

00:03:28.740 --> 00:03:31.090
than that but that's the closest value.

00:03:31.090 --> 00:03:32.960
It's a good bit more than this

00:03:32.960 --> 00:03:34.780
right over here, so it's a little bit

00:03:34.780 --> 00:03:36.820
closer to this value than this value.

00:03:37.980 --> 00:03:40.010
Our tail probability, and remember,

00:03:40.010 --> 00:03:41.940
this is only giving us this probability

00:03:41.940 --> 00:03:43.910
right over here, our tail probability

00:03:43.910 --> 00:03:48.910
is going to be between 0.025 and 0.02

00:03:49.980 --> 00:03:52.310
and it's going to be closer to this one.

00:03:52.310 --> 00:03:54.550
It's gonna be approximately this.

00:03:54.550 --> 00:03:56.020
It'll actually be a little bit greater

00:03:56.020 --> 00:03:58.315
because we're gonna go a little bit

00:03:58.315 --> 00:04:00.800
in that direction because
we are less than 2.757.

00:04:00.800 --> 00:04:03.000
We can say this is approximately 0.02.

00:04:04.403 --> 00:04:07.310
That's 0.02 approximately,
the T distribution

00:04:07.310 --> 00:04:09.960
is symmetric, this is going
to be approximately 0.02.

00:04:11.257 --> 00:04:13.160
Our P-value, which is going to be

00:04:13.160 --> 00:04:16.690
the probability of getting a T value

00:04:16.690 --> 00:04:21.690
that is at least 2.75 above the mean

00:04:22.379 --> 00:04:27.379
or 2.75 below the mean, the P-value

00:04:27.537 --> 00:04:30.880
is going to be approximately the sum

00:04:30.880 --> 00:04:33.840
of these areas, which is 0.04.

00:04:35.180 --> 00:04:37.260
Then of course, Caterina would want

00:04:37.260 --> 00:04:39.660
to compare that to her significance level

00:04:39.660 --> 00:04:41.600
that she set ahead of time, and if this

00:04:41.600 --> 00:04:42.960
is lower than that, then she would

00:04:42.960 --> 00:04:44.930
reject the null hypothesis and that

00:04:44.930 --> 00:04:46.380
would suggest the alternative.

00:04:46.380 --> 00:04:47.760
If this is not lower than her

00:04:47.760 --> 00:04:49.650
significance level, well then she would

00:04:49.650 --> 00:04:52.020
not be able to reject her null hypothesis.


Using TI calculator for P-value from t statistic

WEBVTT
Kind: captions
Language: en

00:00:00.550 --> 00:00:03.430
- [Instructor] Miriam was
testing her null hypothesis

00:00:03.430 --> 00:00:06.100
that the population mean of some data set

00:00:06.100 --> 00:00:09.560
is equal to 18 versus her
alternative hypothesis

00:00:09.560 --> 00:00:11.870
is that the mean is less than 18

00:00:11.870 --> 00:00:14.520
with a sample of seven observations.

00:00:14.520 --> 00:00:17.530
Her test statistic, I
can never say that right,

00:00:17.530 --> 00:00:20.990
was t is equal to negative 1.9.

00:00:20.990 --> 00:00:24.550
Assume that the conditions
for inference were met.

00:00:24.550 --> 00:00:27.820
What is the approximate p
value for Miriam's test?

00:00:27.820 --> 00:00:29.270
So, pause this video and see if you

00:00:29.270 --> 00:00:31.290
can figure this out on your own.

00:00:31.290 --> 00:00:33.790
Alright, what I always like
to remind ourselves what's

00:00:33.790 --> 00:00:37.810
going on here before I go ahead
and calculate the p value.

00:00:37.810 --> 00:00:40.700
There's some data set,
some population here

00:00:40.700 --> 00:00:43.840
and the null hypothesis is
that the true mean is 18,

00:00:43.840 --> 00:00:46.320
the alternative is that it's less than 18.

00:00:46.320 --> 00:00:50.000
To test that null hypothesis,
Miriam takes a sample,

00:00:50.000 --> 00:00:53.200
sample size is equal to seven.

00:00:53.200 --> 00:00:56.320
From that, she would
calculate her sample mean

00:00:56.320 --> 00:00:58.200
and her sample standard deviation,

00:00:58.200 --> 00:01:01.830
and from that, she would
calculate this t statistic.

00:01:01.830 --> 00:01:03.420
The way she would do that or if they

00:01:03.420 --> 00:01:06.220
didn't tell us ahead
of time what that was.

00:01:06.220 --> 00:01:09.490
We would say the t statistic
is equal to her sample mean,

00:01:09.490 --> 00:01:13.050
minus the assumed mean
from the null hypothesis,

00:01:13.050 --> 00:01:15.380
that's what we have over here, divided by

00:01:15.380 --> 00:01:17.830
and this is a mouthful, our approximation

00:01:17.830 --> 00:01:20.220
of the standard error of the mean.

00:01:20.220 --> 00:01:21.840
The way we get that approximation,

00:01:21.840 --> 00:01:24.950
we take our sample standard deviation

00:01:24.950 --> 00:01:27.560
and divide it by the square
root of our sample size.

00:01:27.560 --> 00:01:30.270
Well, they've calculated
this ahead of time for us.

00:01:30.270 --> 00:01:33.370
This is equal to negative 1.9.

00:01:33.370 --> 00:01:35.750
So, if we think about a t distribution,

00:01:35.750 --> 00:01:40.170
I'll try to hand draw a rough
t distribution really fast,

00:01:40.170 --> 00:01:42.750
and if this is the mean
of the t distribution,

00:01:42.750 --> 00:01:45.040
what we are curious about,
because our alternative

00:01:45.040 --> 00:01:48.280
hypothesis is that the
mean is less than 18.

00:01:48.280 --> 00:01:52.770
What we care about is,
what is the probability

00:01:52.770 --> 00:01:57.520
of getting a t value that
is more than 1.9 below

00:01:57.520 --> 00:02:01.860
the mean so this right
over here, negative 1.9.

00:02:01.860 --> 00:02:04.090
It's this area, right there.

00:02:04.090 --> 00:02:06.930
I'm gonna do this with a TI-84,

00:02:06.930 --> 00:02:09.310
at least an emulator of a TI-84.

00:02:10.460 --> 00:02:15.460
All we have to do is, we
would go to 2nd distribution

00:02:16.120 --> 00:02:19.030
and then I would use the t cumulative

00:02:19.030 --> 00:02:21.600
distribution function so let's go there,

00:02:21.600 --> 00:02:25.300
that's the number six
right there, click enter.

00:02:25.300 --> 00:02:26.190
My lower bound...

00:02:26.190 --> 00:02:28.100
Yeah, I essentially wanted
it to be negative infinity

00:02:28.100 --> 00:02:30.050
and we can just call
that negative infinity.

00:02:30.050 --> 00:02:31.440
It's an approximation of negative

00:02:31.440 --> 00:02:33.130
infinity, very, very low number.

00:02:33.130 --> 00:02:37.710
Our upper bound would be
negative 1.9, negative 1.9.

00:02:37.710 --> 00:02:39.810
And then our degrees of freedom,

00:02:39.810 --> 00:02:41.600
that's our sample size minus one.

00:02:41.600 --> 00:02:42.950
Our sample size is seven so our

00:02:42.950 --> 00:02:44.620
degrees of freedom would be six.

00:02:45.640 --> 00:02:47.500
There we have it.

00:02:47.500 --> 00:02:52.500
This would be, our p value
would be approximately 0.053.

00:02:54.860 --> 00:02:59.320
Our p value would be approximately 0.053.

00:03:01.460 --> 00:03:05.000
Then what Miriam would do is,
would compare this p value

00:03:05.000 --> 00:03:08.040
to her preset significance
level, to alpha.

00:03:08.040 --> 00:03:10.700
If this is below alpha,
then she would reject

00:03:10.700 --> 00:03:13.860
her null hypothesis, which
would suggest the alternative.

00:03:13.860 --> 00:03:15.440
If this is above alpha, then she would

00:03:15.440 --> 00:03:17.980
fail to reject her null hypothesis.


Conditions for a z test about a proportion

WEBVTT
Kind: captions
Language: en

00:00:00.310 --> 00:00:03.600
- [Instructor] Jules works on
a small team of 40 employees.

00:00:03.600 --> 00:00:06.180
Each employee receives an annual rating,

00:00:06.180 --> 00:00:09.570
the best of which is exceeds expectations.

00:00:09.570 --> 00:00:13.670
Management claimed that 10%
of employees earn this rating,

00:00:13.670 --> 00:00:16.650
but Jules suspected it
was actually less common.

00:00:16.650 --> 00:00:19.910
She obtained an anonymous
random sample of 10 ratings

00:00:19.910 --> 00:00:21.950
for employees on her team.

00:00:21.950 --> 00:00:25.920
She wants to use the sample
data to test her null hypothesis

00:00:25.920 --> 00:00:28.530
that the true proportion is 10% versus

00:00:28.530 --> 00:00:30.630
her alternative hypothesis
that the true proportion

00:00:30.630 --> 00:00:34.940
is less than 10%, where p is
the proportion of all employees

00:00:34.940 --> 00:00:38.260
on her team who earned
exceeds expectations.

00:00:38.260 --> 00:00:41.360
Which conditions for
performing this type of test

00:00:41.360 --> 00:00:43.630
did Jules' sample meet?

00:00:43.630 --> 00:00:45.820
And when they're saying which conditions,

00:00:45.820 --> 00:00:48.360
they are talking about
the three conditions,

00:00:48.360 --> 00:00:52.050
the random condition,
the normal condition,

00:00:52.050 --> 00:00:56.390
and we've seen these before,
and the independence condition.

00:00:56.390 --> 00:00:59.300
So I will let you pause the video now

00:00:59.300 --> 00:01:00.940
and try to figure this out on your own

00:01:00.940 --> 00:01:03.580
and then we will review
each of these conditions

00:01:03.580 --> 00:01:06.310
and think about whether
Jules' sample meets

00:01:06.310 --> 00:01:09.800
the conditions that we need to feel good

00:01:09.800 --> 00:01:11.980
about some of our significance testing.

00:01:13.610 --> 00:01:15.350
All right, now let's work
through this together.

00:01:15.350 --> 00:01:17.170
So let's just remind ourselves
what we're going to do

00:01:17.170 --> 00:01:18.090
in a significance test.

00:01:18.090 --> 00:01:19.230
We have our null hypothesis.

00:01:19.230 --> 00:01:21.110
We have our alternative hypothesis.

00:01:21.110 --> 00:01:23.030
What we do is we look at the population.

00:01:23.030 --> 00:01:27.160
The population size, there's
40 employees on staff

00:01:27.160 --> 00:01:28.150
at this company.

00:01:28.150 --> 00:01:29.310
We take a sample,

00:01:29.310 --> 00:01:32.420
in Jules' case she took
a sample size of 10,

00:01:32.420 --> 00:01:34.820
and then we calculate a sample statistic,

00:01:34.820 --> 00:01:37.230
in this case it is a sample proportion

00:01:37.230 --> 00:01:41.030
which is equal to, let's
just call it p hat sub one.

00:01:41.030 --> 00:01:44.890
And then we want to calculate a p-value.

00:01:44.890 --> 00:01:48.080
And just as a bit of review,
a p-value is the probability

00:01:48.080 --> 00:01:51.500
of getting a result at
least as extreme as this one

00:01:51.500 --> 00:01:54.090
if we assume our null hypothesis is true.

00:01:54.090 --> 00:01:56.420
And in this particular
case, because she suspects

00:01:56.420 --> 00:01:59.890
that not 10% are getting
the exceeds expectations,

00:01:59.890 --> 00:02:03.510
this would be the probability
of your sample statistic

00:02:03.510 --> 00:02:08.510
being less than or equal to the
one that you just calculated

00:02:08.590 --> 00:02:11.380
for a sample size of n equals 10,

00:02:11.380 --> 00:02:15.060
given that your null hypothesis is true.

00:02:15.060 --> 00:02:18.780
And if this p-value is less

00:02:18.780 --> 00:02:22.380
than your predetermined
significance level,

00:02:22.380 --> 00:02:24.300
maybe that's 5% or 10%,

00:02:24.300 --> 00:02:25.920
but you'd want to decide
that ahead of time,

00:02:25.920 --> 00:02:30.800
then you would reject your null hypothesis

00:02:30.800 --> 00:02:33.380
because this, the probability
of getting this result,

00:02:33.380 --> 00:02:35.120
seems pretty low, in which case

00:02:35.120 --> 00:02:37.290
it would suggest the alternative.

00:02:37.290 --> 00:02:40.000
But then if the p-value
is not less than this,

00:02:40.000 --> 00:02:43.360
then you wouldn't be able to
reject the null hypothesis.

00:02:43.360 --> 00:02:45.120
But the key thing, and
this is what this question

00:02:45.120 --> 00:02:49.410
is all about, in order to feel
good about this calculation,

00:02:49.410 --> 00:02:50.810
we need to make some assumptions

00:02:50.810 --> 00:02:53.270
about the sampling distribution.

00:02:53.270 --> 00:02:55.610
We have to assume that
it's reasonably normal,

00:02:55.610 --> 00:02:59.100
that it can actually be used
to calculate this probability,

00:02:59.100 --> 00:03:01.720
and that's where these
conditions come into play.

00:03:01.720 --> 00:03:03.430
The first is the random condition,

00:03:03.430 --> 00:03:06.630
and that's that the data
points in this sample

00:03:06.630 --> 00:03:08.500
were truly randomly selected.

00:03:08.500 --> 00:03:09.370
So pause this video.

00:03:09.370 --> 00:03:11.410
Did she meet the random condition?

00:03:12.400 --> 00:03:15.540
Well, it says she obtained
an anonymous random sample

00:03:15.540 --> 00:03:18.490
of 10 ratings of employees on her team.

00:03:18.490 --> 00:03:20.630
They don't say how she did
it, but we'll take their word

00:03:20.630 --> 00:03:22.830
for it that it was an
anonymous random sample,

00:03:22.830 --> 00:03:25.280
so she meets the random condition.

00:03:25.280 --> 00:03:27.670
Now what about the normal condition?

00:03:27.670 --> 00:03:31.830
The normal condition tells
us that the expected number

00:03:31.830 --> 00:03:34.840
of successes, which
would be our sample size

00:03:34.840 --> 00:03:38.500
times the true proportion,
and the number of failures,

00:03:38.500 --> 00:03:40.580
sample size times one minus p,

00:03:40.580 --> 00:03:43.460
need to be at least equal to 10.

00:03:43.460 --> 00:03:47.670
So they need to be greater
than or equal to 10.

00:03:47.670 --> 00:03:50.840
Now what are they for
this particular scenario?

00:03:50.840 --> 00:03:52.700
Well, n is equal to 10,

00:03:55.138 --> 00:03:57.780
and our true proportion,
remember we're going to assume

00:03:57.780 --> 00:03:58.960
when do the significance test,

00:03:58.960 --> 00:04:01.470
we assume the null hypothesis is true,

00:04:01.470 --> 00:04:03.370
and the null hypothesis tells us

00:04:03.370 --> 00:04:05.690
that our true proportion is 0.1.

00:04:05.690 --> 00:04:09.400
So this is 0.1, this is
one minus 0.1 which is 0.9.

00:04:10.913 --> 00:04:14.010
Well, 10 times 0.1 is one,
so that's not greater than

00:04:14.010 --> 00:04:14.920
or equal to 10.

00:04:14.920 --> 00:04:17.680
So just off of that, we don't
meet the normal condition.

00:04:17.680 --> 00:04:20.220
But even the second one,
10 times 0.9 is nine.

00:04:20.220 --> 00:04:21.930
That's also not greater
than or equal to 10,

00:04:21.930 --> 00:04:24.590
so we don't meet this normal condition.

00:04:24.590 --> 00:04:27.240
We can't feel good that
the sampling distribution

00:04:27.240 --> 00:04:29.960
is roughly normal,
which we normally assume

00:04:29.960 --> 00:04:32.440
when we're trying to make
this type of calculation.

00:04:32.440 --> 00:04:35.540
And then last but not least, independence.

00:04:35.540 --> 00:04:38.060
Independence is to feel good
that each of the data points

00:04:38.060 --> 00:04:39.760
in your sample are independent.

00:04:39.760 --> 00:04:42.760
The results of whether they
are a success or a failure

00:04:42.760 --> 00:04:45.610
is independent of each other.

00:04:45.610 --> 00:04:49.120
Now if she was surveying
these people with replacement,

00:04:49.120 --> 00:04:51.260
if each data point was with replacement,

00:04:51.260 --> 00:04:54.760
you would definitely meet
this independence condition.

00:04:54.760 --> 00:04:56.020
But she didn't do it with replacement,

00:04:56.020 --> 00:04:57.360
but there's another way to go about it.

00:04:57.360 --> 00:04:59.570
You could use your 10% rule.

00:04:59.570 --> 00:05:03.940
If your sample size is less than 10%

00:05:03.940 --> 00:05:06.040
of the population size,

00:05:06.040 --> 00:05:09.010
then it's okay, it's
considered roughly okay,

00:05:09.010 --> 00:05:11.260
that you didn't do it with replacement.

00:05:11.260 --> 00:05:15.870
But her sample size here is
25%, clearly greater than 10%,

00:05:15.870 --> 00:05:19.320
and so she does not meet the
independence condition either.

00:05:19.320 --> 00:05:22.640
And so if she went and
tried to calculate this,

00:05:22.640 --> 00:05:25.810
assuming a indicative
sampling distribution

00:05:25.810 --> 00:05:28.620
that is roughly normal,
I would not feel so good

00:05:28.620 --> 00:05:30.490
about her results 'cause she didn't meet

00:05:30.490 --> 00:05:32.380
two of these three conditions.


Example calculating t statistic for a test about a mean

WEBVTT
Kind: captions
Language: en

00:00:00.200 --> 00:00:02.750
- [Tutor] Rory suspects that
teachers in his school district

00:00:02.750 --> 00:00:05.750
have less than five years
of experience on average.

00:00:05.750 --> 00:00:08.440
He decides to test his null hypothesis

00:00:08.440 --> 00:00:12.320
is that the mean number of years
of experience is five years

00:00:12.320 --> 00:00:14.990
and his alternative hypothesis
is that the true mean

00:00:14.990 --> 00:00:17.750
of years of experience
is less than five years,

00:00:17.750 --> 00:00:20.040
using a sample of 25 teachers.

00:00:20.040 --> 00:00:22.260
His sample mean was four years

00:00:22.260 --> 00:00:25.460
and his sample standard
deviation was two years.

00:00:25.460 --> 00:00:27.810
Rory wants to use these sample data

00:00:27.810 --> 00:00:30.340
to conduct a t test on the mean.

00:00:30.340 --> 00:00:34.520
Assume that all conditions
for inference have been met.

00:00:34.520 --> 00:00:38.250
Calculate the test
statistic for Rory's test.

00:00:38.250 --> 00:00:40.928
So I always just like to remind
ourselves what's going on,

00:00:40.928 --> 00:00:43.598
so you have your null hypothesis here,

00:00:43.598 --> 00:00:45.915
that the mean number
of years of experience

00:00:45.915 --> 00:00:48.120
for teachers in the district is five

00:00:48.120 --> 00:00:50.350
and then the alternative hypothesis

00:00:50.350 --> 00:00:53.125
is that the mean years of
experience is less than five

00:00:53.125 --> 00:00:55.140
for teachers in the district.

00:00:55.140 --> 00:00:57.510
So if this represents all
the teachers in the district,

00:00:57.510 --> 00:01:01.060
the population, then what
he did is he took a sample

00:01:01.060 --> 00:01:03.960
and says he used a sample of 25 teachers,

00:01:03.960 --> 00:01:07.920
so n here is equal to 25
and then from that sample,

00:01:07.920 --> 00:01:10.220
he was able to calculate some statistics,

00:01:10.220 --> 00:01:13.698
he was able to calculate the sample mean,

00:01:13.698 --> 00:01:15.820
so that sample mean was four years,

00:01:15.820 --> 00:01:17.860
the sample mean was four years

00:01:17.860 --> 00:01:19.860
and then he was also able to calculate

00:01:19.860 --> 00:01:22.120
the sample standard deviation,

00:01:22.120 --> 00:01:26.290
the sample standard deviation
was equal to two years.

00:01:26.290 --> 00:01:28.150
Now the whole point that we do,

00:01:28.150 --> 00:01:30.168
or the main thing we do when
we do significance tests

00:01:30.168 --> 00:01:34.380
is we say alright, if we assume
the null hypothesis is true,

00:01:34.380 --> 00:01:36.880
what's the probability of getting

00:01:37.837 --> 00:01:41.370
a sample mean this low or lower

00:01:41.370 --> 00:01:43.070
and if that probability is below

00:01:43.070 --> 00:01:44.580
a preset significance level,

00:01:44.580 --> 00:01:46.340
then we reject the null hypothesis

00:01:46.340 --> 00:01:48.113
and it suggests the alternative,

00:01:48.113 --> 00:01:50.820
but in order to figure
out that probability,

00:01:50.820 --> 00:01:52.830
we need to figure out a test statistic,

00:01:54.107 --> 00:01:55.662
sometimes we use a z test,

00:01:55.662 --> 00:01:57.516
if we're dealing with proportions,

00:01:57.516 --> 00:02:00.840
but when we deal with means,
we tend to use a t test

00:02:00.840 --> 00:02:02.690
and the reason why is

00:02:02.690 --> 00:02:05.420
if you wanted to figure out a z statistic,

00:02:05.420 --> 00:02:09.620
what you would do is you
would take your sample mean,

00:02:09.620 --> 00:02:12.120
subtract from that the assumed mean

00:02:12.120 --> 00:02:13.874
from the null hypothesis, so mu

00:02:13.874 --> 00:02:16.460
and I'll just put a little
zero, sub zero there,

00:02:16.460 --> 00:02:19.480
so this is the assumed mean
from the null hypothesis

00:02:19.480 --> 00:02:23.320
and then you would want to divide by

00:02:23.320 --> 00:02:28.010
the standard deviation of
the sampling distribution

00:02:28.010 --> 00:02:31.700
of the sample mean, so
you'd wanna divide by that,

00:02:31.700 --> 00:02:33.910
but this, we don't know

00:02:33.910 --> 00:02:37.940
and so that's why instead,
we do a t statistic,

00:02:37.940 --> 00:02:39.037
in which case, we take the difference

00:02:39.037 --> 00:02:42.824
between our sample mean and
our assumed population mean,

00:02:42.824 --> 00:02:46.610
the population parameter
and we try to estimate this

00:02:46.610 --> 00:02:50.450
and we estimate that with
our sample standard deviation

00:02:50.450 --> 00:02:53.004
divided by the square
root of our sample size

00:02:53.004 --> 00:02:54.979
and so if you're inspired,
I encourage you right,

00:02:54.979 --> 00:02:56.359
even if you're not inspired, (laughs)

00:02:56.359 --> 00:02:58.230
I encourage you to pause this video

00:02:58.230 --> 00:03:00.500
and try to calculate this t statistic.

00:03:01.550 --> 00:03:04.460
Well, this is going to
be equal to, let's see,

00:03:04.460 --> 00:03:06.890
our sample mean is four

00:03:06.890 --> 00:03:09.640
minus our assumed mean is five,

00:03:09.640 --> 00:03:12.580
our assumed population mean is five,

00:03:12.580 --> 00:03:15.780
our sample standard deviation is two,

00:03:15.780 --> 00:03:18.920
all of that over the square
root of the sample size,

00:03:18.920 --> 00:03:21.480
all of that over the square root of 25,

00:03:21.480 --> 00:03:24.560
so this is going to be equal,
our numerator is negative one,

00:03:24.560 --> 00:03:28.020
so it's negative one
divided by two over five,

00:03:28.020 --> 00:03:32.775
which is equal to negative
one times five over two

00:03:32.775 --> 00:03:35.310
and so this is going to be equal to,

00:03:35.310 --> 00:03:40.250
equal to negative five
over two or negative 2.5

00:03:41.330 --> 00:03:44.490
and then what we would do
in this, what Rory would do

00:03:44.490 --> 00:03:49.360
is then look this t value up on a t table

00:03:49.360 --> 00:03:53.996
and say, so if look at a
distribution of a t statistic,

00:03:53.996 --> 00:03:56.010
something like that and say,

00:03:56.010 --> 00:03:59.650
okay, we are negative 2.5

00:03:59.650 --> 00:04:01.530
below the mean,

00:04:01.530 --> 00:04:02.590
so negative 2.5

00:04:04.920 --> 00:04:08.088
and so what he would wanna do
is figure out this area here,

00:04:08.088 --> 00:04:10.720
'cause this would be
the probability of being

00:04:10.720 --> 00:04:15.210
that far below the mean or
even further below the mean

00:04:15.210 --> 00:04:17.970
and so that would give us our p value

00:04:17.970 --> 00:04:19.960
and then if that p value is below

00:04:19.960 --> 00:04:21.710
some preset significance level,

00:04:21.710 --> 00:04:24.074
that Rory should have set, maybe 5% or 1%,

00:04:24.074 --> 00:04:25.707
then he'll reject the null hypothesis,

00:04:25.707 --> 00:04:29.020
which would suggest his suspicion

00:04:29.020 --> 00:04:31.626
that the true mean of years of experience

00:04:31.626 --> 00:04:33.913
for the teachers in his
district is less than five.

00:04:33.913 --> 00:04:35.939
Now another really important
thing to keep in mind

00:04:35.939 --> 00:04:38.570
is they told us that assume all conditions

00:04:38.570 --> 00:04:41.299
for inference have been
met and so that's the,

00:04:41.299 --> 00:04:44.460
assuming that this was
truly a random sample,

00:04:44.460 --> 00:04:46.229
that each of the individual observations

00:04:46.229 --> 00:04:49.499
are either truly independent
or roughly independent,

00:04:49.499 --> 00:04:51.810
then maybe he observed
either with replacement

00:04:51.810 --> 00:04:54.170
or it's less than 10% of the population

00:04:54.170 --> 00:04:57.200
and he feels good that
the sampling distribution

00:04:57.200 --> 00:04:58.426
is going to be roughly normal

00:04:58.426 --> 00:05:00.970
and we've talked about
that in other videos.


When to use z or t statistics in significance tests

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:02.227
- [Tutor] What I wanna do in
this video is give a primer,

00:00:02.227 --> 00:00:03.720
I'm thinking about when to use

00:00:03.720 --> 00:00:05.750
a z statistic versus a t statistic,

00:00:05.750 --> 00:00:08.500
when we are doing significance tests.

00:00:08.500 --> 00:00:09.776
So there's two major scenarios

00:00:09.776 --> 00:00:12.940
that we will see in an
introductory statistics class,

00:00:12.940 --> 00:00:15.760
one is when we are
dealing with proportions,

00:00:15.760 --> 00:00:18.400
so I'll write that on the
left side right over here

00:00:18.400 --> 00:00:22.270
and the other is when we
are dealing with means.

00:00:22.270 --> 00:00:23.103
In the proportion case,

00:00:23.103 --> 00:00:25.280
when we are doing our significance test,

00:00:25.280 --> 00:00:27.765
we will set up some null hypothesis,

00:00:27.765 --> 00:00:31.060
that usually deals with
the population proportion,

00:00:31.060 --> 00:00:34.240
we might say it is equal to some value,

00:00:34.240 --> 00:00:36.760
let's just call that P sub one

00:00:36.760 --> 00:00:39.890
and then maybe you have
an alternative hypothesis,

00:00:39.890 --> 00:00:41.960
that, well, no, the population proportion

00:00:41.960 --> 00:00:44.060
is greater than that or less than that

00:00:44.060 --> 00:00:44.893
or it's just not equal to that,

00:00:44.893 --> 00:00:46.090
so let me just go with that one,

00:00:46.090 --> 00:00:49.300
it's not equal to P sub one

00:00:49.300 --> 00:00:51.704
and then what we do to actually test,

00:00:51.704 --> 00:00:53.940
to actually do the significance test

00:00:53.940 --> 00:00:56.478
is we take a sample from the population,

00:00:56.478 --> 00:00:58.287
it's going to have a sample size of n,

00:00:58.287 --> 00:01:00.790
we need to make sure that we feel good

00:01:00.790 --> 00:01:01.910
about making the inference,

00:01:01.910 --> 00:01:03.570
we've talked about the
conditions for inference

00:01:03.570 --> 00:01:05.500
in previous videos multiple times,

00:01:05.500 --> 00:01:09.160
but from this we calculate
the sample proportion

00:01:09.160 --> 00:01:12.000
and then from this, we
calculate the P value

00:01:12.000 --> 00:01:13.209
and the way that we do the P value,

00:01:13.209 --> 00:01:15.330
remember the P value is the probability

00:01:15.330 --> 00:01:19.520
of getting a sample proportion
at least this extreme

00:01:19.520 --> 00:01:21.290
and if it's below some threshold,

00:01:21.290 --> 00:01:24.680
we reject the null hypothesis
and suggest the alternative

00:01:24.680 --> 00:01:26.560
and over here the way we do that

00:01:26.560 --> 00:01:29.820
is well, we find an associated z value

00:01:29.820 --> 00:01:32.847
for that P for that sample proportion

00:01:32.847 --> 00:01:34.820
and the way that we calculate it,

00:01:34.820 --> 00:01:37.580
we say, okay look, our z is going to be,

00:01:37.580 --> 00:01:40.050
how many of the sampling distributions

00:01:40.050 --> 00:01:42.194
standard deviations are
we away from the mean

00:01:42.194 --> 00:01:45.350
and remember the mean of
the sampling distribution

00:01:45.350 --> 00:01:48.320
is going to be the population proportion,

00:01:48.320 --> 00:01:51.290
so here we've got this sample statistic,

00:01:51.290 --> 00:01:52.322
this sample proportion,

00:01:52.322 --> 00:01:54.905
the difference between that
and the assumed proportion,

00:01:54.905 --> 00:01:56.977
remember when we do
these significance tests,

00:01:56.977 --> 00:01:58.680
we try to figure out the probability

00:01:58.680 --> 00:02:01.090
assuming the null hypothesis is true

00:02:01.090 --> 00:02:03.250
and so when we see this P sub zero,

00:02:03.250 --> 00:02:06.390
this is the assumed proportion
from the null hypothesis,

00:02:06.390 --> 00:02:08.830
so that's the difference
between these two,

00:02:08.830 --> 00:02:10.952
the sample proportion and
the assumed proportion

00:02:10.952 --> 00:02:14.410
and then you'd wanna divide
it by what's often known as

00:02:14.410 --> 00:02:16.120
the standard error of the statistic,

00:02:16.120 --> 00:02:19.070
which is just the standard deviation

00:02:19.070 --> 00:02:22.550
of the sampling distribution
of the sample proportion

00:02:22.550 --> 00:02:25.000
and this works out well
for our proportions,

00:02:25.000 --> 00:02:28.220
because in proportions, I
can figure out what this is,

00:02:28.220 --> 00:02:32.080
this is going to be
equal to the square root

00:02:32.080 --> 00:02:35.750
of the assumed population
proportion times one

00:02:35.750 --> 00:02:39.824
minus the assumed population
proportion, all of that over n

00:02:39.824 --> 00:02:42.920
and then I would use this z statistic

00:02:42.920 --> 00:02:44.342
to figure out the P
value and in this case,

00:02:44.342 --> 00:02:46.657
I would look at both
tails of the distribution,

00:02:46.657 --> 00:02:48.510
because I care about how far I am

00:02:48.510 --> 00:02:53.023
either above or below the
assumed population proportion.

00:02:53.023 --> 00:02:56.860
Now with means, there's
definitely some similarities here,

00:02:56.860 --> 00:02:58.750
you will make a null hypothesis,

00:02:58.750 --> 00:03:03.750
maybe you assume the population
mean is equal to mu one

00:03:03.948 --> 00:03:07.120
and then there's going to be
an alternative hypothesis,

00:03:07.120 --> 00:03:11.526
that maybe your population
mean is not equal to mu one

00:03:11.526 --> 00:03:13.581
and you're gonna do something very simple,

00:03:13.581 --> 00:03:17.540
you take your population,
you take a sample of size n

00:03:17.540 --> 00:03:19.620
and instead of calculating
a sample proportion,

00:03:19.620 --> 00:03:21.169
you calculate a sample mean

00:03:21.169 --> 00:03:23.280
and actually you can
calculate other things,

00:03:23.280 --> 00:03:27.560
like a sample standard deviation,

00:03:27.560 --> 00:03:28.760
but now you have an issue,

00:03:28.760 --> 00:03:31.730
you say, well ideally I
would use a z statistic

00:03:31.730 --> 00:03:33.262
and you could, if you were able to say,

00:03:33.262 --> 00:03:37.040
well I could take the difference
between my sample mean

00:03:37.040 --> 00:03:40.046
and the assumed mean
in the null hypothesis,

00:03:40.046 --> 00:03:41.449
so that would be this right over here,

00:03:41.449 --> 00:03:42.480
that's what that zero means,

00:03:42.480 --> 00:03:45.040
the assumed mean from the null hypothesis

00:03:45.040 --> 00:03:48.857
and I would then divide by the
standard error of the mean,

00:03:48.857 --> 00:03:52.480
which is another way of
saying the standard deviation

00:03:52.480 --> 00:03:56.800
of the sampling distribution
of the sample mean,

00:03:56.800 --> 00:03:59.039
but this is not so easy to figure out,

00:03:59.039 --> 00:04:00.810
in order to figure out this,

00:04:00.810 --> 00:04:02.710
this is going to be the standard deviation

00:04:02.710 --> 00:04:04.330
of the underlying population

00:04:04.330 --> 00:04:06.150
divided by the square root of n.

00:04:06.150 --> 00:04:08.977
We know what n is going to
be, if we conducted a sample,

00:04:08.977 --> 00:04:12.160
but we don't know what
the standard deviation is,

00:04:12.160 --> 00:04:15.700
so instead what we do is we estimate this

00:04:15.700 --> 00:04:18.930
and so we'll take the sample mean,

00:04:18.930 --> 00:04:22.851
we subtract from that the
assumed population mean

00:04:22.851 --> 00:04:24.520
from the null hypothesis

00:04:24.520 --> 00:04:27.073
and we divide by an estimate of this,

00:04:27.073 --> 00:04:29.860
which is going to be our
sample standard deviation

00:04:29.860 --> 00:04:31.940
divided by the square root of n,

00:04:31.940 --> 00:04:34.130
but because this is an estimate,

00:04:34.130 --> 00:04:35.820
we actually get a better result,

00:04:35.820 --> 00:04:38.200
instead of saying, hey,
this is an estimate

00:04:38.200 --> 00:04:41.600
of our z statistic, we will
call this our t statistic

00:04:41.600 --> 00:04:45.620
and as we will see, we will
then look this up in a t table

00:04:45.620 --> 00:04:49.570
and this will give us a better
sense of the probability.


Conditions for a t test about a mean

WEBVTT
Kind: captions
Language: en

00:00:00.710 --> 00:00:04.249
- [Instructor] Sunil and his
friends have been using a group

00:00:04.249 --> 00:00:06.580
messaging app for over a
year to chat with each other.

00:00:06.580 --> 00:00:10.390
He suspects that, on
average, they send more than

00:00:10.390 --> 00:00:13.230
100 messages per day.

00:00:13.230 --> 00:00:15.830
Sunil takes a random sample of seven days

00:00:15.830 --> 00:00:18.710
from their chat history and
records how many messages

00:00:18.710 --> 00:00:20.700
were sent on those days.

00:00:20.700 --> 00:00:23.840
The sample data are
strongly skewed to the right

00:00:23.840 --> 00:00:28.350
with a mean of 125 messages
and a standard deviation

00:00:28.350 --> 00:00:29.770
of 44 messages.

00:00:29.770 --> 00:00:33.170
He wants to use these
sample data to conduct

00:00:33.170 --> 00:00:35.736
a t test about the mean.

00:00:35.736 --> 00:00:39.610
Which conditions for performing this type

00:00:39.610 --> 00:00:42.930
of significance test have been met?

00:00:42.930 --> 00:00:44.590
So let's just think about
what's going on here.

00:00:44.590 --> 00:00:47.980
Sunil might have some
type of a null hypothesis.

00:00:47.980 --> 00:00:50.600
Maybe he got this 100, maybe
he read a magazine article

00:00:50.600 --> 00:00:52.590
that says, that on average,
the average teenagers

00:00:52.590 --> 00:00:54.850
sends a 100 text messages per day.

00:00:54.850 --> 00:00:57.780
And so maybe the null hypothesis
is that the mean amount

00:00:57.780 --> 00:01:00.370
of messages per day that
he and his friend send,

00:01:00.370 --> 00:01:03.910
which was signified by
mu, maybe the null is 100,

00:01:03.910 --> 00:01:06.120
that they're no different
than all other teenagers.

00:01:06.120 --> 00:01:08.140
And maybe he suspects,

00:01:08.140 --> 00:01:09.790
and actually they say it right over here,

00:01:09.790 --> 00:01:12.723
his alternative hypothesis
would be what he suspects.

00:01:12.723 --> 00:01:17.723
That they send more than
100 text messages per day.

00:01:18.510 --> 00:01:21.280
And so what he does, is he takes a sample

00:01:21.280 --> 00:01:25.370
from the population of
days, and there's over 365.

00:01:25.370 --> 00:01:27.500
They said they've been using
the group messaging app

00:01:27.500 --> 00:01:28.970
for over a year.

00:01:28.970 --> 00:01:31.042
And he takes seven of those days.

00:01:31.042 --> 00:01:34.730
So, n is equal to seven.

00:01:34.730 --> 00:01:38.930
And from that he calculates
sample statistics.

00:01:38.930 --> 00:01:43.280
He calculates the sample mean,
which is trying to estimate

00:01:43.280 --> 00:01:46.650
the true population mean, right over here.

00:01:46.650 --> 00:01:48.910
And he also is able to calculate

00:01:48.910 --> 00:01:51.050
a sample standard deviation.

00:01:51.050 --> 00:01:53.820
And what you do in a significance test

00:01:53.820 --> 00:01:55.760
is you say, well what is the probability

00:01:55.760 --> 00:01:59.240
of getting this sample mean or
something even more extreme,

00:01:59.240 --> 00:02:01.260
assuming the null hypothesis.

00:02:01.260 --> 00:02:05.280
And if that probability is
below a preset threshold,

00:02:05.280 --> 00:02:07.420
then you would reject the null hypothesis

00:02:07.420 --> 00:02:09.920
and it would suggest the alternative.

00:02:09.920 --> 00:02:12.510
But in order to feel good
about that significance test

00:02:12.510 --> 00:02:16.124
and be able to even calculate
that p-value with confidence.

00:02:16.124 --> 00:02:19.170
There are conditions for performing

00:02:19.170 --> 00:02:21.390
this type of significance test.

00:02:21.390 --> 00:02:24.460
The first is, that this
truly a random sample.

00:02:24.460 --> 00:02:27.490
And that's known as the random condition.

00:02:27.490 --> 00:02:30.290
And you've seen this before
when we did significance tests

00:02:30.290 --> 00:02:32.518
with proportions, here
we're doing it with means.

00:02:32.518 --> 00:02:36.050
Population mean, sample
mean, in the past we did it

00:02:36.050 --> 00:02:38.910
with population proportion
and sample proportion.

00:02:38.910 --> 00:02:40.810
Well the random condition,
it says it right here,

00:02:40.810 --> 00:02:43.120
Sunil takes a random sample of seven days

00:02:43.120 --> 00:02:44.310
from their chat history.

00:02:44.310 --> 00:02:46.307
They don't say how they did it,

00:02:46.307 --> 00:02:47.140
but we'll just take their word for it,

00:02:47.140 --> 00:02:49.520
that it was a random sample.

00:02:49.520 --> 00:02:52.611
The next condition is sometimes
known as the independence,

00:02:52.611 --> 00:02:57.269
independence condition, and
that's that the individual

00:02:57.269 --> 00:03:01.890
observations in our sample
are roughly independent.

00:03:01.890 --> 00:03:04.030
One way that they would
be independent for sure

00:03:04.030 --> 00:03:06.990
is if Sunil is sampling with replacement.

00:03:06.990 --> 00:03:09.750
They don't say that,
but another condition,

00:03:09.750 --> 00:03:14.260
so either could have replacement,
sampling with replacement.

00:03:14.260 --> 00:03:17.360
Or another way where you
could feel it's roughly

00:03:17.360 --> 00:03:21.740
independent is if you're
sample size is less than

00:03:21.740 --> 00:03:26.740
or equal to 10% of the population.

00:03:26.760 --> 00:03:28.923
Now in this situation, he took seven,

00:03:28.923 --> 00:03:31.770
he took a sample size of seven.

00:03:31.770 --> 00:03:34.330
And then the population of
days, it says that they've been

00:03:34.330 --> 00:03:37.520
using the group messaging
app for over a year.

00:03:37.520 --> 00:03:40.540
So they've been using
it for over 365 days.

00:03:40.540 --> 00:03:44.690
So seven is for sure less
than or equal to 10% of 365,

00:03:44.690 --> 00:03:46.500
which would be 36.5.

00:03:46.500 --> 00:03:49.227
So we meet this condition,
which allows us to meet

00:03:49.227 --> 00:03:51.107
the independence condition.

00:03:51.107 --> 00:03:53.110
Now the last condition is often known

00:03:53.110 --> 00:03:55.550
as the normal condition.

00:03:55.550 --> 00:03:58.327
And this is to feel good that
the sampling distribution

00:03:58.327 --> 00:04:01.250
of the sample means, right over here,

00:04:01.250 --> 00:04:03.920
is approximately normal.

00:04:03.920 --> 00:04:05.720
And this is going to be
a little bit different

00:04:05.720 --> 00:04:07.370
than what we saw with significance test

00:04:07.370 --> 00:04:09.270
when we dealt with proportions.

00:04:09.270 --> 00:04:12.090
There's a few ways to feel good

00:04:12.090 --> 00:04:15.020
that the sampling distribution
of the sample means

00:04:15.020 --> 00:04:16.240
is normal.

00:04:16.240 --> 00:04:19.470
One is, is the underlying
parent population normal.

00:04:19.470 --> 00:04:24.470
So parent population normal.

00:04:25.390 --> 00:04:28.210
Now they don't tell us
anything that there's actually

00:04:28.210 --> 00:04:31.906
a normal distribution
for the amount of time

00:04:31.906 --> 00:04:34.879
that they spend on a given day.

00:04:34.879 --> 00:04:36.670
So we don't know this one for sure.

00:04:36.670 --> 00:04:38.770
But sometimes you might.

00:04:38.770 --> 00:04:41.840
Another way is to feel
good that our sample size

00:04:41.840 --> 00:04:43.560
is greater than or equal to 30.

00:04:43.560 --> 00:04:45.510
And this comes from the
central limit theorem

00:04:45.510 --> 00:04:48.560
that then our sampling
distribution is going to be

00:04:48.560 --> 00:04:50.010
roughly normal.

00:04:50.010 --> 00:04:52.205
But we see very clearly our
sample is not greater than

00:04:52.205 --> 00:04:55.063
or equal to 30, so we don't
meet that constraint either.

00:04:55.063 --> 00:04:58.066
Now the third way that we could feel good

00:04:58.066 --> 00:05:00.359
that our sampling distribution
of our sample mean

00:05:00.359 --> 00:05:04.848
is roughly normal, is if our sample,

00:05:04.848 --> 00:05:09.848
is if our sample is symmetric
and there are no outliers,

00:05:15.330 --> 00:05:18.800
or maybe say no significance outliers.

00:05:18.800 --> 00:05:21.060
Now is this the case?

00:05:21.060 --> 00:05:23.750
Well it says right over here,
the sample data are strongly

00:05:23.750 --> 00:05:27.830
skewed to the right with
a mean of 125 messages

00:05:27.830 --> 00:05:30.000
and a standard deviation of 44 messages.

00:05:30.000 --> 00:05:32.230
So this strongly skewed to the right,

00:05:32.230 --> 00:05:36.080
it's clearly not a symmetric sample data.

00:05:36.080 --> 00:05:39.810
And so we don't meet any
of these sub-conditions

00:05:39.810 --> 00:05:41.340
for the normal condition.

00:05:41.340 --> 00:05:44.530
And so we do not meet the normal condition

00:05:44.530 --> 00:05:46.500
for our significance test.


Writing hypotheses for a significance test about a mean

WEBVTT
Kind: captions
Language: en

00:00:00.410 --> 00:00:02.040
- [Instructor] A quality control expert

00:00:02.040 --> 00:00:04.790
at a drink bottling factory
took a random sample

00:00:04.790 --> 00:00:08.090
of bottles from a batch and
measured the amount of liquid

00:00:08.090 --> 00:00:10.780
in each bottle in the sample.

00:00:10.780 --> 00:00:15.620
The amounts in the sample
had a mean of 503 milliliters

00:00:15.620 --> 00:00:18.800
and a standard deviation
of five milliliters.

00:00:18.800 --> 00:00:21.430
They want to test if this
is convincing evidence

00:00:21.430 --> 00:00:24.500
that the mean amount for
bottles in this batch

00:00:24.500 --> 00:00:28.520
is different than the target
value of 500 milliliters.

00:00:28.520 --> 00:00:31.430
Let mu be the mean amount of liquid

00:00:31.430 --> 00:00:33.460
in each bottle in the batch.

00:00:33.460 --> 00:00:35.950
Write an appropriate set of hypotheses

00:00:35.950 --> 00:00:37.620
for their significance test,

00:00:37.620 --> 00:00:39.140
for the significance test that the quality

00:00:39.140 --> 00:00:41.990
control expert is running.

00:00:41.990 --> 00:00:44.220
So pause this video and
see if you can do that.

00:00:44.220 --> 00:00:45.400
Now, let's do this together.

00:00:45.400 --> 00:00:47.930
So first, you're going
to have two hypotheses.

00:00:47.930 --> 00:00:49.750
You're gonna have your null hypothesis

00:00:49.750 --> 00:00:51.950
and your alternative hypothesis.

00:00:51.950 --> 00:00:54.346
Your null hypothesis is
going to be a hypothesis

00:00:54.346 --> 00:00:58.760
about the population
parameter that you care about

00:00:58.760 --> 00:01:01.310
and it's going to assume
kind of the status quo.

00:01:01.310 --> 00:01:02.550
No news here.

00:01:02.550 --> 00:01:04.620
And so the parameter that we care about

00:01:04.620 --> 00:01:08.700
is the mean amount of liquid
in the bottles in the batch.

00:01:08.700 --> 00:01:11.140
So that's mu right over there.

00:01:11.140 --> 00:01:13.650
And what would be the
assumption that that would be,

00:01:13.650 --> 00:01:15.930
the no news here?

00:01:15.930 --> 00:01:17.610
Well, it would be 500 milliliters.

00:01:17.610 --> 00:01:18.990
That's the target value.

00:01:18.990 --> 00:01:20.570
So, it's reasonable to say,

00:01:20.570 --> 00:01:23.480
well, the null is doing
what it's supposed to,

00:01:23.480 --> 00:01:26.660
that where the actual mean for the batch

00:01:26.660 --> 00:01:28.530
is actually what the target needs to be,

00:01:28.530 --> 00:01:31.580
it's actually 500 milliliters.

00:01:31.580 --> 00:01:32.500
Some of you might have said,

00:01:32.500 --> 00:01:34.010
hey wait, didn't they say the amounts

00:01:34.010 --> 00:01:36.970
in the sample had a
mean of 503 milliliters?

00:01:36.970 --> 00:01:39.470
Why isn't this 503?

00:01:39.470 --> 00:01:41.320
Remember, your hypothesis is going to be

00:01:41.320 --> 00:01:42.970
about the population parameter.

00:01:42.970 --> 00:01:45.780
Your assumption about
the population parameter.

00:01:45.780 --> 00:01:48.240
This 503 milliliters right over here,

00:01:48.240 --> 00:01:50.070
this is a sample statistic.

00:01:50.070 --> 00:01:52.570
This is a sample mean
that's trying to estimate

00:01:52.570 --> 00:01:54.410
this thing right over here.

00:01:54.410 --> 00:01:56.510
When we do our significance test,

00:01:56.510 --> 00:01:59.930
we're going to incorporate
this 503 milliliters.

00:01:59.930 --> 00:02:00.840
We're going to think about,

00:02:00.840 --> 00:02:04.380
well, what's the probability
of getting a sample statistic,

00:02:04.380 --> 00:02:07.590
a sample mean this far or further away

00:02:07.590 --> 00:02:10.090
from the assumed mean if we assume

00:02:10.090 --> 00:02:11.630
that the null hypothesis is true,

00:02:11.630 --> 00:02:13.670
and if that probability
is below a threshold,

00:02:13.670 --> 00:02:16.460
our significance level, then
we reject the null hypothesis

00:02:16.460 --> 00:02:18.440
and it would suggest the alternative.

00:02:18.440 --> 00:02:20.680
But if we're just trying to generate

00:02:20.680 --> 00:02:22.670
or write a set of
hypotheses, this would be

00:02:22.670 --> 00:02:26.090
our null hypothesis, and then
our alternative hypothesis

00:02:26.090 --> 00:02:28.140
is that the true mean for the batch

00:02:28.140 --> 00:02:33.120
is something different
than 500 milliliters.


Calculating a P-value given a z statistic

WEBVTT
Kind: captions
Language: en

00:00:00.320 --> 00:00:01.760
- [Instructor] Fay read
an article that said

00:00:01.760 --> 00:00:05.030
26% of Americans can speak
more than one language.

00:00:05.030 --> 00:00:07.160
She was curious if this
figure was higher in her city,

00:00:07.160 --> 00:00:09.510
so she tested her null hypothesis

00:00:09.510 --> 00:00:10.610
that the proportion in her city

00:00:10.610 --> 00:00:13.090
is the same as all Americans, 26%.

00:00:13.090 --> 00:00:14.970
Her alternative hypothesis
is it's actually

00:00:14.970 --> 00:00:16.360
greater than 26%,

00:00:16.360 --> 00:00:19.110
where P represents the
proportion of people in her city

00:00:19.110 --> 00:00:21.080
that can speak more than one language.

00:00:21.080 --> 00:00:24.150
She found that 40 of 120 people sampled

00:00:24.150 --> 00:00:26.090
could speak more than one language.

00:00:26.090 --> 00:00:29.290
So what's going on is here's
the population of her city,

00:00:29.290 --> 00:00:30.560
she took a sample,

00:00:30.560 --> 00:00:34.400
her sample size is 120.

00:00:34.400 --> 00:00:37.840
And then she calculates
her sample proportion

00:00:37.840 --> 00:00:42.840
which is 40 out of 120 and this is going

00:00:43.350 --> 00:00:44.770
to be equal to one-third,

00:00:44.770 --> 00:00:48.610
which is approximately equal to 0.33.

00:00:48.610 --> 00:00:51.300
And then she calculates the test statistic

00:00:51.300 --> 00:00:56.221
for these results was Z is
approximately equal to 1.83.

00:00:56.221 --> 00:00:57.631
We do this in other videos,

00:00:57.631 --> 00:01:00.470
but just as a reminder
of how she gets this,

00:01:00.470 --> 00:01:01.970
she's really trying to say well how many

00:01:01.970 --> 00:01:06.270
standard deviations above
the assumed proportion,

00:01:06.270 --> 00:01:08.070
remember when we're doing
these significance tests

00:01:08.070 --> 00:01:10.250
we're assuming that the
null hypothesis is true

00:01:10.250 --> 00:01:12.500
and then we figure out
well what's the probability

00:01:12.500 --> 00:01:14.430
of getting something at least this extreme

00:01:14.430 --> 00:01:16.710
or this extreme or more?

00:01:16.710 --> 00:01:18.180
And then if it's below a threshold,

00:01:18.180 --> 00:01:19.890
then we would reject the null hypothesis

00:01:19.890 --> 00:01:21.854
which would suggest the alternative.

00:01:21.854 --> 00:01:23.960
But that's what this Z statistic is,

00:01:23.960 --> 00:01:26.440
is how many standard deviations above

00:01:26.440 --> 00:01:28.190
the assumed proportion is that?

00:01:28.190 --> 00:01:29.178
So the Z statistic,

00:01:29.178 --> 00:01:31.340
and we did this in previous videos,

00:01:31.340 --> 00:01:33.330
you would find the
difference between this,

00:01:33.330 --> 00:01:34.620
what we got for our sample,

00:01:34.620 --> 00:01:35.600
our sample proportion,

00:01:35.600 --> 00:01:37.480
and the assumed true proportion.

00:01:37.480 --> 00:01:41.301
So 0.33 minus 0.26,

00:01:41.301 --> 00:01:45.480
all of that over the standard deviation

00:01:45.480 --> 00:01:48.420
of the sampling distribution
of the sample proportions.

00:01:48.420 --> 00:01:50.520
And we've seen that in previous videos.

00:01:50.520 --> 00:01:53.700
That is just going to be
the assumed proportion,

00:01:53.700 --> 00:01:54.990
so it would be just this.

00:01:54.990 --> 00:01:57.610
It would be the assumed
population proportion times one,

00:01:57.610 --> 00:02:01.290
minus the assumed population
proportion over N.

00:02:01.290 --> 00:02:03.400
In this particular situation,

00:02:03.400 --> 00:02:07.460
that would be 0.26 times one,

00:02:07.460 --> 00:02:09.324
minus 0.26,

00:02:09.324 --> 00:02:12.440
all of that over our N,

00:02:12.440 --> 00:02:15.020
that's our sample size, 120.

00:02:15.020 --> 00:02:16.580
And if you calculate this,

00:02:16.580 --> 00:02:20.430
this should give us approximately 1.83.

00:02:20.430 --> 00:02:22.410
So they did all of that for us.

00:02:22.410 --> 00:02:23.840
And they say assuming that

00:02:23.840 --> 00:02:25.810
the necessary conditions are met,

00:02:25.810 --> 00:02:27.970
they're talking about
the necessary conditions

00:02:27.970 --> 00:02:29.730
to assume that the sampling distribution

00:02:29.730 --> 00:02:32.800
of the sample proportions
is roughly normal

00:02:32.800 --> 00:02:34.260
and that's the random condition,

00:02:34.260 --> 00:02:35.093
the normal condition,

00:02:35.093 --> 00:02:35.960
the independence condition

00:02:35.960 --> 00:02:38.180
that we have talk about in the past.

00:02:38.180 --> 00:02:40.122
What is the approximate P value?

00:02:40.122 --> 00:02:42.020
Well this P value,

00:02:42.020 --> 00:02:45.538
this is the P value would be equal to

00:02:45.538 --> 00:02:49.450
the probability of in
a normal distribution,

00:02:49.450 --> 00:02:52.440
we're assuming that the
sampling distribution is normal

00:02:52.440 --> 00:02:54.380
'cause we met the necessary conditions,

00:02:54.380 --> 00:02:56.300
so in a normal distribution,

00:02:56.300 --> 00:02:58.140
what is the probability of getting a Z

00:02:58.140 --> 00:03:01.520
greater than or equal to 1.83?

00:03:01.520 --> 00:03:03.300
So to help us visualize this,

00:03:04.270 --> 00:03:06.220
let's visualize what the sampling

00:03:06.220 --> 00:03:07.360
distribution would look like.

00:03:07.360 --> 00:03:10.490
We're assuming it is roughly normal.

00:03:10.490 --> 00:03:13.590
The mean of the sampling
distribution right over here

00:03:13.590 --> 00:03:17.200
would be the assumed
population proportion,

00:03:17.200 --> 00:03:18.520
so that would be P not.

00:03:18.520 --> 00:03:19.590
When we put that little zero there

00:03:19.590 --> 00:03:21.730
that means the assumed population

00:03:21.730 --> 00:03:23.832
proportion from the null hypothesis,

00:03:23.832 --> 00:03:26.590
and that's 0.26,

00:03:26.590 --> 00:03:29.450
and this result that
we got from our sample

00:03:29.450 --> 00:03:32.080
is 1.83 standard deviations above

00:03:32.080 --> 00:03:34.420
the mean of the sampling distribution.

00:03:34.420 --> 00:03:36.350
So 1.83.

00:03:36.350 --> 00:03:39.600
So that would be 1.83 standard deviations.

00:03:39.600 --> 00:03:40.860
And so what we wanna do,

00:03:40.860 --> 00:03:44.210
this probability is this area under

00:03:44.210 --> 00:03:45.773
our normal curve right here.

00:03:45.773 --> 00:03:49.170
So now let's get our Z table.

00:03:49.170 --> 00:03:51.570
So notice this Z table gives us

00:03:51.570 --> 00:03:55.010
the area to the left of a certain Z value.

00:03:55.010 --> 00:03:58.660
We wanted it to the right
of a certain Z value.

00:03:58.660 --> 00:04:01.430
But a normal distribution is symmetric.

00:04:01.430 --> 00:04:04.360
So instead of saying anything
greater than or equal to

00:04:04.360 --> 00:04:07.750
1.83 standard deviations above the mean,

00:04:07.750 --> 00:04:09.940
we could say anything
less than or equal to

00:04:09.940 --> 00:04:12.470
1.83 standard deviations below the means.

00:04:12.470 --> 00:04:15.080
So this is negative 1.83.

00:04:15.080 --> 00:04:16.700
And so we could look at that

00:04:16.700 --> 00:04:19.710
on this Z table right over here,

00:04:19.710 --> 00:04:22.460
negative 1.8,

00:04:25.640 --> 00:04:30.640
negative 1.83 is this right over here.

00:04:32.090 --> 00:04:36.350
So 0.0336.

00:04:36.350 --> 00:04:37.990
So there we have it.

00:04:37.990 --> 00:04:42.040
So this is approximately 0.0336

00:04:43.890 --> 00:04:47.310
or a little over 3% or
a little less than 4%.

00:04:47.310 --> 00:04:49.910
And so what Fay would
then do is compare that

00:04:49.910 --> 00:04:51.770
to the significance level that she should

00:04:51.770 --> 00:04:54.760
have set before conducting
this significance test.

00:04:54.760 --> 00:04:58.560
And so if her significance
level was say 5%,

00:04:58.560 --> 00:05:00.849
well then that situation
since this is lower

00:05:00.849 --> 00:05:02.534
that that significance level,

00:05:02.534 --> 00:05:05.480
she would be able to
reject the null hypothesis.

00:05:05.480 --> 00:05:07.190
She would say hey the probability

00:05:07.190 --> 00:05:09.050
of getting this result assuming

00:05:09.050 --> 00:05:11.130
that the null hypothesis is true,

00:05:11.130 --> 00:05:12.880
is below my threshold.

00:05:12.880 --> 00:05:13.940
It's quite low.

00:05:13.940 --> 00:05:15.670
And so I will reject it

00:05:15.670 --> 00:05:17.450
and it would suggest the alternative.

00:05:17.450 --> 00:05:19.550
However, if her
significance level was lower

00:05:19.550 --> 00:05:20.610
than this for whatever reason,

00:05:20.610 --> 00:05:22.830
if she has say a 1% significance level,

00:05:22.830 --> 00:05:25.820
then she would fail to
reject the null hypothesis.


Making conclusions in a test about a proportion

WEBVTT
Kind: captions
Language: en

00:00:00.290 --> 00:00:01.750
- [Instructor] A public opinion survey

00:00:01.750 --> 00:00:03.480
investigated whether a majority,

00:00:03.480 --> 00:00:05.240
more than 50 % of adults,

00:00:05.240 --> 00:00:07.860
supported a tax increase to help fund

00:00:07.860 --> 00:00:09.550
the local school system.

00:00:09.550 --> 00:00:11.920
A random sample of 200 adults

00:00:11.920 --> 00:00:14.940
showed that 113 of those sampled

00:00:14.940 --> 00:00:17.350
supported the tax increase.

00:00:17.350 --> 00:00:19.496
Researchers used these results to test

00:00:19.496 --> 00:00:23.207
the null hypothesis is
that the proportion is 0.5.

00:00:23.207 --> 00:00:25.100
The alternative hypothesis is that

00:00:25.100 --> 00:00:28.700
it's greater than 0.5 where
P is the true proportion

00:00:28.700 --> 00:00:31.650
of adults that support the tax increase.

00:00:31.650 --> 00:00:35.520
They calculated a test statistic of Z

00:00:35.520 --> 00:00:38.810
is approximately equal to
1.84 and a corresponding

00:00:38.810 --> 00:00:42.950
P value of approximately 0.033.

00:00:42.950 --> 00:00:45.340
Assuming the conditions
for inference were met,

00:00:45.340 --> 00:00:47.690
which of these is an
appropriate conclusion?

00:00:47.690 --> 00:00:49.350
And we have our four conclusions here.

00:00:49.350 --> 00:00:51.950
At any point in encourage
you to pause this video

00:00:51.950 --> 00:00:54.920
and see if you can answer it for yourself,

00:00:54.920 --> 00:00:56.990
but now we will do it together.

00:00:56.990 --> 00:00:59.130
And just to make sure we
understand what's going on,

00:00:59.130 --> 00:01:02.200
before we even cut to the
chase and get to the answer.

00:01:02.200 --> 00:01:05.440
So what we do is we have this population

00:01:05.440 --> 00:01:07.690
and we are going to sample it.

00:01:07.690 --> 00:01:10.630
So N is equal to 200.

00:01:10.630 --> 00:01:12.410
From that sample we can calculate

00:01:12.410 --> 00:01:14.740
a sample proportion of adults

00:01:14.740 --> 00:01:16.490
that support the tax increase.

00:01:16.490 --> 00:01:20.600
We see 113 out of 200 support it,

00:01:20.600 --> 00:01:23.370
which is going to be equal to,

00:01:23.370 --> 00:01:28.370
let's see that is the same thing as 56.5%.

00:01:28.840 --> 00:01:33.840
So 56.5% and so the key is
to figure out the P value.

00:01:35.170 --> 00:01:37.640
What is the probability of getting

00:01:37.640 --> 00:01:41.320
a result this much above the assumed

00:01:41.320 --> 00:01:42.720
proportion or greater,

00:01:42.720 --> 00:01:45.640
at least this much above
the assumed proportion?

00:01:45.640 --> 00:01:48.900
If we assume that the
null hypothesis is true.

00:01:48.900 --> 00:01:50.230
And if that probability,

00:01:50.230 --> 00:01:53.790
if that P value is below
a preset threshold,

00:01:53.790 --> 00:01:55.480
if it's below our significance level,

00:01:55.480 --> 00:01:56.690
they haven't told it to us yet,

00:01:56.690 --> 00:01:59.370
it looks like they're gonna
give some in the choices,

00:01:59.370 --> 00:02:01.580
well then we would reject
the null hypothesis

00:02:01.580 --> 00:02:03.211
which would suggest the alternative.

00:02:03.211 --> 00:02:06.468
If the P value is not lower than this,

00:02:06.468 --> 00:02:09.860
then we will fail to
reject the null hypothesis.

00:02:09.860 --> 00:02:11.460
Now to calculate that P value,

00:02:11.460 --> 00:02:12.981
to calculate that probability,

00:02:12.981 --> 00:02:14.968
what we figure out is how many

00:02:14.968 --> 00:02:17.287
in our sampling distribution,

00:02:17.287 --> 00:02:19.960
how many standard deviations above

00:02:19.960 --> 00:02:21.580
the mean of the sampling distribution

00:02:21.580 --> 00:02:23.130
and the mean of the sampling distribution

00:02:23.130 --> 00:02:26.260
would be our assumed
population proportion,

00:02:26.260 --> 00:02:28.451
how many standard deviations above

00:02:28.451 --> 00:02:31.280
that mean is this right over here?

00:02:31.280 --> 00:02:34.180
And that is what this test statistic is.

00:02:34.180 --> 00:02:37.390
And then we can use this
to look at a Z table

00:02:37.390 --> 00:02:38.250
and say all right,

00:02:38.250 --> 00:02:40.708
well in a normal
distribution what percentage

00:02:40.708 --> 00:02:43.350
or what is the area under the normal curve

00:02:43.350 --> 00:02:47.550
that is further than
1.84 standard deviations

00:02:47.550 --> 00:02:50.335
or at least 1.84 or
more standard deviations

00:02:50.335 --> 00:02:52.120
above the mean?

00:02:52.120 --> 00:02:53.910
And they did for us as well.

00:02:53.910 --> 00:02:56.230
So really what we just need to do

00:02:56.230 --> 00:02:59.230
is compare this P value right over here

00:02:59.230 --> 00:03:00.900
to the significance level.

00:03:00.900 --> 00:03:05.570
If the P value is less than
our significance level,

00:03:05.570 --> 00:03:07.303
then we reject,

00:03:07.303 --> 00:03:09.470
reject our null hypothesis.

00:03:09.470 --> 00:03:12.030
And that would suggest the alternative.

00:03:12.030 --> 00:03:13.110
If this is not true,

00:03:13.110 --> 00:03:16.090
then we would fail to
reject the null hypothesis.

00:03:16.090 --> 00:03:17.220
So let's look at these choices

00:03:17.220 --> 00:03:18.700
and if you didn't answer
it the first time,

00:03:18.700 --> 00:03:21.390
I encourage you to pause the video again.

00:03:22.700 --> 00:03:27.220
So at the alpha is equal
to 0.01 significance level,

00:03:27.220 --> 00:03:30.290
they should conclude that more than 50%

00:03:30.290 --> 00:03:32.720
of adults support the tax increase.

00:03:32.720 --> 00:03:35.770
So if the alpha is 1/100,

00:03:35.770 --> 00:03:39.310
the P value right over here is over 3/100.

00:03:39.310 --> 00:03:41.250
It's roughly 3.3%.

00:03:41.250 --> 00:03:44.038
So this is a situation where our P value,

00:03:44.038 --> 00:03:48.160
our P value is greater
than or equal to alpha.

00:03:48.160 --> 00:03:50.390
In fact it's definitely
greater than alpha here

00:03:50.390 --> 00:03:55.277
and so here we would fail to reject,

00:03:55.277 --> 00:03:58.840
we would fail to reject
our null hypothesis.

00:03:58.840 --> 00:04:01.090
And so we wouldn't
conclude that more than 50%

00:04:01.090 --> 00:04:02.420
of adults supported the tax increase.

00:04:02.420 --> 00:04:04.520
'cause remember our null
hypothesis is that 50% do

00:04:04.520 --> 00:04:05.910
and we're failing to reject this.

00:04:05.910 --> 00:04:07.490
So that's not gonna be true.

00:04:07.490 --> 00:04:08.970
At that same significance level,

00:04:08.970 --> 00:04:11.210
they should conclude that less than 50%

00:04:11.210 --> 00:04:13.179
of adults support the tax increase.

00:04:13.179 --> 00:04:14.910
No, we can't say that either.

00:04:14.910 --> 00:04:17.840
We just failed to reject
this null hypothesis

00:04:17.840 --> 00:04:19.650
that the true proportion is 50%.

00:04:22.860 --> 00:04:26.870
So at the alpha equals to
5/100 significance level,

00:04:26.870 --> 00:04:29.010
they should conclude that more than 50%

00:04:29.010 --> 00:04:31.223
of adults support the tax increase.

00:04:31.223 --> 00:04:32.160
Well yeah,

00:04:32.160 --> 00:04:34.970
in this situation we have our P value

00:04:36.010 --> 00:04:38.900
which is 0.033.

00:04:38.900 --> 00:04:41.540
It is indeed less than
our significance level.

00:04:41.540 --> 00:04:44.020
In which case we reject,

00:04:44.020 --> 00:04:46.180
reject the null hypothesis.

00:04:46.180 --> 00:04:48.350
And if we reject the null hypothesis,

00:04:48.350 --> 00:04:50.620
that would suggest the alternative.

00:04:50.620 --> 00:04:53.230
That the true proportion
is greater than 50%.

00:04:53.230 --> 00:04:56.450
And so I would pick this
choice right over here.

00:04:56.450 --> 00:04:59.510
And then choice D at that
same significance level,

00:04:59.510 --> 00:05:01.370
they should conclude that less than 50%

00:05:01.370 --> 00:05:02.700
of adults support the tax increase.

00:05:02.700 --> 00:05:04.558
No, not the situation at all.

00:05:04.558 --> 00:05:07.875
If we're rejecting our null
hypothesis right over here,

00:05:07.875 --> 00:05:12.470
then it should suggest this alternative.