Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
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 squares. Line of best fit looks like: ŷ b b x 0 1 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 the y. (x, y) 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) r 0.677 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 sy b1 r sx Interpretation of the slope: For every increase of 1 unit in x, there is an increase/decrease of b1 units in y House sales s price 45135.6 ssquare _ feet 640.15 r 0.677 sy 45135.6 b1 r 0.677 47.734 sx 640.15 Interpretation: For every increase of 1 square foot the selling price increases by $47.73. Finding intercept, b0 Now that we have the slope, we only need a point that the line runs through to get the intercept. 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! House Sales x 2627.42 y 177330 b1 47.734 b0 y b1 x 177330 47.734(2627.42) b0 51912.73 yˆ 51912.73 47.734 x price 51912.73 47.734( square feet )