Statistics / AI

Line of Best Fit and Linear Regression

Model a linear relationship using a scatter plot, correlation and a regression line.

Regression line

A linear regression model has the form

\[y=ax+b.\]

It can be used for interpolation inside the data range, but extrapolation outside the data range can be unreliable.

regression line
A regression line models the trend; use interpolation carefully and be cautious with extrapolation.

Correlation

The Pearson correlation coefficient \(r\) measures the strength and direction of a linear relationship. Values close to \(1\) or \(-1\) indicate stronger linear association.