Science, Tech, Math › Math What Are Residuals? Share Flipboard Email Print Scatterplot with corresponding residual plot below. C.K.Taylor Math Statistics Descriptive Statistics Statistics Tutorials Formulas Probability & Games Inferential Statistics Applications Of Statistics Math Tutorials Geometry Arithmetic Pre Algebra & Algebra Exponential Decay Functions Worksheets By Grade Resources View More by Courtney Taylor Courtney K. Taylor, Ph.D., is a professor of mathematics at Anderson University and the author of "An Introduction to Abstract Algebra." Updated January 27, 2019 Linear regression is a statistical tool that determines how well a straight line fits a set of paired data. The straight line that best fits that data is called the least squares regression line. This line can be used in a number of ways. One of these uses is to estimate the value of a response variable for a given value of an explanatory variable. Related to this idea is that of a residual. Residuals are obtained by performing subtraction. All that we must do is to subtract the predicted value of y from the observed value of y for a particular x. The result is called a residual. Formula for Residuals The formula for residuals is straightforward: Residual = observed y – predicted y It is important to note that the predicted value comes from our regression line. The observed value comes from our data set. Examples We will illustrate the use of this formula by use of an example. Suppose that we are given the following set of paired data: (1, 2), (2, 3), (3, 7), (3, 6), (4, 9), (5, 9) By using software we can see that the least squares regression line is y = 2x. We will use this to predict values for each value of x. For example, when x = 5 we see that 2(5) = 10. This gives us the point along our regression line that has an x coordinate of 5. To calculate the residual at the points x = 5, we subtract the predicted value from our observed value. Since the y coordinate of our data point was 9, this gives a residual of 9 – 10 = -1. In the following table we see how to calculate all of our residuals for this data set: X Observed y Predicted y Residual 1 2 2 0 2 3 4 -1 3 7 6 1 3 6 6 0 4 9 8 1 5 9 10 -1 Features of Residuals Now that we have seen an example, there are a few features of residuals to note: Residuals are positive for points that fall above the regression line.Residuals are negative for points that fall below the regression line.Residuals are zero for points that fall exactly along the regression line.The greater the absolute value of the residual, the further that the point lies from the regression line.The sum of all of the residuals should be zero. In practice sometimes this sum is not exactly zero. The reason for this discrepancy is that roundoff errors can accumulate. Uses of Residuals There are several uses for residuals. One use is to help us to determine if we have a data set that has an overall linear trend, or if we should consider a different model. The reason for this is that residuals help to amplify any nonlinear pattern in our data. What can be difficult to see by looking at a scatterplot can be more easily observed by examining the residuals, and a corresponding residual plot. Another reason to consider residuals is to check that the conditions for inference for linear regression are met. After verification of a linear trend (by checking the residuals), we also check the distribution of the residuals. In order to be able to perform regression inference, we want the residuals about our regression line to be approximately normally distributed. A histogram or stemplot of the residuals will help to verify that this condition has been met. Continue Reading What Is a Scatterplot and How Is It Used in Statistics? How Are Extrapolation and Interpolation Different? The Slope of the Regression Line and the Correlation Coefficient What Is Paired Data? What Is the Least Squares Line? Linear Regression and Multiple Linear Regression Analysis Pie Charts, Histograms, and Other Graphs Used in Statistics How Do We Determine Outliers in Statistics? What Are Moments in Statistics? How to Do a Painless Multivariate Econometrics Project This Is When the Standard Deviation Is Equal to Zero How to Calculate the Correlation Coefficient A Handy Stats Shortcut for the Sum of Squares The Differences Between Explanatory and Response Variables Look Up Math Definitions With This Handy Glossary How Can I Construct a Painless Undergraduate Econometrics Project?