Toolkit and decision tool HL only

Simple linear regression

Also called Linear regression

Where you meet this term: IB DiplomaUndergraduateMBAProfessional

A statistical method that fits a straight line to data on two variables, an independent variable (x) and a dependent variable (y), to describe how y tends to change as x changes and to make forecasts.

In plain words

Drawing the straight line that best fits a set of data points, to see how two things are linked and to estimate future values.

In more depth

Ordinary least squares fits y = a + bx by minimizing the sum of squared vertical distances from the points to the line. The correlation coefficient r measures the strength and direction of the linear relationship, from −1 to 1. Correlation does not show causation, and extrapolating beyond the range of the data is risky because the relationship may not hold there.

Formula

y = a + bx, where a is the intercept and b is the gradient, the change in y for each one-unit change in x

See it worked in the toolkit guide to simple linear regression

In context

The data are first plotted on a scatter diagram; the line of best fit then summarizes the relationship, and correlation describes how strong it is. Businesses use it to estimate, for example, how sales respond to advertising or temperature, and to extrapolate trends. Its limits are that a relationship does not prove cause, it assumes the relationship is a straight line, and forecasts far beyond the range of the data are unreliable.

Example

A café plots daily iced-drink sales against the day's temperature over a summer, fits a line of best fit and uses it to estimate sales, and staffing, for a day forecast to be very hot.

Common misconceptions

  • Misconception

    A strong correlation proves that one thing causes the other.

    In fact

    Both may be driven by a third factor, or the link may be coincidence; causation needs further evidence.

Frameworks, tools and diagrams

Suggested next