Line of Best Fit - WheelesClassroom
Transcript Line of Best Fit - WheelesClassroom
Least Square Regression Line
Line of Best Fit
Our objective is to fit a line in the scatterplot that fits
the data the best
As just seen, the best fit would minimize the sum of
Line of best fit looks like:
ŷ b b x
That’s a hat on the y, meaning that it is a prediction not
the actual y values. VERY IMPORTANT!!!
Need a slope and y-intercept
Need a point and slope
An obvious point is the mean of the x and the mean of
This point is the middle of both variables.
Slope in the z’s
If we look at the scatterplot of the z-scores we find that
the line of best fit must go through (0,0)
The slope of the line that minimizes the sum of
squares in the z-scores will always be r.
This tells you that for each increase of 1 standard
deviation in x there is a change of r standard
deviations in y.
Example: Square Foot vs. Selling Price
for Houses in Boulder, CO (Table 2.3)
Here is the scatterplot of the z-scores with
the line that minimizes the sum of squares.
Slope in the actual scatterplot
Since the slope of the line in the z-scores compares the
standard deviations we include these back to get the slope of
the line in the scatterplot of the data.
Thus the slope of the line in the regular scatterplot becomes
Interpretation of the slope:
For every increase of 1 unit in x, there is an
increase/decrease of b1 units in y
s price 45135.6 ssquare _ feet 640.15
Interpretation: For every increase of 1
square foot the selling price increases
Finding intercept, b0
Now that we have the slope, we only need a
point that the line runs through to get the
We have one: ( x , y )
So the equation for intercept becomes:
b0 y b1 x
Interpretation of the intercept is generally
meaningless. So be careful!
x 2627.42 y 177330
b0 y b1 x 177330 47.734(2627.42)
yˆ 51912.73 47.734 x
price 51912.73 47.734( square feet )