Skip to main content

Linear Regression

Intermediate

Linear regression is a statistical method that models the relationship between two or more variables by fitting a straight line through the data that best predicts one variable from the other.

In simple linear regression, there is one dependent variable and one independent variable. The method finds the line that minimises the total of the squared vertical distances between the data points and the line, an approach called least squares.

The line has two key features. The intercept is the predicted value of the dependent variable when the independent variable is zero. The slope shows how much the dependent variable is expected to change for each one-unit increase in the independent variable.

For example, a regression of a share's monthly returns against the stock market's monthly returns might produce a slope of 1.2. This means the share has tended to rise or fall about 1.2% for every 1% move in the market. That slope is the share's beta.

Linear regression is popular because it is simple, quick and easy to interpret. It works well when the relationship really is roughly a straight line. It can give misleading results if the true relationship is curved, if there are extreme outliers or if the variables are related only by coincidence. Checking the data visually and examining the fit are important steps.

For worked examples and full lessons, visit notesbysara.org.

Back to dictionary