Hypotheses for a two-sample t test

WEBVTT
Kind: captions
Language: en

00:00:00.087 --> 00:00:02.307
- [Instructor] "Market
researchers conducted a study

00:00:02.307 --> 00:00:04.127
"comparing the salaries of managers

00:00:04.127 --> 00:00:06.857
"at a large nationwide retail store.

00:00:06.857 --> 00:00:08.667
"The researchers obtained salary

00:00:08.667 --> 00:00:12.617
"and demographic data for a
random sample of managers.

00:00:12.617 --> 00:00:14.957
"The researchers calculated
the average salary

00:00:14.957 --> 00:00:18.317
"of the men in the sample
and the average salary

00:00:18.317 --> 00:00:20.417
"of the women in the sample.

00:00:20.417 --> 00:00:23.307
"They want to test if managers who are men

00:00:23.307 --> 00:00:27.547
"have a higher average salary
than managers who are women.

00:00:27.547 --> 00:00:31.937
"Assume that all conditions
for inference have been met.

00:00:31.937 --> 00:00:34.427
"Which of these is the
most appropriate test

00:00:34.427 --> 00:00:36.720
"and alternative hypothesis?"

00:00:36.720 --> 00:00:39.020
And, we can see, they're
talking about a paired T test

00:00:39.020 --> 00:00:40.470
and a two-sample T test,

00:00:40.470 --> 00:00:43.720
and then they talk about
the alternative hypotheses.

00:00:43.720 --> 00:00:45.370
So, pause this video and try to figure

00:00:45.370 --> 00:00:46.940
this out on your own.

00:00:46.940 --> 00:00:48.410
So first, let's think about the difference

00:00:48.410 --> 00:00:51.980
between a paired T test
and a two-sample T test.

00:00:51.980 --> 00:00:56.230
In a paired T test, we're
gonna construct hypotheses

00:00:56.230 --> 00:00:57.560
around

00:00:57.560 --> 00:01:00.100
a parameter for our population

00:01:00.100 --> 00:01:03.260
that will often be the mean difference.

00:01:03.260 --> 00:01:04.860
So, we have one population,

00:01:04.860 --> 00:01:07.550
so we're talking about the
paired situation right over here,

00:01:07.550 --> 00:01:08.657
and so, let's say we say,

00:01:08.657 --> 00:01:13.657
"Hey, do people run faster when
they wear shorts or pants?",

00:01:14.210 --> 00:01:16.460
and so for each member of the population,

00:01:16.460 --> 00:01:17.710
you can see what you would,

00:01:17.710 --> 00:01:19.460
if you really had perfect information,

00:01:19.460 --> 00:01:21.470
you would know, how fast
did they run with pants

00:01:21.470 --> 00:01:22.840
and how fast did they run with shorts?

00:01:22.840 --> 00:01:24.600
And then, you would
calculate the difference,

00:01:24.600 --> 00:01:26.300
and then across the whole population,

00:01:26.300 --> 00:01:28.590
you could actually get
that mean difference.

00:01:28.590 --> 00:01:31.320
So, the mean difference of pants

00:01:32.160 --> 00:01:34.190
minus shorts.

00:01:34.190 --> 00:01:36.820
And of course, in order to estimate that,

00:01:36.820 --> 00:01:39.210
or in order to do a
hypothesis test around that,

00:01:39.210 --> 00:01:42.460
you would take a sample,
and then you would calculate

00:01:42.460 --> 00:01:46.150
the sample mean of the difference

00:01:46.150 --> 00:01:47.290
of pants

00:01:48.140 --> 00:01:50.460
minus shorts,

00:01:50.460 --> 00:01:52.570
and then, you would say, "Hey,"

00:01:52.570 --> 00:01:54.810
assuming the null hypothesis is true,

00:01:54.810 --> 00:01:56.750
you would construct some null hypothesis,

00:01:56.750 --> 00:01:59.500
likely that there is no,
that this mean is zero,

00:01:59.500 --> 00:02:02.127
and you would say, "Hey, if
the null hypothesis is true,

00:02:02.127 --> 00:02:04.487
"that this is actually equal to zero,

00:02:04.487 --> 00:02:06.710
"what's the probability
that I got this result?"

00:02:06.710 --> 00:02:08.550
If that's below your significance level,

00:02:08.550 --> 00:02:10.820
then you would reject your null hypothesis

00:02:10.820 --> 00:02:12.360
and it would suggest the alternative

00:02:12.360 --> 00:02:14.337
that might be that, "Hey, maybe this mean

00:02:14.337 --> 00:02:16.150
"is greater than zero."

00:02:16.150 --> 00:02:18.470
On the other hand, a two-sample T test

00:02:18.470 --> 00:02:22.170
is where you're thinking about
two different populations.

00:02:22.170 --> 00:02:24.380
For example, you could be thinking

00:02:24.380 --> 00:02:27.880
about a population of men, and
you could be thinking about

00:02:27.880 --> 00:02:29.690
the population of women.

00:02:29.690 --> 00:02:32.780
And you wanna compare the
means between these two,

00:02:32.780 --> 00:02:35.030
say, the mean salary.

00:02:35.030 --> 00:02:38.910
So, you have the mean salary for men

00:02:40.120 --> 00:02:43.943
and you have the mean salary for women,

00:02:45.900 --> 00:02:48.770
and what you're trying to
do with the hypothesis test

00:02:48.770 --> 00:02:51.400
is try to come up with
some conclusions about

00:02:51.400 --> 00:02:54.870
the mean difference between
these two parameters.

00:02:54.870 --> 00:02:57.610
So, the mean salary for men

00:02:57.610 --> 00:03:01.530
minus the mean salary for women.

00:03:01.530 --> 00:03:04.230
And our null hypothesis is usually

00:03:04.230 --> 00:03:06.240
the no-news-here hypothesis,

00:03:06.240 --> 00:03:09.010
and so in this situation,
our null hypothesis is that

00:03:09.010 --> 00:03:11.350
there is no difference between these means

00:03:11.350 --> 00:03:13.520
and that our alternative hypothesis

00:03:13.520 --> 00:03:16.050
in the situation that we are looking at,

00:03:16.050 --> 00:03:18.280
because they wanna test
if managers who are men

00:03:18.280 --> 00:03:20.350
have a higher average salary.

00:03:20.350 --> 00:03:22.620
If they just wanted to
test that whether managers

00:03:22.620 --> 00:03:24.450
who are men have a different salary,

00:03:24.450 --> 00:03:25.960
then our alternative hypothesis

00:03:25.960 --> 00:03:27.530
would look something like this,

00:03:27.530 --> 00:03:32.000
where the mean of men
minus the mean of women

00:03:33.070 --> 00:03:36.370
is not equal to zero, but
they aren't just testing

00:03:36.370 --> 00:03:38.760
to see if the means are different,

00:03:38.760 --> 00:03:42.110
they wanna see if men have
a higher average salary.

00:03:42.110 --> 00:03:44.360
So, instead of not equal zero there,

00:03:44.360 --> 00:03:46.830
we would have greater than zero

00:03:46.830 --> 00:03:48.920
for our alternative hypothesis.

00:03:48.920 --> 00:03:50.040
So, which choice is that?

00:03:50.040 --> 00:03:53.360
Well, we're clearly in a
two-sample T test situation,

00:03:53.360 --> 00:03:54.930
and we wanna do the greater than,

00:03:54.930 --> 00:03:58.020
not the not-equal-to, so
we are in that choice,

00:03:58.020 --> 00:03:58.913
right over there.


Calculating confidence interval for difference of means

WEBVTT
Kind: captions
Language: en

00:00:00.160 --> 00:00:01.910
- [Instructor] Kylie
suspected that when people

00:00:01.910 --> 00:00:04.890
exercise longer, their
body temperatures change.

00:00:04.890 --> 00:00:07.230
She randomly assigned
people to exercise for

00:00:07.230 --> 00:00:10.540
30 or 60 minutes, then
measured their temperatures.

00:00:10.540 --> 00:00:13.340
The 18 people who exercised for 30 minutes

00:00:13.340 --> 00:00:14.720
had a mean temperature,

00:00:14.720 --> 00:00:17.670
so this is the sample mean
for that sample of 18 folks,

00:00:17.670 --> 00:00:20.840
of 38.3 degrees Celsius,
with a standard deviation,

00:00:20.840 --> 00:00:24.180
this is a sample standard
deviation for those 18 folks,

00:00:24.180 --> 00:00:26.950
of 0.27 degrees Celsius.

00:00:26.950 --> 00:00:29.820
The 24 people who exercised 60 minutes

00:00:29.820 --> 00:00:33.700
had a mean temperature
of 38.9 degrees Celsius,

00:00:33.700 --> 00:00:35.350
with a standard deviation,

00:00:35.350 --> 00:00:37.090
this is, once again, these
are both sample means

00:00:37.090 --> 00:00:41.410
and sample standard deviations,
of 0.29 degrees Celsius.

00:00:41.410 --> 00:00:44.010
Assume that the conditions
for inference have been met,

00:00:44.010 --> 00:00:48.310
and that Kylie will use the
conservative degrees of freedom

00:00:48.310 --> 00:00:50.490
from the smaller sample size.

00:00:50.490 --> 00:00:53.270
Which of the following is
a 90% confidence interval

00:00:53.270 --> 00:00:56.130
for the difference in
mean body temperature

00:00:56.130 --> 00:00:59.960
after exercising for
the two amounts of time?

00:00:59.960 --> 00:01:02.660
So pause this video, and see
if you can figure it out.

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

00:01:05.250 --> 00:01:07.620
So, in previous videos, we talked about

00:01:07.620 --> 00:01:11.020
the general form of our
confidence interval,

00:01:11.020 --> 00:01:12.650
our t interval which we're going to use,

00:01:12.650 --> 00:01:14.390
because we're dealing with means,

00:01:14.390 --> 00:01:16.210
and we're dealing with
the differences in means.

00:01:16.210 --> 00:01:19.170
And so our t interval is
going to have the form:

00:01:19.170 --> 00:01:21.410
our difference between our sample means,

00:01:21.410 --> 00:01:23.740
so it could be the sample
mean for the 60 minute group

00:01:23.740 --> 00:01:27.030
minus the sample mean
for the 30 minute group.

00:01:27.030 --> 00:01:31.010
Plus or minus our critical t value,

00:01:31.010 --> 00:01:35.050
times our estimate of
the sampling distribution

00:01:35.050 --> 00:01:37.350
of the difference of the sample means.

00:01:37.350 --> 00:01:40.000
And that is going to be,

00:01:40.000 --> 00:01:41.840
I think I have enough space here to do it,

00:01:41.840 --> 00:01:45.340
that is going to be the
sample standard deviation

00:01:45.340 --> 00:01:48.300
of the 60 minute group squared

00:01:48.300 --> 00:01:51.940
over the sample size
of the 60 minute group,

00:01:51.940 --> 00:01:53.670
plus the sample standard deviation

00:01:53.670 --> 00:01:55.930
of the 30 minute group squared

00:01:55.930 --> 00:02:00.330
divided by the sample size
of the 30 minute group.

00:02:00.330 --> 00:02:03.460
And so, we can actually figure
out all of these things.

00:02:03.460 --> 00:02:05.900
So this is going to be equal to

00:02:05.900 --> 00:02:09.840
the sample mean for the
60 minute group is 38.9,

00:02:09.840 --> 00:02:14.840
so it's 38.9 minus the sample
mean for the 30 minute group,

00:02:14.890 --> 00:02:16.790
which is 38.3.

00:02:17.685 --> 00:02:18.518
38.3.

00:02:19.760 --> 00:02:22.500
Plus or minus our critical t value.

00:02:22.500 --> 00:02:24.190
Now how do we figure that out?

00:02:24.190 --> 00:02:27.300
Well, we can use our 90% confidence level

00:02:27.300 --> 00:02:29.867
that we care about, this
90% confidence interval,

00:02:29.867 --> 00:02:32.410
but if we're looking
up things on a t table,

00:02:32.410 --> 00:02:34.520
we also need to know
our degrees of freedom.

00:02:34.520 --> 00:02:36.960
And it says here that Kylie will use

00:02:36.960 --> 00:02:38.650
the conservative degrees of freedom.

00:02:38.650 --> 00:02:42.390
And that means that she will
look at each of those samples,

00:02:42.390 --> 00:02:46.320
so one has a sample size of 18,
one has a sample size of 24.

00:02:46.320 --> 00:02:49.410
Whichever is lower, she
will use one less than that

00:02:49.410 --> 00:02:50.480
as her degrees of freedom.

00:02:50.480 --> 00:02:54.230
18 is clearly lower than 24,
so the degrees of freedom

00:02:54.230 --> 00:02:58.110
in this situation is
18, or are 18 minus one,

00:02:58.110 --> 00:02:59.290
so 17.

00:02:59.290 --> 00:03:00.910
And so using that and that,

00:03:00.910 --> 00:03:03.653
we can now look this up on a t table.

00:03:06.155 --> 00:03:08.710
So our confidence level, 90%,

00:03:08.710 --> 00:03:13.540
and then our degrees of freedom,
17, so that is that row.

00:03:13.540 --> 00:03:16.573
The 90% confidence level is this column,

00:03:18.027 --> 00:03:21.303
and so that gives us our
critical t value of 1.74.

00:03:23.320 --> 00:03:28.320
So going back here, this is
going to be plus or minus 1.74

00:03:28.570 --> 00:03:31.470
times the square root,

00:03:31.470 --> 00:03:33.650
times the square root.

00:03:33.650 --> 00:03:35.690
What's our sample standard deviation

00:03:35.690 --> 00:03:37.980
for the 60 minute group?

00:03:37.980 --> 00:03:40.963
Well, they give it right over here, 0.29,

00:03:41.860 --> 00:03:43.720
and we're gonna have to square that,

00:03:43.720 --> 00:03:47.520
divided by the sample size
for the 60 minute group,

00:03:47.520 --> 00:03:50.290
so let's see, the 24 people
who exercised for 60 minutes,

00:03:50.290 --> 00:03:52.610
so divided by 24.

00:03:52.610 --> 00:03:55.993
Plus the sample standard
deviation for the 30 minute group,

00:03:57.195 --> 00:03:58.028
so that's 0.27,

00:03:59.850 --> 00:04:03.170
0.27 squared,

00:04:03.170 --> 00:04:05.940
divided by the sample size
for the 30 minute group,

00:04:05.940 --> 00:04:07.650
divided by 18.

00:04:07.650 --> 00:04:11.140
And we're done, and we can
look down at the choices.

00:04:11.140 --> 00:04:13.150
Let's see, they all got
the first part the same,

00:04:13.150 --> 00:04:15.623
'cause that's maybe the
most straightforward part.

00:04:16.529 --> 00:04:18.680
38.9 minus 38.3.

00:04:18.680 --> 00:04:22.450
Plus or minus 1.74, so both
of these are looking good,

00:04:22.450 --> 00:04:24.290
we can rule out these two 'cause they have

00:04:24.290 --> 00:04:26.580
a different critical t value.

00:04:26.580 --> 00:04:29.770
Now let's see, we have
0.29 squared divided by 24

00:04:29.770 --> 00:04:34.140
plus .027 squared divided by
18, this one is looking good.

00:04:34.140 --> 00:04:38.580
Over here, let's see, they mixed up...

00:04:38.580 --> 00:04:41.370
they put the 30 minute sample size

00:04:41.370 --> 00:04:45.470
with the sample standard
deviation of the 60 minute group,

00:04:45.470 --> 00:04:46.850
so that won't work.

00:04:46.850 --> 00:04:48.663
And so we like choice A.


Constructing t interval for difference of means

WEBVTT
Kind: captions
Language: en

00:00:00.200 --> 00:00:03.850
- [Instructor] Let's say
that we have two populations.

00:00:03.850 --> 00:00:05.760
So that's the first population,

00:00:05.760 --> 00:00:08.920
and this is the second
population right over here.

00:00:08.920 --> 00:00:10.670
And we are going to think about

00:00:10.670 --> 00:00:12.650
the means of these populations.

00:00:12.650 --> 00:00:14.350
So let's say this first population

00:00:15.433 --> 00:00:17.000
is a population of golden retrievers

00:00:17.000 --> 00:00:20.450
and this second population is
a population of chihuahuas.

00:00:20.450 --> 00:00:22.810
And the mean that we're
going to think about

00:00:22.810 --> 00:00:24.410
is maybe the mean weight.

00:00:24.410 --> 00:00:27.870
So mu one would be the true mean weight

00:00:27.870 --> 00:00:30.320
of the population of golden retrievers.

00:00:30.320 --> 00:00:33.200
And mu two would be the true mean weight

00:00:33.200 --> 00:00:35.600
of the population of chihuahuas.

00:00:35.600 --> 00:00:37.050
Now what we want to think about is

00:00:37.050 --> 00:00:41.630
what is the difference between
these two population means,

00:00:41.630 --> 00:00:44.570
between these two population parameters.

00:00:44.570 --> 00:00:47.890
Well, if we don't know this, all we can do

00:00:47.890 --> 00:00:50.340
is try to estimate it and maybe construct

00:00:50.340 --> 00:00:52.320
some type of confidence interval.

00:00:52.320 --> 00:00:55.470
And that's what we're going
to talk about in this video.

00:00:55.470 --> 00:00:56.960
So how do we go about doing it?

00:00:56.960 --> 00:01:00.120
Well, we've seen this, or
similar things, before.

00:01:00.120 --> 00:01:01.740
What you would do is
you would take a sample

00:01:01.740 --> 00:01:02.870
from both populations.

00:01:02.870 --> 00:01:06.370
So from population one
here, I would take a sample

00:01:06.370 --> 00:01:08.310
of size n sub one.

00:01:08.310 --> 00:01:12.260
And from that, I can
calculate a sample mean.

00:01:12.260 --> 00:01:14.860
So this is a statistic that
is trying to estimate that.

00:01:14.860 --> 00:01:18.800
And I can also calculate a
sample standard deviation.

00:01:18.800 --> 00:01:22.680
And I can do the same thing in
the population of chihuahuas,

00:01:22.680 --> 00:01:25.430
if that's what our
population two is all about.

00:01:25.430 --> 00:01:27.250
So I could take a sample,

00:01:27.250 --> 00:01:29.270
and actually this sample
does not have to be the same

00:01:29.270 --> 00:01:31.920
as n one, so I'll call it n sub two.

00:01:31.920 --> 00:01:34.090
It could be, but doesn't have to be.

00:01:34.090 --> 00:01:37.331
And from that, I can
calculate a sample mean,

00:01:37.331 --> 00:01:42.331
x bar sub two, and a
sample standard deviation.

00:01:43.490 --> 00:01:47.260
So now, assuming that our
conditions for inference are met,

00:01:47.260 --> 00:01:49.110
and we've talked about those before.

00:01:49.110 --> 00:01:52.190
We have the random condition,
we have the normal condition,

00:01:52.190 --> 00:01:54.020
we have the independence condition.

00:01:54.020 --> 00:01:55.580
Assuming those conditions are met,

00:01:55.580 --> 00:01:58.660
and we talk about those
in other videos for means,

00:01:58.660 --> 00:02:00.510
let's think about how we can construct

00:02:00.510 --> 00:02:01.680
a confidence interval.

00:02:01.680 --> 00:02:03.680
And so you might say,
alright, well that would be

00:02:03.680 --> 00:02:06.280
the difference of my sample means,

00:02:06.280 --> 00:02:10.330
x bar sub one minus x bar sub two,

00:02:10.330 --> 00:02:14.970
plus or minus some z value,

00:02:14.970 --> 00:02:18.530
times my standard deviation,

00:02:18.530 --> 00:02:23.530
times the standard deviation
of the sampling distribution

00:02:23.620 --> 00:02:27.250
of the difference of the sample means.

00:02:27.250 --> 00:02:31.840
So x bar sub one minus x bar sub two.

00:02:31.840 --> 00:02:34.260
And you might say, well,
where do I get my z from?

00:02:34.260 --> 00:02:36.880
Well, our confidence level
would determine that.

00:02:36.880 --> 00:02:40.400
Confidence, confidence level.

00:02:40.400 --> 00:02:44.750
If our confidence level is 95%,
that would determine our z.

00:02:44.750 --> 00:02:49.122
Now this would not be incorrect,
but we face a problem,

00:02:49.122 --> 00:02:52.120
because we are going to need to estimate

00:02:52.120 --> 00:02:55.950
what the standard deviation
of the sampling distribution

00:02:55.950 --> 00:02:59.660
of the difference between
our sample means actually is.

00:02:59.660 --> 00:03:02.400
To make that clear, let
me write it this way.

00:03:02.400 --> 00:03:05.440
So the variance of the
sampling distribution

00:03:05.440 --> 00:03:08.280
of the difference of our sample means

00:03:08.280 --> 00:03:11.611
is going to be equal to the variance

00:03:11.611 --> 00:03:15.900
of the sampling distribution
of sample mean one,

00:03:15.900 --> 00:03:19.870
plus the variance of the
sampling distribution

00:03:19.870 --> 00:03:22.840
of sample mean two.

00:03:22.840 --> 00:03:26.580
Now if we knew the true
underlying standard deviations

00:03:26.580 --> 00:03:29.040
of this population and this population,

00:03:29.040 --> 00:03:31.070
then we could actually come up with these.

00:03:31.070 --> 00:03:33.330
In that case, this right over here

00:03:33.330 --> 00:03:38.290
would be equal to the
variance of the population

00:03:38.290 --> 00:03:43.063
of population one, divided
by our sample size, n one

00:03:44.530 --> 00:03:47.340
plus, plus

00:03:48.190 --> 00:03:52.670
the variance of the
underlying population two

00:03:52.670 --> 00:03:55.320
divided by this sample size.

00:03:55.320 --> 00:03:57.680
But we don't know these variances,

00:03:57.680 --> 00:04:00.070
and so we try to estimate them.

00:04:00.070 --> 00:04:04.720
So we estimate them with our
sample standard deviations.

00:04:04.720 --> 00:04:07.570
So we say this is going to
be approximately equal to

00:04:07.570 --> 00:04:11.960
our first sample standard
deviation squared

00:04:11.960 --> 00:04:16.960
over n one plus our second
sample standard deviation squared

00:04:18.350 --> 00:04:20.890
over n two.

00:04:20.890 --> 00:04:25.890
And so we can say that an
estimate of the standard deviation

00:04:26.950 --> 00:04:29.590
of the sampling distribution
of the difference

00:04:29.590 --> 00:04:32.760
between our sample means and estimate

00:04:32.760 --> 00:04:34.450
is going to be equal to
the square root of this.

00:04:34.450 --> 00:04:36.410
It's going to be approximately equal to

00:04:36.410 --> 00:04:41.170
the square root of s
one squared over n one

00:04:41.170 --> 00:04:44.700
plus s two squared over n two.

00:04:44.700 --> 00:04:47.810
But the problem is is
once we use this estimate

00:04:47.810 --> 00:04:50.700
that we can figure out, a critical z value

00:04:50.700 --> 00:04:54.160
isn't going to be as good
as a critical t value.

00:04:54.160 --> 00:04:56.850
So instead, you would say
my confidence interval

00:04:56.850 --> 00:05:01.300
is going to be x bar sub
one minus x bar sub two

00:05:01.300 --> 00:05:05.540
plus or minus a critical t value,

00:05:05.540 --> 00:05:06.850
instead of a z value.

00:05:06.850 --> 00:05:10.800
Because that works better
when you are estimating

00:05:10.800 --> 00:05:12.850
standard deviation of
the sampling distribution

00:05:12.850 --> 00:05:15.710
of the difference
between the sample means.

00:05:15.710 --> 00:05:20.710
And so you have t star
times our estimate of this

00:05:21.260 --> 00:05:24.080
which is going to be
equal to the square root

00:05:24.080 --> 00:05:27.630
of s sub one squared over n one

00:05:27.630 --> 00:05:31.490
plus s sub two squared over n two.

00:05:31.490 --> 00:05:35.080
And then you might say, well,
what determines our t star?

00:05:35.080 --> 00:05:39.240
Well once again, you would
look it up on a table

00:05:39.240 --> 00:05:40.820
using your confidence level.

00:05:40.820 --> 00:05:42.630
And you might be saying, wait, hold on,

00:05:42.630 --> 00:05:45.050
when I look up a t
value, I don't just care

00:05:45.050 --> 00:05:47.260
about a confidence
level, I also care about

00:05:47.260 --> 00:05:49.160
degrees of freedom.

00:05:49.160 --> 00:05:51.300
What is going to be the degrees of freedom

00:05:51.300 --> 00:05:52.530
in this situation?

00:05:52.530 --> 00:05:55.010
Well, there's a simple answer
and a complicated answer.

00:05:55.010 --> 00:05:56.830
Once we think about the
difference of means,

00:05:56.830 --> 00:05:58.610
there's fairly sophisticated formulas

00:05:58.610 --> 00:06:00.310
that computers can use to get

00:06:00.310 --> 00:06:02.970
a more precise degrees of freedom.

00:06:02.970 --> 00:06:05.210
But what you will typical
see in a statistics class

00:06:05.210 --> 00:06:07.440
is a conservative view
of degrees of freedom,

00:06:07.440 --> 00:06:10.210
where you take the lower
of n one and n two,

00:06:10.210 --> 00:06:12.340
and you subtract one from that.

00:06:12.340 --> 00:06:14.350
So the degrees of freedom here,

00:06:14.350 --> 00:06:16.600
so the degrees of freedom
here is going to be

00:06:16.600 --> 00:06:21.600
the lower, lower of n one minus one,

00:06:22.290 --> 00:06:24.610
or n two minus one.

00:06:24.610 --> 00:06:26.510
Or you take the lower of n one or n two

00:06:26.510 --> 00:06:28.750
and you subtract one from that.

00:06:28.750 --> 00:06:31.070
In future videos, we will
work through examples

00:06:31.070 --> 00:06:31.993
that do this.


Conditions for inference for difference of means

WEBVTT
Kind: captions
Language: en

00:00:00.180 --> 00:00:02.370
- [Instructor] A food
scientist wants to estimate

00:00:02.370 --> 00:00:05.210
the difference between
the mean weights of eggs

00:00:05.210 --> 00:00:08.880
classified as jumbo and large.

00:00:08.880 --> 00:00:12.090
They plan on taking a
sample of each type of egg

00:00:12.090 --> 00:00:15.750
to construct a two-sample t interval.

00:00:15.750 --> 00:00:17.800
Which of the following are conditions

00:00:17.800 --> 00:00:20.290
for this type of interval?

00:00:20.290 --> 00:00:22.150
So before I even look at these choices,

00:00:22.150 --> 00:00:24.140
and they say choose
all answers that apply,

00:00:24.140 --> 00:00:25.870
so it might be more than one,

00:00:25.870 --> 00:00:27.930
let's just think about what the conditions

00:00:27.930 --> 00:00:32.420
for inference for this type
of interval actually are.

00:00:32.420 --> 00:00:35.760
So we've done this many times
in many different contexts,

00:00:35.760 --> 00:00:39.540
and so we first of all
have the random condition.

00:00:39.540 --> 00:00:43.150
And that's the idea
that each of our samples

00:00:43.150 --> 00:00:47.000
are random or we are conducting
some type of an experiment

00:00:47.000 --> 00:00:51.700
where we randomly assign folks
to one or eggs in this case

00:00:51.700 --> 00:00:52.840
to one of two groups.

00:00:52.840 --> 00:00:54.960
In this case we are taking two samples,

00:00:54.960 --> 00:00:58.760
and we would hope that they
are truly random samples.

00:00:58.760 --> 00:01:01.760
The second is the normal condition,

00:01:01.760 --> 00:01:04.160
and the normal condition
is a little bit different

00:01:04.160 --> 00:01:06.330
depending on whether
we're talking about means

00:01:06.330 --> 00:01:08.430
or whether we're talking
about proportions.

00:01:08.430 --> 00:01:11.150
The random condition is
essentially the same.

00:01:11.150 --> 00:01:13.900
The normal condition when
we're talking about means,

00:01:13.900 --> 00:01:15.420
remember they're looking at the difference

00:01:15.420 --> 00:01:18.250
between mean weights of eggs,

00:01:18.250 --> 00:01:20.530
is you would want your,

00:01:20.530 --> 00:01:23.230
there's actually several ways
to meet the normal condition.

00:01:23.230 --> 00:01:26.430
One is is if the underlying
distribution is normal.

00:01:26.430 --> 00:01:29.840
The second way is if your sample sizes

00:01:29.840 --> 00:01:33.020
for each of your samples are
greater than or equal to 30.

00:01:33.020 --> 00:01:36.160
So if your first sample size
is greater than or equal to 30

00:01:36.160 --> 00:01:39.640
and your second sample size is
greater than or equal to 30.

00:01:39.640 --> 00:01:42.120
Or even if the underlying
data you don't know

00:01:42.120 --> 00:01:44.010
if it's normal or if it isn't normal,

00:01:44.010 --> 00:01:47.450
and even if you aren't able to meet these,

00:01:47.450 --> 00:01:51.340
as long as your sample
data is roughly symmetric

00:01:51.340 --> 00:01:53.530
and not skewed heavily
in one way or the other,

00:01:53.530 --> 00:01:56.330
then that also roughly
meets the normal condition

00:01:56.330 --> 00:01:57.760
when we're dealing with means.

00:01:57.760 --> 00:01:59.020
And then the third condition,

00:01:59.020 --> 00:02:00.800
and we see this whether
we're dealing with means

00:02:00.800 --> 00:02:03.070
or proportions or differences of means

00:02:03.070 --> 00:02:04.530
or differences of proportions,

00:02:04.530 --> 00:02:06.710
is the independence condition.

00:02:06.710 --> 00:02:09.920
And this is the idea that either

00:02:09.920 --> 00:02:12.740
your individual observations
are done with replacement

00:02:12.740 --> 00:02:14.590
in both of your samples

00:02:14.590 --> 00:02:18.750
or that the sample size
for both of your samples

00:02:18.750 --> 00:02:21.410
is no more than 10% of the population.

00:02:21.410 --> 00:02:23.690
Then you have met this condition.

00:02:23.690 --> 00:02:25.100
So with that little bit of a review,

00:02:25.100 --> 00:02:27.380
let's see which of these apply.

00:02:27.380 --> 00:02:30.820
They observe at least 10
heavy eggs and 10 light eggs

00:02:30.820 --> 00:02:32.710
in each sample.

00:02:32.710 --> 00:02:34.750
So this actually is the normal condition

00:02:34.750 --> 00:02:38.520
when we are dealing with
proportions, not for means.

00:02:38.520 --> 00:02:40.160
So I would rule this out.

00:02:40.160 --> 00:02:42.260
It's a good distractor choice.

00:02:42.260 --> 00:02:44.670
The eggs in each sample
are randomly selected

00:02:44.670 --> 00:02:45.730
from their population.

00:02:45.730 --> 00:02:48.270
Yep, that's the random
condition right over there,

00:02:48.270 --> 00:02:50.350
so I would select that.

00:02:50.350 --> 00:02:54.430
They sample an equal
number of each type of egg.

00:02:54.430 --> 00:02:56.280
So this is a common misconception,

00:02:56.280 --> 00:02:58.222
that whether we're dealing
with means or proportions,

00:02:58.222 --> 00:03:00.820
when we're thinking about the
difference between say means

00:03:00.820 --> 00:03:02.380
or the difference between proportions,

00:03:02.380 --> 00:03:05.606
that somehow your sample sizes
have to be the exact same.

00:03:05.606 --> 00:03:07.360
That is not the case.

00:03:07.360 --> 00:03:10.790
Your sample sizes do not
have to be the exact case.

00:03:10.790 --> 00:03:13.130
Or do not have to be the exact same.

00:03:13.130 --> 00:03:14.940
So we would rule this out as well.

00:03:14.940 --> 00:03:16.190
So right over here,

00:03:16.190 --> 00:03:18.410
they have listed the random condition.

00:03:18.410 --> 00:03:19.979
They could've also listed
the normal condition

00:03:19.979 --> 00:03:22.133
and the independence condition.


Comparing P value to significance level for test involving difference of proportions

WEBVTT
Kind: captions
Language: en

00:00:00.110 --> 00:00:02.600
- [Instructor] A veterinarian
is studying a certain disease

00:00:02.600 --> 00:00:07.020
that seems to be affecting male
cats more than female cats.

00:00:07.020 --> 00:00:11.290
They obtain a random sample
of records from 500 cats.

00:00:11.290 --> 00:00:16.290
They find 24 of the 259
male cats have the disease

00:00:16.920 --> 00:00:21.685
while 14 of 241 female
cats have the disease.

00:00:21.685 --> 00:00:25.180
The veterinarian uses these results

00:00:25.180 --> 00:00:26.779
to test their null hypothesis

00:00:26.779 --> 00:00:29.950
that the true proportion is
the same amongst the male

00:00:29.950 --> 00:00:31.120
and female cats

00:00:31.120 --> 00:00:32.671
versus the alternative hypothesis

00:00:32.671 --> 00:00:35.010
that the proportion of
males who get the disease

00:00:35.010 --> 00:00:37.820
is actually higher than
the proportion of females.

00:00:37.820 --> 00:00:42.320
The test statistic was z is equal to 1.46

00:00:42.320 --> 00:00:46.090
and the P-value was approximately 0.07.

00:00:46.090 --> 00:00:46.923
That's useful.

00:00:46.923 --> 00:00:48.240
They've done a lot of work for us.

00:00:48.240 --> 00:00:51.435
Assume that all conditions
for inference were met.

00:00:51.435 --> 00:00:56.435
At the alpha equals 0.10
level of significance,

00:00:56.550 --> 00:00:58.561
is there sufficient evidence to conclude

00:00:58.561 --> 00:01:03.030
that a larger proportion of
male cats have the disease?

00:01:03.030 --> 00:01:05.593
So pause this video and
see if you can answer that.

00:01:06.920 --> 00:01:09.940
All right, so remember what we
do with a significance test.

00:01:09.940 --> 00:01:14.940
We assume our null hypothesis,

00:01:15.000 --> 00:01:16.710
and then given,

00:01:16.710 --> 00:01:18.350
and then with that assumption,

00:01:18.350 --> 00:01:20.040
we look at our data

00:01:20.040 --> 00:01:22.140
and we calculate a P-value.

00:01:22.140 --> 00:01:22.973
We say, hey,

00:01:22.973 --> 00:01:25.880
what is the probability of
getting the data that we did

00:01:25.880 --> 00:01:28.290
assuming our null hypothesis is true?

00:01:28.290 --> 00:01:32.250
And if that is lower than
our significance level,

00:01:32.250 --> 00:01:34.630
then we reject the null hypothesis.

00:01:34.630 --> 00:01:35.463
We say, hey,

00:01:35.463 --> 00:01:36.350
assuming the null hypothesis,

00:01:36.350 --> 00:01:37.580
we got a pretty unlikely event.

00:01:37.580 --> 00:01:38.550
We reject it.

00:01:38.550 --> 00:01:41.200
Which would suggest the alternative.

00:01:41.200 --> 00:01:45.210
And so here our P-value is 0.07,

00:01:45.210 --> 00:01:48.430
which is indeed less than our alpha,

00:01:48.430 --> 00:01:50.640
which is less than our significance level.

00:01:50.640 --> 00:01:53.040
This thing right over here is 0.10.

00:01:53.040 --> 00:01:54.590
And so because of that,

00:01:54.590 --> 00:01:58.930
we would reject the null hypothesis.

00:01:58.930 --> 00:02:00.880
Reject null hypothesis.

00:02:00.880 --> 00:02:02.470
Which would, which is,

00:02:02.470 --> 00:02:05.070
we could say there is
sufficient evidence to conclude

00:02:05.070 --> 00:02:08.120
that a larger proportion of
male cats have the disease.

00:02:08.120 --> 00:02:13.120
We could say suggests the
alternative hypothesis.

00:02:13.960 --> 00:02:15.260
And so on Khan Academy

00:02:15.260 --> 00:02:17.200
there's some multiple
choice questions like this,

00:02:17.200 --> 00:02:19.370
and so the choice that you would pick

00:02:19.370 --> 00:02:20.720
might be something like,

00:02:20.720 --> 00:02:23.960
because our P-value is less
than our significance level,

00:02:23.960 --> 00:02:25.910
we would reject the null hypothesis,

00:02:25.910 --> 00:02:27.873
and that would suggest the alternative.


Confidence interval for hypothesis test for difference in proportions

WEBVTT
Kind: captions
Language: en

00:00:00.230 --> 00:00:02.450
- [Narrator] A university
offers a certain course

00:00:02.450 --> 00:00:03.880
that students can take in-person

00:00:03.880 --> 00:00:05.900
or in an online setting.

00:00:05.900 --> 00:00:07.630
Teachers of the course were curious

00:00:07.630 --> 00:00:09.510
if there was a difference
in the passing rate

00:00:09.510 --> 00:00:11.250
between the two settings.

00:00:11.250 --> 00:00:13.260
Data from a recent semester showed

00:00:13.260 --> 00:00:16.480
that 80% of students passed
the in-person setting

00:00:16.480 --> 00:00:20.630
and 75% of students
passed the online setting.

00:00:20.630 --> 00:00:22.050
They were willing to treat these

00:00:22.050 --> 00:00:24.530
as representative samples of all students

00:00:24.530 --> 00:00:27.510
who may take each setting of the course.

00:00:27.510 --> 00:00:29.520
The teachers used those results to make

00:00:29.520 --> 00:00:33.240
a 95% confidence interval to estimate

00:00:33.240 --> 00:00:35.370
the difference between
the proportion of students

00:00:35.370 --> 00:00:39.260
who pass in each setting of the course.

00:00:39.260 --> 00:00:41.730
So this is a 95% confidence interval

00:00:41.730 --> 00:00:43.150
for the difference between the proportion

00:00:43.150 --> 00:00:44.780
who passed the in-person course

00:00:44.780 --> 00:00:46.840
and the online course.

00:00:46.840 --> 00:00:48.970
The resulting interval was approximately,

00:00:48.970 --> 00:00:50.863
it went from negative 0.04 to 0.14.

00:00:53.320 --> 00:00:54.430
Just to make sure we understand

00:00:54.430 --> 00:00:56.640
what this is saying, this is saying 95%

00:00:56.640 --> 00:00:58.640
of the time that you go through this,

00:00:58.640 --> 00:01:01.550
because we're talking about
a 95% confidence interval,

00:01:01.550 --> 00:01:04.680
95% of the time you take these samples

00:01:04.680 --> 00:01:06.680
and then you construct
a confidence interval

00:01:06.680 --> 00:01:08.990
for the difference in proportions,

00:01:08.990 --> 00:01:12.350
that it will actually
contain the true proportion.

00:01:12.350 --> 00:01:14.920
They want to use this interval to test

00:01:14.920 --> 00:01:17.880
their null hypothesis
that the true proportions

00:01:17.880 --> 00:01:20.730
are the same versus their
alternative hypothesis

00:01:20.730 --> 00:01:23.060
that the true proportions are different.

00:01:23.060 --> 00:01:25.190
Assume that all conditions for inference

00:01:25.190 --> 00:01:26.510
have been met.

00:01:26.510 --> 00:01:28.960
Based on the interval, what do we know

00:01:28.960 --> 00:01:30.970
about the corresponding P-value

00:01:30.970 --> 00:01:33.320
and conclusion to their test?

00:01:33.320 --> 00:01:35.323
So pause this video and try to figure out

00:01:35.323 --> 00:01:37.113
on your own.

00:01:38.070 --> 00:01:40.010
All right, so what's interesting here

00:01:40.010 --> 00:01:42.300
is we're going to use
a confidence interval

00:01:42.300 --> 00:01:44.970
to think about a hypothesis test.

00:01:44.970 --> 00:01:46.430
Remember, in a hypothesis test

00:01:46.430 --> 00:01:49.230
we assume that our null
hypothesis is true.

00:01:49.230 --> 00:01:51.080
We'll assume this.

00:01:51.080 --> 00:01:52.310
There's another way we could write it.

00:01:52.310 --> 00:01:54.470
We could write it like this,
that the difference between

00:01:54.470 --> 00:01:59.470
the in-person and the
online, true proportions,

00:02:00.970 --> 00:02:02.670
is equal to zero.

00:02:02.670 --> 00:02:04.410
These are equivalent statements.

00:02:04.410 --> 00:02:07.040
In a hypothesis test, we will assume

00:02:07.040 --> 00:02:08.890
that this is true.

00:02:08.890 --> 00:02:11.060
Then in a traditional hypothesis test,

00:02:11.060 --> 00:02:13.610
we set some significance level.

00:02:13.610 --> 00:02:17.040
So let's say we set that
significance level at 5%

00:02:17.040 --> 00:02:19.590
and that is a very typical
significance level.

00:02:19.590 --> 00:02:21.573
And if the results we
get, if the probability

00:02:21.573 --> 00:02:25.510
of getting the results that we do get

00:02:25.510 --> 00:02:29.100
for the difference in
the sample proportions

00:02:29.100 --> 00:02:32.620
is less than 5%, we say
hey that's pretty unlikely

00:02:32.620 --> 00:02:34.800
we're gonna reject the null hypothesis

00:02:34.800 --> 00:02:36.960
which will suggest the alternative.

00:02:36.960 --> 00:02:39.220
But here we have something interesting.

00:02:39.220 --> 00:02:41.470
We have a confidence interval.

00:02:41.470 --> 00:02:44.360
It turns out that if the
sum of your confidence level

00:02:44.360 --> 00:02:48.410
and your significance
level is equal to 100%

00:02:48.410 --> 00:02:51.470
and you're doing a
two-sided hypothesis test,

00:02:51.470 --> 00:02:53.210
so you're thinking about well,

00:02:53.210 --> 00:02:55.270
our alternative hypothesis isn't just that

00:02:55.270 --> 00:02:57.560
the in-person is greater than the online,

00:02:57.560 --> 00:02:59.120
or that it's less than the online,

00:02:59.120 --> 00:03:00.520
it's that they are different.

00:03:00.520 --> 00:03:02.770
We have a two-sided hypothesis test.

00:03:02.770 --> 00:03:06.220
In these situations you can
actually make some inferences

00:03:06.220 --> 00:03:10.740
about your P value from
your confidence interval.

00:03:10.740 --> 00:03:12.860
Think about it this way, we are assuming

00:03:12.860 --> 00:03:14.610
our null hypothesis is true when

00:03:14.610 --> 00:03:16.330
we do this hypothesis test.

00:03:16.330 --> 00:03:20.160
And so when we construct
a 95% confidence interval,

00:03:20.160 --> 00:03:25.140
we would expect that 95%
of confidence intervals

00:03:30.290 --> 00:03:34.007
would overlap with zero.

00:03:37.260 --> 00:03:39.230
Where did I get zero from?

00:03:39.230 --> 00:03:41.070
Remember, this is a confidence interval

00:03:41.070 --> 00:03:43.910
for the difference in proportions.

00:03:43.910 --> 00:03:46.750
Our null hypothesis is
that the true difference

00:03:46.750 --> 00:03:49.390
in proportions is zero.

00:03:49.390 --> 00:03:51.880
So 95% of the time that we do this,

00:03:51.880 --> 00:03:54.310
if we assume that the
null hypothesis is true,

00:03:54.310 --> 00:03:56.730
we will overlap with zero.

00:03:56.730 --> 00:03:57.960
Or another way you can think about it.

00:03:57.960 --> 00:04:02.960
5% of confidence intervals
would not overlap with zero.

00:04:12.136 --> 00:04:14.340
So if you are in a situation where

00:04:14.340 --> 00:04:15.990
you go through this process, you try

00:04:15.990 --> 00:04:18.330
to construct a 95% confidence interval

00:04:18.330 --> 00:04:22.030
and you don't overlap with
your assumed difference

00:04:22.030 --> 00:04:24.920
of the true proportions
from your null hypothesis,

00:04:24.920 --> 00:04:28.070
well in this situation your P value

00:04:28.070 --> 00:04:32.180
is going to be less than
your 5% significance level.

00:04:32.180 --> 00:04:37.180
In this situation you would
reject your null hypothesis.

00:04:37.600 --> 00:04:40.530
In this first situation your P value

00:04:40.530 --> 00:04:44.160
is going to be greater than
or equal to your alpha level

00:04:44.160 --> 00:04:46.073
and you would fail to reject.

00:04:49.110 --> 00:04:51.310
So what's the situation here?

00:04:51.310 --> 00:04:54.320
Well our interval actually does include

00:04:54.320 --> 00:04:57.550
the assumed difference in true proportions

00:04:57.550 --> 00:04:59.430
from the null hypothesis.

00:04:59.430 --> 00:05:01.513
So that means assuming the null hypothesis

00:05:01.513 --> 00:05:04.150
we are in this first scenario.

00:05:04.150 --> 00:05:07.270
This is one of the 95%
of confidence intervals

00:05:07.270 --> 00:05:09.730
where we actually did overlap with

00:05:09.730 --> 00:05:13.610
the true parameter that
we are trying to estimate.

00:05:13.610 --> 00:05:15.690
In that situation our P value is going

00:05:15.690 --> 00:05:17.250
to be greater than or equal to our alpha,

00:05:17.250 --> 00:05:19.048
which in this case is 5%.

00:05:19.048 --> 00:05:21.690
So we fail to reject the null hypothesis.

00:05:21.690 --> 00:05:23.730
So there isn't evidence to suggest

00:05:23.730 --> 00:05:25.590
that there is a true difference

00:05:25.590 --> 00:05:27.610
in passing grades between the in-person

00:05:27.610 --> 00:05:28.963
and the online exam.


Hypothesis test for difference in proportions example

WEBVTT
Kind: captions
Language: en

00:00:00.480 --> 00:00:02.460
- [Instructor] We are told
that researchers suspect

00:00:02.460 --> 00:00:04.710
that myopia, or nearsightedness,

00:00:04.710 --> 00:00:07.540
is becoming more common over time.

00:00:07.540 --> 00:00:12.510
A study from the year 2000
showed 132 cases of myopia

00:00:12.510 --> 00:00:15.650
in 400 randomly selected people.

00:00:15.650 --> 00:00:20.550
A separate study from
2015 showed 228 cases

00:00:20.550 --> 00:00:23.970
in 600 randomly selected people.

00:00:23.970 --> 00:00:25.510
So what we're going to do in this video

00:00:25.510 --> 00:00:29.210
is do a hypothesis test
to see if we have evidence

00:00:29.210 --> 00:00:32.990
to suggest the researcher
suspicion that myopia

00:00:32.990 --> 00:00:35.570
is becoming more common over time.

00:00:35.570 --> 00:00:37.530
If at any point you are
inspired, I encourage you

00:00:37.530 --> 00:00:39.230
to pause the video and
try to work through things

00:00:39.230 --> 00:00:40.820
on your own, but here I go.

00:00:40.820 --> 00:00:42.460
I'm going to do it with you.

00:00:42.460 --> 00:00:45.340
So let's just start
off by setting our null

00:00:45.340 --> 00:00:47.430
and alternative hypothesis.

00:00:47.430 --> 00:00:49.540
So remember, our null
hypothesis, this would be that

00:00:49.540 --> 00:00:50.920
the known news here.

00:00:50.920 --> 00:00:54.080
So that would be that
contrary to their suspicions,

00:00:54.080 --> 00:00:57.340
that myopia is not becoming more common.

00:00:57.340 --> 00:01:00.490
And so the way that we're
measuring more common over time

00:01:00.490 --> 00:01:02.490
is we could look at
the proportion of folks

00:01:02.490 --> 00:01:05.110
who have myopia in 2015 and compare that

00:01:05.110 --> 00:01:07.280
to the proportion in 2000.

00:01:07.280 --> 00:01:09.880
So our null hypothesis is
that there's no difference.

00:01:09.880 --> 00:01:12.960
Is that the true proportion
of folks who have myopia

00:01:12.960 --> 00:01:17.610
in 2015 is equal to
the proportion of folks

00:01:17.610 --> 00:01:20.080
who have myopia in 2000.

00:01:20.080 --> 00:01:23.550
And then our alternative
hypothesis, remember,

00:01:23.550 --> 00:01:27.570
they are, they suspect it's
becoming more common over time.

00:01:27.570 --> 00:01:30.600
So that would be a situation
where our true proportion

00:01:30.600 --> 00:01:35.600
in 2015 is greater than the
true proportion in 2000.

00:01:36.090 --> 00:01:38.520
In this scenario, myopia would be becoming

00:01:38.520 --> 00:01:43.120
more common over time because
2015 happens after 2000.

00:01:43.120 --> 00:01:46.870
So before we even go about
testing our null hypothesis,

00:01:46.870 --> 00:01:48.220
seeing if we can reject or not,

00:01:48.220 --> 00:01:49.900
which would suggest our alternative,

00:01:49.900 --> 00:01:52.350
you have to look at your
conditions for inference.

00:01:52.350 --> 00:01:54.630
And we've done this many times before.

00:01:54.630 --> 00:01:58.280
You have your random
condition, and it looks like

00:01:58.280 --> 00:02:01.810
we meet that because in both
of the samples we have 400

00:02:01.810 --> 00:02:04.610
randomly selected people,
randomly selected people.

00:02:04.610 --> 00:02:05.870
So that looks good.

00:02:05.870 --> 00:02:08.700
Then you have your normal condition.

00:02:08.700 --> 00:02:12.930
And to meet your normal condition,
your number of successes

00:02:12.930 --> 00:02:16.110
and failures in each of the
samples have to be at least 10.

00:02:16.110 --> 00:02:17.480
And we see that that is the case.

00:02:17.480 --> 00:02:20.750
We have 132 successes so to
speak, not that it's a success

00:02:20.750 --> 00:02:22.780
for someone to have
myopia, but the way this is

00:02:22.780 --> 00:02:24.750
being constructed that would be a success.

00:02:24.750 --> 00:02:27.130
And then 400 minus 132 failures.

00:02:27.130 --> 00:02:28.660
In each case, either of those numbers

00:02:28.660 --> 00:02:29.720
would be greater than 10.

00:02:29.720 --> 00:02:32.810
And same thing for the sample from 2015,

00:02:32.810 --> 00:02:34.840
so we're meeting both of those.

00:02:34.840 --> 00:02:36.930
And then the last condition
that we always talk about,

00:02:36.930 --> 00:02:38.690
is the independence condition.

00:02:38.690 --> 00:02:42.340
And two ways to get there,
either you are sampling

00:02:42.340 --> 00:02:45.810
with replacement or you feel
good that your sample size

00:02:45.810 --> 00:02:48.410
is no more than 10
percent of the population.

00:02:48.410 --> 00:02:51.650
And I think it is safe to say
that even this larger sample

00:02:51.650 --> 00:02:56.430
of 600, that there is more
than 6,000 people out there.

00:02:56.430 --> 00:02:59.240
And so I think it's reasonable
to say that we're meeting

00:02:59.240 --> 00:03:00.320
that independence condition.

00:03:00.320 --> 00:03:01.970
Even though they're not
making it explicit here.

00:03:01.970 --> 00:03:04.100
But it's good to always think about this.

00:03:04.100 --> 00:03:07.590
Now the next thing you wanna
do in a hypothesis test

00:03:07.590 --> 00:03:11.030
is set your significance
level, your alpha.

00:03:11.030 --> 00:03:13.843
And I'll set my
significance level to 0.05.

00:03:15.420 --> 00:03:17.390
So we're not going to
assume the null hypothesis

00:03:17.390 --> 00:03:20.135
and say, well what is the
probability of getting a

00:03:20.135 --> 00:03:25.135
difference between 2015
and 2000 that is at least

00:03:25.720 --> 00:03:28.290
as large as the one that we got.

00:03:28.290 --> 00:03:32.850
And in that probability is less
than our significance level

00:03:32.850 --> 00:03:35.000
then we would reject our null hypothesis

00:03:35.000 --> 00:03:37.350
and that would suggest the alternative.

00:03:37.350 --> 00:03:39.880
If that probability is greater
than our significance level,

00:03:39.880 --> 00:03:42.270
then we fail to reject the null hypothesis

00:03:42.270 --> 00:03:46.920
and we fail to have evidence
for the researchers suspicion.

00:03:46.920 --> 00:03:49.060
So let's move ahead with that.

00:03:49.060 --> 00:03:51.690
So what we wanna do, let's
come up with a Z value,

00:03:51.690 --> 00:03:53.590
or a Z score.

00:03:53.590 --> 00:03:58.590
So our Z is going to be
equal to a sample proportion

00:03:59.030 --> 00:04:04.030
in 2015 minus our sample
proportion in 2000.

00:04:04.930 --> 00:04:09.190
All of that over a
standard deviation of the

00:04:09.190 --> 00:04:11.470
sampling distribution of
the difference between

00:04:11.470 --> 00:04:16.470
the sample proportions in 2015 and 2000.

00:04:18.440 --> 00:04:21.610
Now, this is going to be,
and I will say approximately

00:04:21.610 --> 00:04:24.860
equal to, we can calculate
this numerator exactly,

00:04:24.860 --> 00:04:27.850
but this denominator we
are going to estimate.

00:04:27.850 --> 00:04:30.960
So this numerator is going
to be, let's see, in 2015,

00:04:30.960 --> 00:04:35.260
I'll use some different
colors, 2015 we have 228

00:04:35.260 --> 00:04:36.550
cases out of 600.

00:04:36.550 --> 00:04:40.030
So it's 228 out of 600.

00:04:40.030 --> 00:04:45.030
And then in 2000, we have
132 cases out of 400.

00:04:45.090 --> 00:04:50.090
So minus 132 over 400.

00:04:50.550 --> 00:04:54.830
And then all of that over the square root.

00:04:54.830 --> 00:04:56.870
And what we use in the denominator here,

00:04:56.870 --> 00:05:01.123
under the radical sign, is we
use the combined proportion.

00:05:02.020 --> 00:05:04.690
Could write that as P hat sub C.

00:05:04.690 --> 00:05:07.330
And the reason why we use
the combined proportion,

00:05:07.330 --> 00:05:08.920
we talked about this in previous videos,

00:05:08.920 --> 00:05:11.480
is remember, when we do a hypothesis test,

00:05:11.480 --> 00:05:13.960
we assume that our null
hypothesis is true.

00:05:13.960 --> 00:05:16.490
And if our null hypothesis
is true there's no difference

00:05:16.490 --> 00:05:19.730
between our proportions in 2015 and 2000.

00:05:19.730 --> 00:05:23.100
And so to get a better estimate
of the true proportion,

00:05:23.100 --> 00:05:25.470
well we should just add up our samples.

00:05:25.470 --> 00:05:29.030
So our sample size would be 600 plus 400

00:05:32.197 --> 00:05:36.864
and the number of cases of
myopia would be 228 plus 132.

00:05:39.605 --> 00:05:40.438
Plus 132.

00:05:41.290 --> 00:05:46.290
Which would get us to,
what is this, 360 over 1000

00:05:47.640 --> 00:05:51.570
which is equal to 0.36.

00:05:51.570 --> 00:05:54.720
And there, and we can use
that inside the expression

00:05:54.720 --> 00:05:57.650
when we're trying to estimate
our standard deviation

00:05:57.650 --> 00:05:59.570
of this sampling distribution.

00:05:59.570 --> 00:06:04.410
So this is going to be
0.36 times one minus 0.36,

00:06:04.410 --> 00:06:09.410
which would be 0.64 over
the sample size in 2015,

00:06:10.180 --> 00:06:15.180
which is 600, plus 0.36 times 0.64

00:06:19.310 --> 00:06:24.310
over the sample size in
2000, which is equal to 400.

00:06:24.640 --> 00:06:26.810
And let's see, before I
even get my calculator out,

00:06:26.810 --> 00:06:29.770
I think I can simplify this a little bit.

00:06:29.770 --> 00:06:34.770
228 over 600, 228 divided
by 6 is going to be

00:06:36.898 --> 00:06:39.623
equal to 38, so this would be 0.38.

00:06:41.040 --> 00:06:43.520
Let's see, 132 divided
by four would be 33,

00:06:43.520 --> 00:06:45.513
so this would be 0.33.

00:06:46.490 --> 00:06:50.080
And so our entire numerator
is going to be 0.05, 0.05.

00:06:53.670 --> 00:06:56.530
And so noW I can put
this into my calculator

00:06:56.530 --> 00:07:01.530
and I will get 0.05 divided
by the square root of,

00:07:04.910 --> 00:07:09.910
let's see, I'm gonna have
0.36 times 0.64 divided by 600

00:07:16.900 --> 00:07:21.900
plus 0.36 times 0.64 divided
by 400 is going to get me

00:07:31.410 --> 00:07:34.430
approximately 1.61.

00:07:34.430 --> 00:07:39.023
So this is going to be approximately 1.61.

00:07:40.180 --> 00:07:41.900
And so one way to think about it is,

00:07:41.900 --> 00:07:45.010
the difference that we got
between our sample proportions,

00:07:45.010 --> 00:07:50.010
between 2015 and 2000 of 0.05,
but that is 1.61 standard

00:07:52.820 --> 00:07:57.100
deviations above our mean of
our sampling distribution,

00:07:57.100 --> 00:07:59.840
if we assume that the
null hypothesis is true.

00:07:59.840 --> 00:08:02.800
And so from this, we can
calculate our P value.

00:08:02.800 --> 00:08:07.420
Remember, our P value,
our P value is equal to

00:08:07.420 --> 00:08:12.020
the probability that our Z
score is at least that big,

00:08:12.020 --> 00:08:14.023
is greater than or equal to 1.61.

00:08:15.070 --> 00:08:17.467
And one way to think about
it, if you look at the

00:08:17.467 --> 00:08:20.440
sample distribution, I
really could just look at any

00:08:20.440 --> 00:08:24.030
normal distribution now
since we normalized for a Z,

00:08:24.030 --> 00:08:28.820
so we're looking at 1.61 standard
deviations above the mean.

00:08:28.820 --> 00:08:31.540
So Z is equal to 1.61.

00:08:31.540 --> 00:08:34.300
So we're thinking about
this area right over here.

00:08:34.300 --> 00:08:36.580
That would be our P value.

00:08:36.580 --> 00:08:40.023
And to help us with that,
we can get out a Z table.

00:08:40.870 --> 00:08:45.490
And we see this Z table
gives us the cumulative area

00:08:45.490 --> 00:08:49.090
up to some Z score, and
so we would just have to

00:08:49.090 --> 00:08:50.260
whatever this gives us, we would just

00:08:50.260 --> 00:08:51.830
have to do one minus that.

00:08:51.830 --> 00:08:56.830
So if we go to 1.61, we get 0.9463.

00:08:56.980 --> 00:09:00.740
So it would be one minus 0.9463.

00:09:00.740 --> 00:09:05.740
Is equal to one minus
0.9463, which is equal to,

00:09:07.550 --> 00:09:09.230
let's see, it's 0.0537.

00:09:16.560 --> 00:09:21.170
And notice, this P value
is ever so slightly higher

00:09:21.170 --> 00:09:22.630
than our significance level.

00:09:22.630 --> 00:09:24.890
But this is why we wanna
set our significance level

00:09:24.890 --> 00:09:25.723
ahead of time.

00:09:25.723 --> 00:09:28.360
We don't wanna get tempted
to say oh, I'm so close,

00:09:28.360 --> 00:09:31.100
let me just raise my significance
level a little bit more

00:09:31.100 --> 00:09:33.010
so that I can reject my null hypothesis

00:09:33.010 --> 00:09:34.480
and then I can have something

00:09:34.480 --> 00:09:35.910
that I can tell my friends about.

00:09:35.910 --> 00:09:38.310
No, that would not be good science.

00:09:38.310 --> 00:09:40.150
That would not be good statistics.

00:09:40.150 --> 00:09:42.220
We have to be disciplined.

00:09:42.220 --> 00:09:47.220
So here, because our P
value, our P value is greater

00:09:48.500 --> 00:09:51.330
than our significance level,
even though it's very,

00:09:51.330 --> 00:09:53.200
it's by a very small amount,

00:09:53.200 --> 00:09:58.200
we fail to reject our null hypothesis.

00:09:59.490 --> 00:10:01.900
And another way to think about
it, in terms of the context

00:10:01.900 --> 00:10:06.190
of the question, we can
say that there is not

00:10:06.190 --> 00:10:11.190
enough evidence to suggest that myopia

00:10:13.820 --> 00:10:16.170
becoming more common over time.

00:10:16.170 --> 00:10:21.170
Myopia becoming more common over time.

00:10:25.730 --> 00:10:26.723
And we're done.


Constructing hypotheses for two proportions

WEBVTT
Kind: captions
Language: en

00:00:00.250 --> 00:00:02.050
- [Instructor] Derrick
is a political pollster

00:00:02.050 --> 00:00:03.690
tracking the approval rating

00:00:03.690 --> 00:00:06.010
of the prime minster in his country.

00:00:06.010 --> 00:00:08.810
At the end of each month, he obtains data

00:00:08.810 --> 00:00:10.850
from a random sample of adults

00:00:10.850 --> 00:00:13.040
on whether or not they currently approve

00:00:13.040 --> 00:00:15.100
of the prime minister's performance,

00:00:15.100 --> 00:00:17.933
using a separate sample each month.

00:00:17.933 --> 00:00:20.670
Derrick wants to test if the proportion

00:00:20.670 --> 00:00:23.660
of adults who approved
was significantly lower

00:00:23.660 --> 00:00:27.049
in December than it was in November.

00:00:27.049 --> 00:00:29.611
Which of the following
is an appropriate set

00:00:29.611 --> 00:00:33.540
of hypotheses for Derrick's
significance test?

00:00:33.540 --> 00:00:35.160
Pause this video and
see if you can figure it

00:00:35.160 --> 00:00:37.040
out on your own.

00:00:37.040 --> 00:00:38.420
Alright, so let's think about ways

00:00:38.420 --> 00:00:40.830
to write a null hypothesis first.

00:00:40.830 --> 00:00:43.580
So, remember, your null
hypothesis is assuming

00:00:43.580 --> 00:00:44.770
that there's no news here.

00:00:44.770 --> 00:00:45.890
There's no difference.

00:00:45.890 --> 00:00:48.820
So, one way to say it is
that the true proportion

00:00:49.954 --> 00:00:53.390
in December is equal to your
true proportion in November.

00:00:53.390 --> 00:00:56.141
Another way to write
that exact same thing is

00:00:56.141 --> 00:00:58.970
to say that your, the difference

00:00:58.970 --> 00:01:01.885
between the true proportion in December,

00:01:01.885 --> 00:01:02.887
and let's see.

00:01:02.887 --> 00:01:03.720
They say, Derrick wants
to test if the proportion

00:01:03.720 --> 00:01:06.330
of adults who approved
was significantly lower

00:01:06.330 --> 00:01:09.110
in December than it was in November.

00:01:09.110 --> 00:01:10.530
And so, you could write it as

00:01:10.530 --> 00:01:12.890
because he's wanting to
see if November is higher

00:01:12.890 --> 00:01:14.810
or not, I'll put November first.

00:01:14.810 --> 00:01:17.562
So, another way to say
this exact same thing is

00:01:17.562 --> 00:01:19.750
that the true proportion of November

00:01:19.750 --> 00:01:23.340
minus the true proportion in
December is equal to zero.

00:01:23.340 --> 00:01:26.432
So, each of these would look,
be legitimate null hypotheses

00:01:26.432 --> 00:01:28.650
and so, let's see,

00:01:28.650 --> 00:01:29.845
this one looks good.

00:01:29.845 --> 00:01:31.820
This one looks good.

00:01:31.820 --> 00:01:33.700
This one looks good.

00:01:33.700 --> 00:01:36.500
This one is not a
legitimate null hypothesis

00:01:36.500 --> 00:01:38.365
for what we're trying to do.

00:01:38.365 --> 00:01:39.460
So, we could rule out D.

00:01:39.460 --> 00:01:40.880
And then, the other one it says,

00:01:40.880 --> 00:01:43.550
Derrick wants to test if the proportion

00:01:43.550 --> 00:01:46.960
of adults who approved
was significantly lower

00:01:46.960 --> 00:01:49.373
in December than it was in November.

00:01:49.373 --> 00:01:51.830
So, the news here would be if this is,

00:01:51.830 --> 00:01:52.930
if this actually is the case.

00:01:52.930 --> 00:01:56.316
If we have evidence that the true propor,

00:01:56.316 --> 00:01:57.610
that the proportion of adults who approved

00:01:57.610 --> 00:02:00.220
was significantly lower in
December than it was in November.

00:02:00.220 --> 00:02:02.100
So, that the alternative hypothesis

00:02:02.100 --> 00:02:04.200
could look something like this.

00:02:04.200 --> 00:02:06.880
That the proportion in December was less

00:02:06.880 --> 00:02:10.370
than the proportion in November.

00:02:10.370 --> 00:02:12.510
Or, it could be that the proportion

00:02:12.510 --> 00:02:16.001
in November is greater than
the proportion in December.

00:02:16.001 --> 00:02:18.660
And, if we look at these choices,

00:02:18.660 --> 00:02:20.730
the proportion in December is less

00:02:20.730 --> 00:02:21.930
than the proportion in November.

00:02:21.930 --> 00:02:23.100
That's what I wrote right over here.

00:02:23.100 --> 00:02:24.580
So, that looks good as well.

00:02:24.580 --> 00:02:25.740
Here, they swap it.

00:02:25.740 --> 00:02:27.780
Here, they're saying our
alternative hypothesis is

00:02:27.780 --> 00:02:30.380
that the true proportion
December is larger,

00:02:30.380 --> 00:02:32.290
is more than the true
proportion in November

00:02:32.290 --> 00:02:33.660
which is the opposite of what say here.

00:02:33.660 --> 00:02:35.160
So, we rule that one out.

00:02:35.160 --> 00:02:37.770
Here, they're just saying that
we actually have a difference

00:02:37.770 --> 00:02:38.850
in the proportions.

00:02:38.850 --> 00:02:40.629
And, many times, you will
see something like this,

00:02:40.629 --> 00:02:43.870
but here, Derrick wants
to test if the proportion

00:02:43.870 --> 00:02:46.040
of adults who approved
was significantly lower

00:02:46.040 --> 00:02:47.580
in December than in November.

00:02:47.580 --> 00:02:49.440
He's not interested in
the other way around.

00:02:49.440 --> 00:02:51.522
If he said, if it said
Derrick wants to test

00:02:51.522 --> 00:02:53.050
if the proportion of adults

00:02:53.050 --> 00:02:55.200
who approved was significantly different

00:02:55.200 --> 00:02:57.100
in December than November,

00:02:57.100 --> 00:03:00.240
then you would pick choice
C instead of choice A.

00:03:00.240 --> 00:03:01.550
But, given the way it was phrased,

00:03:01.550 --> 00:03:03.130
I would pick choice A.

00:03:03.130 --> 00:03:04.281
Let's do another example.

00:03:04.281 --> 00:03:09.230
Here, it says that Kiley
has a dime and a nickel

00:03:09.230 --> 00:03:11.421
and she wonders if they
have the same likelihood

00:03:11.421 --> 00:03:13.930
of showing heads when they are flipped.

00:03:13.930 --> 00:03:16.189
She flips each coin 100 times to test

00:03:16.189 --> 00:03:18.351
if there is a significant difference

00:03:18.351 --> 00:03:20.350
in the proportion of flips

00:03:20.350 --> 00:03:24.560
that they each land showing heads.

00:03:24.560 --> 00:03:26.200
Which of the following
is an appropriate set

00:03:26.200 --> 00:03:28.360
of hypotheses for Kiley's
significance test?

00:03:28.360 --> 00:03:29.680
So, once again, pause the video.

00:03:29.680 --> 00:03:31.440
Try to do it on your own.

00:03:31.440 --> 00:03:33.620
Alright, well, your
null hypothesis would be

00:03:33.620 --> 00:03:35.050
that there is no difference.

00:03:35.050 --> 00:03:36.690
So, that the proportion of getting heads

00:03:36.690 --> 00:03:39.430
with your dime is the
same as your proportion

00:03:39.430 --> 00:03:41.970
of heads with your nickel.

00:03:41.970 --> 00:03:43.773
And then, your alternative hypothesis,

00:03:43.773 --> 00:03:45.490
so it says here she fl,

00:03:45.490 --> 00:03:48.385
she wants to test if there's
a significant difference.

00:03:48.385 --> 00:03:50.950
She's not trying to say if the proportion

00:03:50.950 --> 00:03:52.800
of dimes coming up head
is significantly lower

00:03:52.800 --> 00:03:53.640
or significantly larger.

00:03:53.640 --> 00:03:55.270
She just cares about the difference.

00:03:55.270 --> 00:03:56.650
If there's a significant difference

00:03:56.650 --> 00:03:58.480
in the proportion of slips.

00:03:58.480 --> 00:03:59.820
So, her alternative hypothesis is

00:03:59.820 --> 00:04:00.730
that there is a difference.

00:04:00.730 --> 00:04:04.340
That these two proportions
are not equal to each other.

00:04:04.340 --> 00:04:05.916
And, so, if we look at the choices,

00:04:05.916 --> 00:04:08.420
so this null hypothesis looks good.

00:04:08.420 --> 00:04:10.022
This null hypothesis does not look good.

00:04:10.022 --> 00:04:12.170
Remember, you're null hypothesis,

00:04:12.170 --> 00:04:14.380
you're trying to assume that,
man, there's no news here.

00:04:14.380 --> 00:04:15.760
So, all of these null hypotheses,

00:04:15.760 --> 00:04:19.230
these, A, B, and D's null
hypotheses look good.

00:04:19.230 --> 00:04:21.290
And then, the alternative hypotheses is

00:04:21.290 --> 00:04:25.400
this is exactly what we
wrote before is for choice D.

00:04:25.400 --> 00:04:28.930
Choice A's alternative
hypothesis would work

00:04:28.930 --> 00:04:31.550
if here it said she
flips each coin 100 times

00:04:31.550 --> 00:04:35.000
to test if there is, if the proportion

00:04:35.000 --> 00:04:37.490
of heads with the dime
is significantly lower

00:04:37.490 --> 00:04:39.310
than the proportion of
heads with the nickel

00:04:39.310 --> 00:04:40.606
or something like that.

00:04:40.606 --> 00:04:42.420
And then, if it was the reverse,

00:04:42.420 --> 00:04:43.970
then choice B would look good.

00:04:43.970 --> 00:04:45.560
But, she just wants to see
if there's a difference,

00:04:45.560 --> 00:04:48.450
not if one is lower than the other.

00:04:48.450 --> 00:04:50.253
And, so I would pick choice D.


Hypothesis test for difference in proportions

WEBVTT
Kind: captions
Language: en

00:00:00.090 --> 00:00:02.100
- [Instructor] We're now going
to explore hypothesis testing

00:00:02.100 --> 00:00:04.000
where we're thinking about the difference

00:00:04.000 --> 00:00:07.630
between proportions of
two different populations.

00:00:07.630 --> 00:00:10.610
So here it says, here are the
results from a recent poll

00:00:10.610 --> 00:00:12.620
that involved sampling voters from each

00:00:12.620 --> 00:00:15.470
of two neighboring districts,
District A and District B,

00:00:15.470 --> 00:00:17.500
and folks were asked
whether they supported

00:00:17.500 --> 00:00:19.700
a new law or not, and from each district,

00:00:19.700 --> 00:00:22.470
we took a sample of 100 voters.

00:00:22.470 --> 00:00:25.020
And then we were able to
calculate the proportion

00:00:25.020 --> 00:00:27.110
from that sample that supported the law.

00:00:27.110 --> 00:00:29.200
And then here we have the combined data,

00:00:29.200 --> 00:00:30.920
including the combined proportion.

00:00:30.920 --> 00:00:32.900
And we're asked, does this suggest

00:00:32.900 --> 00:00:35.910
a significant difference
between the two districts.

00:00:35.910 --> 00:00:39.140
And so this is asking
for a hypothesis test,

00:00:39.140 --> 00:00:40.780
and the way we would do that is

00:00:40.780 --> 00:00:42.880
we would set up our null hypothesis,

00:00:42.880 --> 00:00:44.850
and remember our null
hypothesis is the one

00:00:44.850 --> 00:00:47.110
that we would assume that
there is no difference.

00:00:47.110 --> 00:00:49.890
So we would assume that the
true proportion of folks

00:00:49.890 --> 00:00:54.120
in District A that support
the new law is equal

00:00:54.120 --> 00:00:56.900
to the proportion in District
B that support the law.

00:00:56.900 --> 00:00:58.320
Or another way to think about it is that

00:00:58.320 --> 00:01:01.030
the difference would be equal to zero.

00:01:01.030 --> 00:01:03.450
And our alternative hypothesis

00:01:03.450 --> 00:01:06.080
is that the absolute difference between

00:01:06.080 --> 00:01:10.400
the proportions is not equal to zero.

00:01:10.400 --> 00:01:13.360
And if we were doing an
all out hypothesis test,

00:01:13.360 --> 00:01:15.620
we would set a significance level,

00:01:15.620 --> 00:01:17.540
which we usually denote with an alpha.

00:01:17.540 --> 00:01:20.060
Often times it might be
a 10% significance level

00:01:20.060 --> 00:01:21.580
or a 5% significance level.

00:01:21.580 --> 00:01:24.400
Let's say we set it at
a 5% significance level.

00:01:24.400 --> 00:01:26.007
And what we would do is, we would say,

00:01:26.007 --> 00:01:30.207
"All right, let's assume that
the null hypothesis is true,

00:01:30.207 --> 00:01:33.247
"and assuming the null hypothesis is true,

00:01:33.247 --> 00:01:36.587
"what is the probability of
getting a difference between our

00:01:36.587 --> 00:01:40.067
"sample proportions this extreme or more?

00:01:40.067 --> 00:01:42.727
"And if that probability is
less than our significance

00:01:42.727 --> 00:01:45.487
"level, then we reject
the null hypothesis,

00:01:45.487 --> 00:01:48.240
"which would suggest the alternative."

00:01:48.240 --> 00:01:50.770
Now before we go deeper
into our inference,

00:01:50.770 --> 00:01:52.880
we want to test our
conditions for inference,

00:01:52.880 --> 00:01:55.400
and we've seen these many times before.

00:01:55.400 --> 00:01:57.900
You have the Random condition,

00:01:57.900 --> 00:01:59.910
where you would need
to feel good that both

00:01:59.910 --> 00:02:02.650
of these samples are truly random.

00:02:02.650 --> 00:02:06.420
You would have your Normal condition,

00:02:06.420 --> 00:02:08.910
which is that you would
have at least 10 successes

00:02:08.910 --> 00:02:11.300
and failures in each of these samples,

00:02:11.300 --> 00:02:14.460
and we see that we do
indeed have at least 10

00:02:14.460 --> 00:02:18.450
successes and at least 10
failures in each of those samples.

00:02:18.450 --> 00:02:21.930
And then you have your
Independence condition,

00:02:21.930 --> 00:02:23.860
and the Independence condition,

00:02:23.860 --> 00:02:26.220
you're either sampling with replacement

00:02:26.220 --> 00:02:29.530
or you need to feel good that
each of these sample sizes

00:02:29.530 --> 00:02:32.390
are no more than 10% of
the entire population,

00:02:32.390 --> 00:02:34.080
and so I guess we will assume that there's

00:02:34.080 --> 00:02:36.000
at least 1,000 folks in District A

00:02:36.000 --> 00:02:37.980
and at least 1,000 folks in District B

00:02:37.980 --> 00:02:42.190
and that will allow us to meet
the Independence condition.

00:02:42.190 --> 00:02:43.570
And so with that out of the way,

00:02:43.570 --> 00:02:45.620
let's assume the null hypothesis,

00:02:45.620 --> 00:02:48.040
and let's just start
thinking about the sampling

00:02:48.040 --> 00:02:50.860
distribution of the difference between

00:02:50.860 --> 00:02:54.390
the sample proportions
assuming that null hypothesis.

00:02:54.390 --> 00:02:56.440
So the first thing I wanna think about is

00:02:56.440 --> 00:03:00.290
what is going to be the standard deviation

00:03:00.290 --> 00:03:05.230
of the difference in the
sampling distributions.

00:03:06.220 --> 00:03:08.320
Well, we have seen in a previous video

00:03:08.320 --> 00:03:10.840
when we talked about
differences of proportions.

00:03:10.840 --> 00:03:12.450
We can think about the variance,

00:03:12.450 --> 00:03:15.723
so the variance of the
sampling distribution.

00:03:16.820 --> 00:03:18.300
There's a lot of notation here.

00:03:18.300 --> 00:03:21.670
So the variance, this
is going to be equal to

00:03:21.670 --> 00:03:25.980
the variance of the sampling distribution

00:03:25.980 --> 00:03:30.540
of the sample proportion from District A

00:03:30.540 --> 00:03:33.980
plus the variance

00:03:33.980 --> 00:03:36.250
of the sampling distribution

00:03:36.250 --> 00:03:40.260
of the sample proportion from District B.

00:03:40.260 --> 00:03:43.160
Now in general, you can
figure out the variance

00:03:43.160 --> 00:03:45.160
of the sampling distribution of a sample

00:03:45.160 --> 00:03:47.310
proportion with the following formula.

00:03:47.310 --> 00:03:48.400
We've seen this before.

00:03:48.400 --> 00:03:50.640
The variance of the sampling distribution

00:03:50.640 --> 00:03:54.920
of the sample proportion
is going to be equal to our

00:03:54.920 --> 00:03:58.300
true proportion times one
minus our true proportion,

00:03:58.300 --> 00:04:01.550
all of that over your sample size.

00:04:01.550 --> 00:04:03.730
Now in either situation, we don't know

00:04:03.730 --> 00:04:06.260
the true proportions for
District A or District B.

00:04:06.260 --> 00:04:08.760
That's why we are in this,
that's why we're even

00:04:08.760 --> 00:04:11.380
doing this hypothesis test to begin with.

00:04:11.380 --> 00:04:13.190
But we can try to estimate it.

00:04:13.190 --> 00:04:16.930
Remember, we're assuming that
the true proportions are equal

00:04:16.930 --> 00:04:18.940
even though we might
not know what they are.

00:04:18.940 --> 00:04:21.070
And what is going to be our best estimate

00:04:21.070 --> 00:04:24.110
of that true proportion if
we assume that District A

00:04:24.110 --> 00:04:25.950
and District B have no difference in terms

00:04:25.950 --> 00:04:28.440
of the number of people
who support the new law?

00:04:28.440 --> 00:04:30.250
Well the best estimate would actually be

00:04:30.250 --> 00:04:33.500
the combined sample, the combined sample

00:04:33.500 --> 00:04:35.310
proportion right over here.

00:04:35.310 --> 00:04:38.740
And so to estimate these values,

00:04:38.740 --> 00:04:42.290
we use this combined sample proportion

00:04:42.290 --> 00:04:45.450
in the place of P over here.

00:04:45.450 --> 00:04:49.110
So we could say that this is going to be

00:04:49.110 --> 00:04:50.970
our combined sample proportion

00:04:52.490 --> 00:04:55.473
times one minus our
combined sample proportion,

00:04:56.670 --> 00:04:59.963
all of that over our sample size.

00:05:00.950 --> 00:05:02.880
And since we're assuming
that there's no difference

00:05:02.880 --> 00:05:04.880
between District A and District B,

00:05:04.880 --> 00:05:08.983
this would also apply to
that right over there.

00:05:09.900 --> 00:05:12.110
So let me rewrite this again,

00:05:12.110 --> 00:05:15.050
the standard deviation of
the sampling distribution

00:05:15.050 --> 00:05:17.900
of the difference of
the sample proportions

00:05:17.900 --> 00:05:22.120
from District A and District
B is going to be roughly.

00:05:22.120 --> 00:05:24.160
Remember we weren't able
to calculate it exactly,

00:05:24.160 --> 00:05:25.750
but we're using this combined

00:05:25.750 --> 00:05:27.680
proportion as our best estimate.

00:05:27.680 --> 00:05:31.860
Let me do a big square root
right over here, a big radical.

00:05:31.860 --> 00:05:34.670
And so underneath that, we
are going to have our estimate

00:05:34.670 --> 00:05:38.270
of this, which is 0.55

00:05:38.270 --> 00:05:42.580
times one minus 0.55, so 0.45,

00:05:42.580 --> 00:05:44.910
over 100

00:05:44.910 --> 00:05:47.300
plus our estimate of this,

00:05:47.300 --> 00:05:48.760
which is

00:05:48.760 --> 00:05:50.210
0.55.

00:05:50.210 --> 00:05:51.730
It's the same thing again.

00:05:51.730 --> 00:05:54.650
Times 0.45, and remember
that's because we're assuming

00:05:54.650 --> 00:05:56.650
the null hypothesis is true.

00:05:56.650 --> 00:05:59.310
All of that over this sample size.

00:05:59.310 --> 00:06:01.750
All of that over 100.

00:06:01.750 --> 00:06:03.410
And now we can get our calculator out

00:06:03.410 --> 00:06:04.940
to actually calculate it.

00:06:04.940 --> 00:06:09.203
And so we get the square root of

00:06:09.203 --> 00:06:14.203
0.55 times 0.45 divided by 100.

00:06:15.660 --> 00:06:17.380
Now I could add that whole thing again

00:06:17.380 --> 00:06:19.320
or I could just multiply by two.

00:06:19.320 --> 00:06:22.400
So times two is equal to

00:06:22.400 --> 00:06:23.993
approximately 0.07.

00:06:25.590 --> 00:06:28.220
So this is going to be

00:06:28.220 --> 00:06:32.720
approximately equal to 0.07,

00:06:32.720 --> 00:06:36.687
and now using this, we
can calculate a z-score,

00:06:36.687 --> 00:06:37.880
and then we could think
about, what's the probability

00:06:37.880 --> 00:06:41.010
of getting a z-score that extreme or more.

00:06:41.010 --> 00:06:44.170
And so our z-score, or our z-value,

00:06:44.170 --> 00:06:47.017
would be equal to the
difference that we got.

00:06:47.017 --> 00:06:51.210
P hat sub A, minus P hat sub B,

00:06:51.210 --> 00:06:53.200
all of that over our estimate of

00:06:53.200 --> 00:06:55.530
the standard deviation of
the sampling distribution

00:06:55.530 --> 00:06:58.560
of the difference between
the sample proportions,

00:06:58.560 --> 00:07:01.883
so all of that over 0.07.

00:07:03.380 --> 00:07:08.380
Now this up here in
yellow, 0.58 minus 0.52,

00:07:08.490 --> 00:07:10.340
this is going to be equal to 0.06

00:07:12.740 --> 00:07:16.110
over 0.07.

00:07:16.110 --> 00:07:18.230
0.07.

00:07:18.230 --> 00:07:20.560
We can get our calculator
out for this again,

00:07:20.560 --> 00:07:22.450
and so we have

00:07:22.450 --> 00:07:26.500
0.06 divided by 0.07

00:07:26.500 --> 00:07:29.113
is going to be, it's approximately 0.86,

00:07:30.460 --> 00:07:34.400
so this is approximately 0.86.

00:07:34.400 --> 00:07:35.740
Now what's the probability of getting

00:07:35.740 --> 00:07:38.160
something this extreme or more extreme?

00:07:38.160 --> 00:07:41.300
Let me just make sure we
can visualize it properly.

00:07:41.300 --> 00:07:44.090
So if this is our sampling distribution

00:07:44.090 --> 00:07:47.320
of the difference between
our sample proportions,

00:07:47.320 --> 00:07:49.830
and we're assuming the null hypothesis,

00:07:49.830 --> 00:07:52.110
so the mean of our sampling distribution

00:07:52.110 --> 00:07:57.010
is going to be zero, is
going to be zero right there,

00:07:57.010 --> 00:07:59.650
we just got a result that is

00:07:59.650 --> 00:08:01.930
less than a standard
deviation above the mean.

00:08:01.930 --> 00:08:03.070
So we just got a result.

00:08:03.070 --> 00:08:05.110
So this is one standard deviation,

00:08:05.110 --> 00:08:06.940
two standard deviations above the mean.

00:08:06.940 --> 00:08:08.500
One standard deviation below the mean.

00:08:08.500 --> 00:08:10.400
Two standard deviations below the mean.

00:08:10.400 --> 00:08:12.950
We just got a result that is,

00:08:12.950 --> 00:08:14.620
that puts us right there,

00:08:14.620 --> 00:08:16.450
and if we asked ourselves,
what's the probability

00:08:16.450 --> 00:08:18.740
of getting result at least that extreme,

00:08:18.740 --> 00:08:20.540
we would say, okay, it would
be, what's the probability

00:08:20.540 --> 00:08:22.710
of getting a result all of
this area right over here,

00:08:22.710 --> 00:08:25.190
and would also be what's this area

00:08:25.190 --> 00:08:27.680
on the other side of the mean.

00:08:27.680 --> 00:08:30.620
And we know that this is over 30%

00:08:30.620 --> 00:08:33.670
because even if you just
exclude one standard deviation

00:08:33.670 --> 00:08:35.760
above and below the mean, if
you say anything more extreme

00:08:35.760 --> 00:08:38.890
than that, so if you put
this area and this area,

00:08:38.890 --> 00:08:41.960
you're looking at roughly 31 or 32%.

00:08:41.960 --> 00:08:43.660
So the probability of getting something

00:08:43.660 --> 00:08:47.430
at least this extreme
is going to be over 30%,

00:08:47.430 --> 00:08:49.580
and so it's definitely going to be higher

00:08:49.580 --> 00:08:51.340
than our significance level.

00:08:51.340 --> 00:08:52.690
It's actually completely reasonable

00:08:52.690 --> 00:08:54.940
to get a difference this extreme

00:08:54.940 --> 00:08:58.190
if we assume the null hypothesis is true.

00:08:58.190 --> 00:09:00.320
In future videos, we can go even deeper,

00:09:00.320 --> 00:09:02.050
where we can actually just look this up

00:09:02.050 --> 00:09:05.860
on a z-table to calculate
these areas more precisely,

00:09:05.860 --> 00:09:08.140
and we can compare them
to the significance level,

00:09:08.140 --> 00:09:09.810
but here it's not even close.

00:09:09.810 --> 00:09:11.280
We're nowhere close to being able to

00:09:11.280 --> 00:09:13.330
reject the null hypothesis.

00:09:13.330 --> 00:09:14.980
So to answer the question,
does this suggest

00:09:14.980 --> 00:09:16.860
a significant difference
between the two districts?

00:09:16.860 --> 00:09:18.133
No, no it doesn't.


Law of conservation of energy

WEBVTT
Kind: captions
Language: en

00:00:00.290 --> 00:00:01.327
- [Instructor] Get excited

00:00:01.327 --> 00:00:04.170
because in this video
we're going to talk about

00:00:04.170 --> 00:00:07.600
one of the most important
laws in all of science.

00:00:07.600 --> 00:00:11.260
And that is the law of
conservation of energy.

00:00:11.260 --> 00:00:13.520
You'd be amazed by how
much of the universe

00:00:13.520 --> 00:00:17.670
we can infer based on the law
of conservation of energy.

00:00:17.670 --> 00:00:19.810
And you'll be amazed by
how many holes you can poke

00:00:19.810 --> 00:00:22.330
in science fiction plots based on the law

00:00:22.330 --> 00:00:24.210
of conservation of energy.

00:00:24.210 --> 00:00:26.270
Let's just start with the language

00:00:26.270 --> 00:00:27.690
that you might typically see.

00:00:27.690 --> 00:00:30.494
And then we'll try to understand
it a little bit deeper.

00:00:30.494 --> 00:00:33.411
So it tells us that the total energy

00:00:33.411 --> 00:00:37.139
of an isolated system is constant.

00:00:37.139 --> 00:00:40.457
Energy is neither created nor destroyed.

00:00:40.457 --> 00:00:45.050
It could only be transformed
from one form to another

00:00:45.050 --> 00:00:47.810
or transferred from one system to another;

00:00:47.810 --> 00:00:49.970
I pretty much underlined the whole thing

00:00:49.970 --> 00:00:51.280
because it's so important.

00:00:51.280 --> 00:00:54.300
Now to understand this,
let's just think about

00:00:54.300 --> 00:00:56.435
the types of energy that we have studied.

00:00:56.435 --> 00:00:59.706
We have studied things
like kinetic energy,

00:00:59.706 --> 00:01:04.706
which is the energy due
to an object's motion.

00:01:04.860 --> 00:01:09.460
We have talked about potential energy,

00:01:09.460 --> 00:01:13.440
which you could view as energy
due to an object's position.

00:01:13.440 --> 00:01:16.310
And that would be the case of
mechanical potential energy.

00:01:16.310 --> 00:01:19.016
If you were to combine
these two types of energy,

00:01:19.016 --> 00:01:22.560
together, they're known
as mechanical energy.

00:01:22.560 --> 00:01:24.890
So let me put a little box around it.

00:01:24.890 --> 00:01:28.763
That is mechanical energy.

00:01:29.700 --> 00:01:31.550
And when you're first learning physics,

00:01:31.550 --> 00:01:33.840
these are the types of
energies that we focus on.

00:01:33.840 --> 00:01:35.383
But there are other types of energy.

00:01:35.383 --> 00:01:37.160
There's thermal energy.

00:01:37.160 --> 00:01:39.900
You have nuclear energy.

00:01:39.900 --> 00:01:41.490
You have chemical energy.

00:01:41.490 --> 00:01:43.060
And so these aren't the only forms.

00:01:43.060 --> 00:01:45.587
So when we talk about the law
of conservation of energy,

00:01:45.587 --> 00:01:48.221
things like kinetic energy
could be transformed

00:01:48.221 --> 00:01:50.500
into chemical energy.

00:01:50.500 --> 00:01:52.882
But we're not gonna talk about
those other types of energies

00:01:52.882 --> 00:01:55.160
in this video.

00:01:55.160 --> 00:01:56.923
So to start to appreciate this,

00:01:56.923 --> 00:02:00.260
let's first think about
how mechanical energy

00:02:00.260 --> 00:02:01.320
can be conserved.

00:02:01.320 --> 00:02:02.660
So you could almost view this as a law

00:02:02.660 --> 00:02:04.920
of conversation of mechanical energy.

00:02:04.920 --> 00:02:05.790
But then we're gonna make things

00:02:05.790 --> 00:02:06.970
a little bit more complicated

00:02:06.970 --> 00:02:08.490
and see if we can trip ourselves up

00:02:08.490 --> 00:02:10.320
and see if we can somehow defy the law

00:02:10.320 --> 00:02:11.630
of conservation of energy.

00:02:11.630 --> 00:02:13.760
And be very skeptical of anyone who claims

00:02:13.760 --> 00:02:15.460
that they can defy the law

00:02:15.460 --> 00:02:17.722
of conservation of energy.

00:02:17.722 --> 00:02:20.781
So let's start with a system that contains

00:02:20.781 --> 00:02:22.460
all of the Earth in a ball.

00:02:22.460 --> 00:02:25.693
So let's just call this
the Earth-ball system.

00:02:29.940 --> 00:02:31.410
And when you're dealing with

00:02:31.410 --> 00:02:32.950
the law of conservation of energy,

00:02:32.950 --> 00:02:34.127
it's important to specify your system.

00:02:34.127 --> 00:02:36.950
And we're going to assume
that it's an isolated system,

00:02:36.950 --> 00:02:38.280
that it's not interacting much

00:02:38.280 --> 00:02:39.888
with other outside systems,

00:02:39.888 --> 00:02:42.110
the things like the sun or whatever else.

00:02:42.110 --> 00:02:45.300
And so we have, I've drawn the Earth here,

00:02:45.300 --> 00:02:47.630
in this kind of grass flat thing.

00:02:47.630 --> 00:02:49.030
And then let me draw my ball.

00:02:49.030 --> 00:02:52.180
And let's say my ball
is held above the Earth,

00:02:52.180 --> 00:02:53.650
just like that.

00:02:53.650 --> 00:02:55.720
So while the ball is stationary,

00:02:55.720 --> 00:02:57.713
and we'll assume that there's no air here.

00:02:57.713 --> 00:03:00.837
So while the ball is stationary like that,

00:03:00.837 --> 00:03:03.970
then we have all potential energy,

00:03:03.970 --> 00:03:06.070
we could call it gravitational
potential energy.

00:03:06.070 --> 00:03:08.730
So it's all, and the symbol

00:03:08.730 --> 00:03:11.490
for potential energy we tend to use is U.

00:03:11.490 --> 00:03:14.120
And we could say this is
gravitational potential energy.

00:03:14.120 --> 00:03:15.998
And we could say there's
no kinetic energy.

00:03:15.998 --> 00:03:19.820
No kinetic energy.

00:03:19.820 --> 00:03:21.430
If we thought about a broader system,

00:03:21.430 --> 00:03:23.998
if we talk about the solar
system or something like that,

00:03:23.998 --> 00:03:26.530
then the Earth is orbiting around the sun,

00:03:26.530 --> 00:03:28.600
the sun is orbiting around
the central of the galaxy.

00:03:28.600 --> 00:03:29.750
But that's why we're specifying,

00:03:29.750 --> 00:03:32.330
this is the Earth-ball system.

00:03:32.330 --> 00:03:34.750
But what would happen if I
were to let go of the ball?

00:03:34.750 --> 00:03:37.380
And especially what is the
energy profile of the ball

00:03:37.380 --> 00:03:40.730
right as it touches the
ground right over here?

00:03:40.730 --> 00:03:43.550
And I'm assuming it's just
going to hit the ground

00:03:43.550 --> 00:03:45.190
and just not bounce in any way,

00:03:45.190 --> 00:03:47.040
that would complicate things.

00:03:47.040 --> 00:03:49.320
Well, in that situation, all of a sudden

00:03:49.320 --> 00:03:54.320
you have no gravitational
potential energy,

00:03:54.471 --> 00:03:57.200
but right as it touches it,
not when it's stationary,

00:03:57.200 --> 00:03:58.810
right as it touches it, it's gonna have

00:03:58.810 --> 00:04:00.253
a lot of kinetic energy.

00:04:00.253 --> 00:04:05.170
So all kinetic energy.

00:04:05.170 --> 00:04:07.240
And so what we saw, what we see here,

00:04:07.240 --> 00:04:10.240
is that that potential
energy all gets transferred

00:04:10.240 --> 00:04:14.240
into kinetic energy right as
that ball touches the ground.

00:04:14.240 --> 00:04:15.387
Now I know what you're thinking.

00:04:15.387 --> 00:04:18.020
But what about right after that moment?

00:04:18.020 --> 00:04:19.600
If that ball, especially
if doesn't bounce,

00:04:19.600 --> 00:04:20.830
if it just sits there,

00:04:20.830 --> 00:04:22.450
it looks like we have no energy anymore.

00:04:22.450 --> 00:04:25.156
It looks like energy has been destroyed.

00:04:25.156 --> 00:04:28.900
So my question to you is
where did that energy go?

00:04:28.900 --> 00:04:31.000
Pause the video and try to think about it.

00:04:32.020 --> 00:04:34.087
So some of you might
say, "Hey, once the ball

00:04:34.087 --> 00:04:35.937
"has just, it's at rest there,

00:04:35.937 --> 00:04:37.367
"well, maybe we found a case

00:04:37.367 --> 00:04:40.110
"where we have defied the law
of conservation of energy."

00:04:40.110 --> 00:04:41.420
And, remember, I told you, be skeptical

00:04:41.420 --> 00:04:43.390
if (chuckles) anyone ever tells you that.

00:04:43.390 --> 00:04:47.120
Where the energy has gone,
it's been dissipated.

00:04:47.120 --> 00:04:49.490
It has gone into heat.

00:04:49.490 --> 00:04:52.160
It would have been converted
into thermal energy.

00:04:52.160 --> 00:04:55.420
So the ball and the
ground would actually get

00:04:55.420 --> 00:04:58.760
that much warmer because
that kinetic energy,

00:04:58.760 --> 00:05:00.010
right as it touches the ground

00:05:00.010 --> 00:05:02.480
would be turned into thermal energy.

00:05:02.480 --> 00:05:05.090
So one again, we have not defied the law

00:05:05.090 --> 00:05:07.140
of conservation of energy.

00:05:07.140 --> 00:05:08.572
Now another thing you might say is,

00:05:08.572 --> 00:05:11.340
"Well, okay, imagine a
world that there is air."

00:05:11.340 --> 00:05:13.510
So let me draw a bunch of air particles

00:05:13.510 --> 00:05:14.580
right over here.

00:05:14.580 --> 00:05:17.650
And we know that if as a ball falls down

00:05:17.650 --> 00:05:19.320
it goes through the air,

00:05:19.320 --> 00:05:21.130
you could consider that air resistance.

00:05:21.130 --> 00:05:24.216
Some people would call that
the friction due to air.

00:05:24.216 --> 00:05:26.770
Well, that would slow that ball down.

00:05:26.770 --> 00:05:28.830
So maybe it would not have
as much kinetic energy

00:05:28.830 --> 00:05:30.090
when it gets down here.

00:05:30.090 --> 00:05:32.285
And so it seems like
energy would be destroyed

00:05:32.285 --> 00:05:33.760
in that situation.

00:05:33.760 --> 00:05:35.310
And, once again, I would tell you, no,

00:05:35.310 --> 00:05:37.600
the energy has not been destroyed.

00:05:37.600 --> 00:05:41.420
As the ball falls down, it's
going to heat up the ball

00:05:41.420 --> 00:05:43.220
and the air around it.

00:05:43.220 --> 00:05:45.507
And so, once again, that air resistance,

00:05:45.507 --> 00:05:48.060
that is a dissipative force.

00:05:48.060 --> 00:05:51.430
It's going to result in the
generation of thermal energy.

00:05:51.430 --> 00:05:52.860
And if we wanted to write this

00:05:52.860 --> 00:05:55.000
in terms of equations,
there's a couple of ways

00:05:55.000 --> 00:05:55.885
to write this.

00:05:55.885 --> 00:05:57.868
We could write, if we're
just writing the law

00:05:57.868 --> 00:06:00.040
of conservation of mechanical energy,

00:06:00.040 --> 00:06:01.912
and we're not talking
about dissipative forces,

00:06:01.912 --> 00:06:05.265
we could say that the
initial kinetic energy

00:06:05.265 --> 00:06:10.265
plus the initial potential
energy is going to be

00:06:10.670 --> 00:06:15.134
equal to, is gonna be equal
to your final kinetic energy,

00:06:15.134 --> 00:06:20.023
your final kinetic energy, plus
your final potential energy.

00:06:21.040 --> 00:06:23.263
Now another way to write
this exact same thing

00:06:23.263 --> 00:06:27.258
is to say that the
change in kinetic energy

00:06:27.258 --> 00:06:31.612
plus the change in potential energy

00:06:31.612 --> 00:06:34.259
is going to be equal to zero,

00:06:34.259 --> 00:06:37.485
assuming we don't have
any dissipative forces,

00:06:37.485 --> 00:06:39.500
and assuming that we're not converting

00:06:39.500 --> 00:06:41.100
into some of these other forms of energy,

00:06:41.100 --> 00:06:43.902
like chemical energy, or thermal energy.

00:06:43.902 --> 00:06:47.785
But if you wanted to
include dissipative forces,

00:06:47.785 --> 00:06:50.618
dissipative forces do something called

00:06:50.618 --> 00:06:53.250
non-conservative work.

00:06:53.250 --> 00:06:54.863
They do actually negative work,

00:06:54.863 --> 00:06:56.780
because the force of, say, friction,

00:06:56.780 --> 00:06:59.383
is always acting opposite
in the direction of motion.

00:06:59.383 --> 00:07:03.130
So to factor that in, we
could rewrite these equations.

00:07:03.130 --> 00:07:06.600
We could write that your
initial kinetic energy,

00:07:06.600 --> 00:07:09.786
plus your initial potential energy,

00:07:09.786 --> 00:07:14.090
plus any work done by
non-conservative forces,

00:07:14.090 --> 00:07:16.640
this would be like air
resistance or friction.

00:07:16.640 --> 00:07:19.120
And this would be negative right over here

00:07:19.120 --> 00:07:20.618
if we're talking about, say, friction.

00:07:20.618 --> 00:07:25.146
That is going to be equal to
your final kinetic energy,

00:07:25.146 --> 00:07:28.440
plus your final potential energy.

00:07:28.440 --> 00:07:29.985
Or this one right over here,

00:07:29.985 --> 00:07:33.167
we could write your change,

00:07:33.167 --> 00:07:38.167
change in kinetic energy, plus
change in potential energy

00:07:40.020 --> 00:07:45.020
is going to be equal to the
work done by dissipative forces.

00:07:45.340 --> 00:07:47.216
And, remember, if we're
talking about friction,

00:07:47.216 --> 00:07:49.250
dissipative forces, this right over here

00:07:49.250 --> 00:07:51.616
is going to be negative.

00:07:51.616 --> 00:07:53.900
Another way that you
could've thought about this

00:07:53.900 --> 00:07:55.959
is we could've put in thermal energy,

00:07:55.959 --> 00:07:58.480
we could say that our
change in kinetic energy,

00:07:58.480 --> 00:08:00.220
plus our change in potential energy,

00:08:00.220 --> 00:08:02.150
plus our change in thermal energy

00:08:02.150 --> 00:08:04.640
is going to be equal to zero.

00:08:04.640 --> 00:08:07.081
Or you can include the work done

00:08:07.081 --> 00:08:08.860
by a dissipative force.

00:08:08.860 --> 00:08:11.960
And so, for example,
if you saw a situation

00:08:11.960 --> 00:08:14.890
where your total change
in mechanical energy

00:08:14.890 --> 00:08:16.717
right over here was negative,

00:08:16.717 --> 00:08:20.000
you're not defying the law
of conservation of energy.

00:08:20.000 --> 00:08:21.930
It's not the energy was destroyed,

00:08:21.930 --> 00:08:25.818
it's that you had this negative work done

00:08:25.818 --> 00:08:28.980
by those dissipative forces.

00:08:28.980 --> 00:08:30.366
And where did that energy go?

00:08:30.366 --> 00:08:34.070
It gets converted to thermal energy.

00:08:34.070 --> 00:08:36.080
So let's do a couple of other examples

00:08:36.080 --> 00:08:37.115
just to appreciate this.

00:08:37.115 --> 00:08:40.956
So let's do a Earth pendulum system here.

00:08:40.956 --> 00:08:43.617
So here, that's the Earth.

00:08:43.617 --> 00:08:47.019
And then I have some type of tower.

00:08:47.019 --> 00:08:49.492
And let's say I have a pendulum here.

00:08:49.492 --> 00:08:52.680
I have a pendulum.

00:08:52.680 --> 00:08:54.723
And at the low point, the ball

00:08:54.723 --> 00:08:56.340
just goes right over there,

00:08:56.340 --> 00:08:59.030
then it goes back up to that point.

00:08:59.030 --> 00:09:00.680
And let's say the difference in height

00:09:00.680 --> 00:09:02.626
between this point right over here,

00:09:02.626 --> 00:09:05.430
and this point where
it is right over there,

00:09:05.430 --> 00:09:08.683
it is equal to H.

00:09:08.683 --> 00:09:10.780
And let's say this is the highest point

00:09:10.780 --> 00:09:14.086
that the end of the pendulum will get to.

00:09:14.086 --> 00:09:17.770
So at this point we are
maximum potential energy.

00:09:17.770 --> 00:09:19.971
And right as it's about
to change direction,

00:09:19.971 --> 00:09:21.820
we have no kinetic energy,

00:09:21.820 --> 00:09:23.544
it's gonna be stationary
for just a moment.

00:09:23.544 --> 00:09:26.420
But then the pendulum's
going to swing back.

00:09:26.420 --> 00:09:28.000
And when it gets right over here,

00:09:28.000 --> 00:09:28.833
all of that potential energy

00:09:28.833 --> 00:09:31.060
is gonna be converted to kinetic energy,

00:09:31.060 --> 00:09:33.020
assuming we don't have
any dissipative forces

00:09:33.020 --> 00:09:35.020
like friction, slash, air resistance.

00:09:35.020 --> 00:09:38.380
And then all that kinetic
energy gets converted back

00:09:38.380 --> 00:09:40.840
into potential energy.

00:09:40.840 --> 00:09:42.570
Another example that we could look at

00:09:42.570 --> 00:09:44.520
that would complicate
this a little bit more

00:09:44.520 --> 00:09:48.480
is to think about an
Earth spring ball system.

00:09:48.480 --> 00:09:49.760
So that's the Earth.

00:09:49.760 --> 00:09:53.060
And let's say there's a
spring right over here.

00:09:53.060 --> 00:09:57.861
And we have a ball that starts stationary.

00:09:57.861 --> 00:10:00.950
So up here it's all potential energy,

00:10:00.950 --> 00:10:02.999
gravitational potential energy.

00:10:02.999 --> 00:10:07.000
So all gravitational potential energy.

00:10:07.000 --> 00:10:09.175
Assuming we have no air
resistance, we let go.

00:10:09.175 --> 00:10:11.551
Right before it touches the spring

00:10:11.551 --> 00:10:14.580
when we have maximum velocity,

00:10:14.580 --> 00:10:18.770
here it is going to be all kinetic energy,

00:10:18.770 --> 00:10:19.900
all kinetic energy,

00:10:19.900 --> 00:10:22.810
but then it's going to
compress the string.

00:10:22.810 --> 00:10:26.010
And assuming we don't have
any thermal energy generated,

00:10:26.010 --> 00:10:27.710
you actually will always,
in the real world,

00:10:27.710 --> 00:10:29.470
have some thermal energy generated,

00:10:29.470 --> 00:10:31.290
but if the spring gets
compressed and at some point

00:10:31.290 --> 00:10:34.120
the ball is over here, well, now,

00:10:34.120 --> 00:10:36.330
you have some of that
energy that's been converted

00:10:36.330 --> 00:10:38.729
into spring potential energy.

00:10:38.729 --> 00:10:41.940
Or sometimes it's called
elastic potential energy,

00:10:41.940 --> 00:10:44.630
because by virtue of
compressing that spring,

00:10:44.630 --> 00:10:46.200
this thing's going to rebound

00:10:46.200 --> 00:10:48.680
and it could be converted
back into kinetic energy

00:10:48.680 --> 00:10:51.953
and/or gravitational potential energy.