Download presentation
1
Introduction to Regression
3E Residuals
2
Definition A residual is the vertical difference between each data point and the regression line.
3
To calculate the residuals for each data point:
Calculate the predicted value of y from the regression equation. Calculate the difference between this predicted value and the original value.
4
Examples Read Worked Example 8 on p.130. Exercise 3E, Q.1
5
Note Calculate the residuals by (y-ypred), i.e. the actual values minus the predicted values. The sum of all the residuals always add to zero (or very close to zero after rounding), when least-squares regression is used.
6
Residual Analysis Why do we calculate residuals? Residuals give us more information about the type of regression. If we plot the residuals against the original x-values we get a pattern.
7
Types of residual plot Points of residual randomly scattered above and below x-axis. Original data probably linear.
8
Points of residual show curved pattern with a series of negative, then positive and back to negative residuals. Original data probably non-linear. Points of residual show curved pattern with a series of positive, then negative and back to positive residuals. Original data probably non-linear.
9
In other words, if you see any sort of pattern in the residual plot, there probably isn’t a linear relationship in the original data set.
10
Example. Ex 3E, Q.2, 4 You do Ex 3E, Q.5, 6, 7, 8
11
CAS calculator Once you have done the least-squares regression analysis on the Lists & Spreadsheet page: Move the cursor to the shaded cell in Column E and press: Ctrl MENU 4: Variables 3: Link To And select the list stat?.resid. The stat number will vary depending on your calculator and previously stored data. You can then plot the stat.resid against x-value by clicking on the y-axis label and selecting the residual list stat.resid
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.