# Residuals

A residual is observed y minus predicted y. Positive residuals mean the point is above the line. Least squares residuals always add up to zero. Plotting them against x reveals problems with the model.

Statistics (university) · Part 08: Correlation and regression · Card 4 of 9 · Last updated 2026-10-19

## Analogy

The residual is the leftover after the line has explained what it can.

## Example

**Five residuals**

Line: 2.2 + 0.6x
x=1: 2.8, residual 2-2.8 = -0.8
x=2: 3.4, residual +0.6
x=3: 4.0, residual +1.0
x=4: 4.6, residual -0.6; x=5: 5.2, -0.2
Sum = 0

## In practice

A pattern in the residuals, such as a curve, tells you a straight line is the wrong model.

## Practice

### Flashcards

- **Define a residual.** Observed y minus predicted y.

## Questions people ask

### What should a good residual plot look like?

A shapeless cloud of points around zero with roughly constant height. A curve means the relationship is not a straight line. A funnel that widens means the spread changes with x. Either pattern suggests the model needs work, such as a curve term or a transformed variable.

### Why do residuals sum to zero?

The least squares line passes through the point of means, and the best-fitting intercept balances the points above against those below. As a result, the positive and negative gaps cancel exactly. This holds for any least squares line with an intercept.

## Related concepts

- [Least squares regression line](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-8/statistics-university-part-8-concept-2)
- [Slope and intercept](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-8/statistics-university-part-8-concept-3)
- [R-squared](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-8/statistics-university-part-8-concept-5)
- [Regression assumptions](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-8/statistics-university-part-8-concept-6)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-8/statistics-university-part-8-concept-4
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-8-concept-4
