Presentation is loading. Please wait.

Presentation is loading. Please wait.

GET OUT p.161 HW!.

Similar presentations


Presentation on theme: "GET OUT p.161 HW!."— Presentation transcript:

1 GET OUT p.161 HW!

2 Least-Squares Regression
3.2 Residuals and Residual Plots

3 Residuals A residual is the difference between an observed value of the response variable and the value predicted by the regression line. residual = observed y – predicted y residual = y - ŷ In most cases, no line will pass exactly through all the points in a scatterplot. A good regression line makes the vertical distances of the points from the line as small as possible.

4 Special Property of Residuals
The mean of the LS residuals are always zero!

5 Example, p. 169 How much is that truck worth? Find and interpret the residual for the Ford F-150 that had 70,583 miles driven and a price of $21,994. Regression Line: 𝑝𝑟𝑖𝑐𝑒 =38,257− 𝑚𝑖𝑙𝑒𝑠 𝑑𝑟𝑖𝑣𝑒𝑛 Need the predicted price: 𝑝𝑟𝑖𝑐𝑒 =38,257− ,583 ≈26,759 dollars Residual = 𝑦− 𝑦 = 21,994−26,759=−4765 𝑑𝑜𝑙𝑙𝑎𝑟𝑠 So the actual price of the truck is $4765 lower than expected based on its mileage. Why is this? Could have been in an accident. Could need some work.

6 Least Squares Regression Line
The least-squares regression line of y on x is the line that makes the sum of the squared residuals as small as possible. Different regression lines produce different residuals. The regression line we want is the one that minimizes the sum of the squared residuals.

7 Residual Plot A scatterplot of the regression residuals against the explanatory variable (x). Helps us assess the fit of a regression line. One of the first principles of data analysis is to look for an overall pattern and for striking departures from the pattern. A regression line describes the overall pattern of a linear relationship between two variables. We see departures from this pattern by looking at the residuals.

8 Residuals vs. Correlation
Never rely on correlation alone to determine if an LSRL is the best model for the data. You must check the residual plot!

9 Examining Residual Plots
A residual plot magnifies the deviations of the points from the line, making it easier to see unusual observations and patterns. The residual plot should show no obvious patterns The residuals should be relatively small in size. Pattern in residuals Linear model not appropriate Sometimes you may think the linear model is appropriate. You must check the residual plot!

10 Residual Plots Uniform scatter of points indicates that the regression line fits the data well, so the line is a good model.

11 Residual Plots A curved pattern shows that the relationship is not linear. A straight line would not be a good model for the data.

12 Residual Plots Increasing or decreasing spread about the line as x increases indicates that prediction of y will be less accurate for larger x.

13 HW Due: Monday p.193 # 39, 41, 45, 52, 54


Download ppt "GET OUT p.161 HW!."

Similar presentations


Ads by Google