Course contentsShow
← Data Science
Lesson 539 of 2,14514. Simple Linear RegressionFree lesson

What Are Residuals?

Define residuals as the difference between observed and fitted values; interpret as prediction errors.

What Are Residuals?

You'll learn: How residuals measure the accuracy of your regression predictions by quantifying prediction errors.

The Core Idea

A residual is the difference between what actually happened (the observed value) and what your model predicted (the fitted value). In simple terms:

Residual = Observed Value - Fitted Value

If you built a linear regression model to predict house prices, and the actual price was 250,000butyourmodelpredicted250,000 but your model predicted 240,000, the residual would be 10,000.Yourmodelunderestimatedby10,000. Your model underestimated by 10,000.

Understanding Residuals as Prediction Errors

Think of residuals like archery: if the bullseye is your observed value and your arrow lands somewhere nearby (your fitted value), the residual is the distance your arrow missed by. A residual of zero means a perfect prediction—your model hit the bullseye.

Residuals can be:

  • Positive: Your model underpredicted (observed > fitted)
  • Negative: Your model overpredicted (observed < fitted)
  • Zero: A perfect prediction (rare!)

Why Residuals Matter

Residuals are fundamental to understanding regression quality. They tell you:

  • How far off your predictions are on average
  • Whether your model systematically misses in one direction
  • If the linear model is appropriate for your data

Every data point in your dataset has its own residual. Analyzing the pattern of all residuals together helps diagnose model problems—something you'll explore in diagnostic techniques.

Key Takeaway: Residuals quantify prediction errors as the difference between observed and fitted values; they're essential for evaluating how well your regression model performs.