[Instructor] And so I wanna show you how to do an F-test
that tests the significance of a number of variables,
even when, individually,
they don't pass a T-test for significance.
So we'll go to the MLB dataset,
and we're gonna run this regression right here.
So log salary and the regressors are years, games per year,
batting average, home runs per year and RBIs per year.
So we'll go to the data and we run a linear regression,
where L salary
is the dependent and then the independent is years,
games per year, home runs per year,
RBIs per year, and batting average.
We don't need to save or plot or anything like that.
We're just gonna
run it.
And we find that
our three,
oh, oh, it didn't include the batting average.
Hold on.
Let's run that again.
Regression, linear, and then we just need batting average
in there too.
I must not have added it.
So games per year, home runs per year,
years, RBIs per year, batting average.
Let's make sure that those are there.
Years, games per year, batting average home runs per year,
and RBIs per year on log salary.
Yep, good.
So now we go, boom.
And we find that,
again, our three batting stats here are not significant.
And take note of the sum of squared residuals here.
308.
And we're gonna use that soon.
So now we're gonna restrict our model,
and take out those three,
gonna take out home runs per year,
RBIs per year and batting average.
And we're just gonna run it with these two regressors.
And now what we see are some of squared residuals
has gone down as we expect because
taking regressors out makes it less significant,
or makes it, decreases the explanatory power.
So we're gonna look at this number now too,
and we're gonna go to the F-stat.
And note that it's gone from 183 to 198,
and our queue is three.
I'm gonna move it so you can see this a bit better.
And our F-stat is big, it is about eight,
and eight is big.
And as with any other F-stat,
when you have
a big F-stat,
that is grounds to reject our null,
and assume our null is not true,
that these three batting statistics jointly
are all equal to zero.
So again, our null is that these three things
that we took out.
That's wrong.
It's here.
These three batting stats here,
home runs, RBI and batting average.
We make the assumption a null, that they're all zero.
We drop 'em out of the model, we do an F-test,
we get a huge F-stat and well out in the tails,
very unlikely that we would get that if our null was true,
we conclude our null is then not true.
We reject our null and in this case,
we would use this full model and say that, jointly,
home runs per year, RBIs per year and the batting average,
jointly, they matter even though the P-value is not such
that we would reject the null for the full model.