How to Find the Sum of Residuals

An image of an individual doing a calculation with a calculator in the back.
••• DragonImages/iStock/Getty Images

When a set of data contains two variables that may relate, such as the heights and weights of individuals, regression analysis finds a mathematical function that best approximates the relationship. The sum of residuals is a measure of how good a job the function does.


In regression analysis, we choose one variable to be the “explanatory variable,” which we will call x, and the other to be the “response variable” which we will call y. Regression analysis creates the function y = f(x) that best predicts the response variable from its associated explanatory variable. If x[i] is one of the explanatory variables, and y[i] its response variable, then the residual is the error, or difference between the actual value of y[i] and the predicted value of y[i]. In other words, residual = y[i] - f(x[i]).


A set of data contains the heights in centimeters and weights in kilograms of 5 people: [(152,54), (165,65), (175,100), (170,80), (140, 45)]. A quadratic fit of weight, w, for height, h, is w = f(h) = 1160 -15.5_h + 0.054_h^2. The residuals are (in kg): [2.38, 7.65, 1.25, 5.60, 3.40]. The sum of residuals is 15.5 kg.

Linear Regression

The simplest kind of regression is linear regression, in which the mathematical function is a straight line of the form y = m*x + b. In this case, the sum of residuals is 0 by definition.

Related Articles

How to Calculate Relative Standard Error
How to Approximate the Mean of Group Data
How to Determine the Bin Width for a Histogram
How to Calculate Unexplained Variance
How to Calculate SSE
How to Calculate the Root MSE in ANOVA
How to Find Y Value for the Slope of a Line
How to Write the equation of a Linear Function whose...
How to Find the Missing Side of a Right Triangle
The Advantages of a Large Sample Size
How to Calculate Ramp Length
What Are the Seven Properties of the Linear Correlation...
How to Calculate a Two-Tailed Test
How to Find a Z Score
How to Calculate CV Values
The Relationship Between Standard Deviations & Percentiles
How to Calculate the Expected Mean in Statistics
How to Calculate a Normalized Curve
How do I Calculate the Geometric Mean on an HP 12C?
How to Calculate Linearity

Dont Go!

We Have More Great Sciencing Articles!