Framework

Simple linear regression workflow

The question it answers

When a manager wants to know how far one factor, such as ad spend, drives an outcome like sales, how much does it explain and how reliably can it predict?

Origin
James et al., 2021
Diagram type
Process by phase
Level of analysis
Individual
Magnifying lens over a line chart tile, icon for data and analytics

Diagram

Simple linear regression workflow

  1. Build the model
  2. Identify Y and XOutcome and predictor, driven by the business question.
  3. Plot a scatter diagramSee the shape and outliers before calculating.
  4. Fit the lineIntercept and slope: how much Y moves per unit of X.
  5. Evaluate and use
  6. Assess the modelR-squared, residuals, standard error; check linearity and constant variance.
  7. Predict with limitsPredict only within the range of observed data.

Pitfalls

Pitfall

Looking only at R-squared; ignoring outliers and non-linearity; claiming causation from observational regression.

Sources

References

Listed A–Z by author surname, Harvard style. A source with a DOI links to https://doi.org/…; one without links to its page or says plainly that it has no DOI.

  1. James, G. et al. (2021) An introduction to statistical learning: with applications in R (2nd edn). New York: Springer.doi:10.1007/978-1-0716-1418-1Source page