馃攳
ANOVA 3: Hypothesis test with F-statistic | Probability and Statistics | Khan Academy - YouTube
Channel: Khan Academy
[0]
In the last couple of videos we first figured out the TOTAL variation in these 9 data points right here
[6]
and we got 30, that's our Total Sum of Squares. Then we asked ourselves,
[11]
how much of that variation is due to variation WITHIN each of these groups, versus variation BETWEEN the groups themselves?
[19]
So, for the variation within the groups we have our Sum of Squares within.
[24]
And there we got 6.
[26]
And then the balance of this, 30, the balance of this variation,
[32]
came from variation between the groups, and we calculated it,
[36]
We got 24.
[39]
What I want to do in this video, is actually use this type of information,
[43]
essentially these statistics we've calculated, to do some inferential statistics,
[49]
to come to some time of conclusion, or maybe not to come to some type of conclusion.
[53]
What I want to do is to put some context around these groups.
[56]
We've been dealing with them abstractly right now, but you can imagine
[60]
these are the results of some type of experiment.
[63]
Let's say that I gave 3 different types of pills or 3 different types of food to people taking a test.
[71]
And these are the scores on the test.
[73]
So this is food 1, food 2, and then this over here is food 3.
[85]
And I want to figure out if the type of food people take going into the test really affect their scores?
[93]
If you look at these means, it looks like they perform best in group 3, than in group 2 or 1.
[100]
But is that difference purely random? Random chance?
[104]
Or can I be pretty confident that it's due to actual differences
[110]
in the population means, of all of the people who would ever take food 3 vs food 2 vs food 1?
[116]
So, my question here is, are the means and the true population means the same?
[123]
This is a sample mean based on 3 samples. But if I knew the true population means--
[130]
So my question is: Is the mean of the population of people taking Food 1 equal to the mean of Food 2?
[137]
Obviously I'll never be able to give that food to every human being that could
[142]
ever live and then make them all take an exam.
[145]
But there is some true mean there, it's just not really measurable.
[150]
So my question is "this" equal to "this" equal to the mean 3, the true population of mean 3.
[155]
And my question is, are these equal?
[158]
Because if they're not equal, that means that the type of food given does have some type of impact
[167]
on how people perform on a test.
[170]
So let's do a little hypothesis test here. Let's say that my null hypothesis
[175]
is that the means are the same. Food doesn't make a difference.
[181]
"food doesn't make a difference"
[187]
and that my Alternate hypothesis is that it does. "It does."
[197]
and the way of thinking about this quantitatively
[199]
is that if it doesn't make a difference,
[200]
the true population means of the groups will be the same.
[204]
The true population mean of the group that took food 1 will be the same
[208]
as the group that took food 2, which will be the same as the group that took food 3.
[215]
If our alternate hypothesis is correct, then these means will not be all the same.
[220]
How can we test this hypothesis?
[223]
So we're going to assume the null hypothesis, which is
[227]
what we always do when we are hypothesis testing,
[229]
we're going to assume our null hypothesis.
[232]
And then essentially figure out, what are the chances
[236]
of getting a certain statistic this extreme?
[239]
And I haven't even defined what that statistic is.
[241]
So we're going to define--we're going to assume our null hypothesis,
[245]
and then we're going to come up with a statistic called the F statistic.
[248]
So our F statistic
[251]
which has an F distribution--and we won't go real deep into the details of
[256]
the F distribution. But you can already start to think of it
[259]
as the ratio of two Chi-squared distributions that may or may not have different degrees of freedom.
[263]
Our F statistic is going to be the ratio of our Sum of Squares between the samples--
[271]
Sum of Squares between
[277]
divided by, our degrees of freedom between
[281]
and this is sometimes called the mean squares between, MSB,
[286]
that, divided by the Sum of Squares within,
[292]
so that's what I had done up here, the SSW in blue,
[296]
divided by the SSW
[301]
divided by the degrees of freedom of the SSwithin, and that was
[307]
m (n-1). Now let's just think about what this is doing right here.
[312]
If this number, the numerator, is much larger than the denominator,
[318]
then that tells us that the variation in this data is due mostly
[327]
to the differences between the actual means
[331]
and its due less to the variation within the means.
[335]
That's if this numerator is much bigger than this denominator over here.
[340]
So that should make us believe that there is a difference
[345]
in the true population mean.
[347]
So if this number is really big,
[348]
it should tell us that there is a lower probability
[351]
that our null hypothesis is correct.
[353]
If this number is really small and our denominator is larger,
[358]
that means that our variation within each sample,
[362]
makes up more of the total variation than our variation between
[365]
the samples. So that means that our variation
[367]
within each of these samples is a bigger percentage of the total variation
[372]
versus the variation between the samples.
[375]
So that would make us believe that "hey! ya know... any difference
[377]
we see between the means is probably just random."
[381]
And that would make it a little harder to reject the null.
[384]
So let's actually calculate it.
[386]
So in this case, our SSbetween, we calculated over here, was 24.
[394]
and we had 2 degrees of freedom.
[397]
And our SSwithin was 6 and we had how many degrees of freedom?
[409]
Also, 6. 6 degrees of freedom.
[412]
So this is going to be 24/2 which is 12, divided by 1.
[418]
Our F statistic that we've calculated is going to be 12.
[425]
F stands for Fischer who is the biologist and statistician who came up with this.
[430]
So our F statistic is going to be 12.
[435]
We're going to see that this is a pretty high number.
[438]
Now, one thing I forgot to mention, with any hypothesis test,
[439]
we're going to need some type of significance level.
[442]
So let's say the significance level that we care about,
[444]
for our hypothesis test, is 10%.
[448]
0.10 -- which means
[452]
that if we assume the null hypothesis, there is
[456]
less than a 10% chance of getting the result we got,
[460]
of getting this F statistic,
[461]
then we will reject the null hypothesis.
[464]
So what we want to do is figure out a critical F statistic value,
[468]
that getting that extreme of a value or greater, is 10%
[474]
and if this is bigger than our critical F statistic value,
[477]
then we're going to reject the null hypothesis,
[479]
if it's less, we can't reject the null.
[481]
So I'm not going to go into a lot of the guts of the F statistic,
[486]
but we can already appreciate that each of these Sum of squares
[489]
has a Chi-squared distribution. "This" has a Chi-squared distribution,
[492]
and "this" has a different Chi-squared distribution
[495]
This is a Chi-squared distribution with 2 degrees of freedom,
[497]
this is a Chi-squared distribution with--And we haven't normalized it and all of that--
[501]
but roughly a Chi squared distribution with 6 degrees of freedom.
[504]
So the F distribution is actually the ratio of two Chi-squared distributions
[509]
And I got this--this is a screenshot from a professor's course at UCLA,
[514]
I hope they don't mind, I need to find us an F table for us to look into.
[518]
But this is what an F distribution looks like.
[521]
And obviously it's going to look different
[523]
depending on the df of the numerator and the denominator.
[526]
There's two df to think about,
[529]
the numerator degrees of freedom and the denominator degrees of freedom
[532]
With that said, let's calculate the critical F statistic,
[536]
for alpha is equal to 0.10,
[542]
and you're actually going to see different F tables for each different alpha,
[546]
where our numerator df is 2, and our denominator df is 6.
[551]
So this table that I got, this whole table is for an alpha of 10%
[557]
or 0.10, and our numerator df was 2 and our denominator
[563]
was 6. So our critical F value is 3.46.
[570]
So our critical F value is 3.46--this value right over here is 3.46
[580]
The value that we got based on our data is much larger than this,
[583]
WAY above it. It's going to have a very, very small p value.
[586]
The probability of getting something this extreme,
[588]
just by chance, assuming the null hypothesis,
[590]
is very low. It's way bigger than our critical F statistic with
[594]
a 10% significance level.
[596]
So because of that we can reject the null hypothesis.
[601]
Which leads us to believe, "you know what, there probably
[604]
IS a difference in the population means."
[606]
Which tells us there probably is a difference in performance
[609]
on an exam if you give them the different foods.
Most Recent Videos:
You can go back to the homepage right here: Homepage





