Predictive modeling basics

Linear Regression Basics

Fit and interpret simple linear regression models, read slope and intercept in context, and validate assumptions with residual checks before using predictions.

How this page is maintained

Written for learners, checked against the sources below, and reviewed every year. Last reviewed July 22, 2026.

Short answer

Simple linear regression models mean outcome Y as Yhat = b0 + b1*X. The slope b1 estimates average change in Y for a one-unit increase in X, under model assumptions. Good practice includes residual checks, uncertainty reporting, and cautious interpretation.

  • Interpret slope in original units and context.
  • Evaluate residual patterns before trusting inference or prediction.
  • Do not extrapolate far beyond observed X values.

Model components and interpretation

The intercept b0 is predicted Y when X=0, which may or may not be meaningful in context. The slope b1 is often the main quantity of interest because it connects X changes to expected Y changes.

R-squared summarizes the proportion of Y variability explained by the fitted linear relationship in sample. It does not validate causality or guarantee predictive accuracy on new data.

Assumptions and diagnostics

Common assumptions include linear mean relationship, independent errors, constant error variance, and approximately normal errors for some inference tasks.

Residual plots help detect curvature, unequal spread, and outliers. If diagnostics fail, consider transformations, added predictors, or alternative models.

  • Check fitted line against scatterplot.
  • Inspect residual vs fitted and residual histogram or QQ plot.
  • Report prediction uncertainty, not just point predictions.

Fit and interpret a simple productivity model

A manager models weekly output Y from practice hours X and obtains Yhat = 12 + 1.8X.

  1. Interpret slope: each extra practice hour is associated with 1.8 more output units on average.
  2. Predict at X=10: Yhat = 12 + 1.8*10 = 30.
  3. Examine residual plot for nonlinearity or changing spread.
  4. Restrict interpretation to X range represented in the observed data.
Result: The model predicts 30 units at 10 practice hours, with interpretation valid only if diagnostics and range checks are acceptable.

Common mistakes

  • Reading slope as a guaranteed individual-level change.
  • Using high R-squared as proof of causality.
  • Ignoring residual diagnostics.
  • Extrapolating to X values far outside training data.

Try one

In Yhat = 5 + 2.4X, what does 2.4 represent?

It is the estimated slope, the average change in predicted Y for each one-unit increase in X.

Sources

Learn this with a tutor

Tell LearnLive what you already know and what you need to do with linear regression.

Build this course