Sum of Squares of the Residuals — Definition, Formula & Example
The sum of squares of the residuals (SSE) is a single number that measures how far a line misses the data overall. You square each residual and add the results. A smaller SSE means the line fits the points more closely.
For data points and a fitted line , the residual sum of squares is . The least-squares regression line is the unique line that minimizes this quantity over all choices of and .
Key Formula
Where:
- = the actual (observed) response value for the i-th data point
- = the predicted value from the line at x_i
- = the residual for the i-th point
- = the number of data points
Worked Example
Problem: The data points are (1, 4), (2, 4), (3, 6), and (4, 10). The least-squares regression line for these data is . Find the SSE.
Step 1: Substitute each x-value into the line to get the predicted values.
Step 2: Find each residual as actual minus predicted.
Step 3: Square each residual and add the squares.
Answer: SSE = 4. This line is the least-squares line for these data, so no other line gives an SSE smaller than 4.
Why It Matters
In AP Statistics, SSE feeds directly into two numbers you report for every regression. The coefficient of determination is , where SST is the total sum of squares . The standard deviation of the residuals is .
Common Mistakes
Mistake: Adding the residuals without squaring them and getting 0, then concluding the line fits perfectly.
Correction: For a least-squares line, the residuals always sum to 0, because positive and negative errors cancel. Squaring makes every term nonnegative, so SSE equals 0 only when every point lies exactly on the line.
