[Instructor] So we're going to look at
a simple linear regression
with a couple independent variables.
So we're using the dataset hprice or home price.
So to do a regular linear regression,
we go to the Analyze menu to Regression and Linear.
And you can see I already have the dependent
of the variable is the selling price of the the homes.
And the two independents are the square feet of the homes
and the number of bedrooms.
So one thing that I want to show you
is how to save the residuals and the predicted value.
So if you go to the Save menu,
and you click on the Unstandardized predicted,
that's y-hat, and the Unstandardized residuals,
which we call u-hat,
and hit Continue.
And then it will give you those values as well.
So we hit OK
and we get our results.
So first of all, we see R Squared is a fairly 63%
of the variation is explained by our regressors.
And another way of seeing that it is the ratio
between this number and this number.
So 63% is explained
and about 37 is unexplained.
You could also do the math that this plus this equals this.
So this is the explained sum of squares.
This is the unexplained sum of squares.
And this is the total sum of squares.
You see that our overall model is very significant
with a p-value of less than 0.001
and a nice big F stat.
Just let's scroll down and look at the results.
So what we're seeing here
is it's saying only the square feet is significant.
So for every additional square foot,
looks like you gain about 12 cents
or 13 cents,
or yeah, and then, so that's the results of that.
The other thing that I want to show you is,
I'm going to make this small,
and we now have two new variables.
So Pre 1 is y-hat and Res 1 is u-hat.
And you can see that price equals y-hat plus u-hat.
So this is the actual y,
well, the actual value of it.
This is the predicted value,
and this is the residual.
If you were to take the mean of price and the mean of y-hat,
they would be the same.
And if you took either the sum or the mean of u-hat,
that would be, it would both sum and mean to 0.
So let's bring our data back up,
and let's have another look and let's do another regression.
So I want to show you that if add regressors,
it's going to change the value of all the betas.
So we're going to do another one.
We're going to go Regression, Linear.
This time we're going to turn off the y-hats and the u-hats.
We really don't need them.
And let's add a few more.
So let's add lot size and the assessed value.
Yeah, lot size,
and then whether or not it is a colonial.
And I'm just picking out a few here
just to show you what happens.
So again, we hit OK.
Note that when we add regressors,
R Squared always gets bigger, which is what happened.
It's still highly significant.
Our F stat is bigger.
And note now that only the assess,
so controlling for all these other factors,
only the assessed value.
Note too, that if we take our beta
and divide by our standard error,
we always get our t.
And that big t is small significance.
So what we see here is explaining
that the only one that matters here
is the assessed value based on the significance.
So hopefully this all makes sense and thank you.