Free courses in AI, Data Science & Machine Learning Written lessons · Quizzes · Final exams
Future Data Academy
Log inGet started ↗
← Regression and Prediction
FREE LESSON PREVIEW

Linear rules and residuals

A simple linear rule is predicted y = intercept + slope*x. With intercept 10, slope 3 and x=4, prediction is 22. Slope represents prediction change per unit of x; units matter. Association is not automatically causation.

A residual is observed minus predicted. Observed 10 and predicted 8 yields residual +2: underprediction. An intercept outside the observed range may have little practical meaning. Check input range and source quality before interpreting a fitted relationship or presenting coefficients as explanations.

Try it yourself

For cost = 5 + 2*distance, predict at distance 7. If actual cost is 22, find the residual.

Worked answer

Prediction 19 and residual 22 - 19 = 3.

Explore the full course →