Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Multiple linear regression

Read about multiple linear regression and find out why it always gives more accurate predictions than single-variable regression.

So far, we have been looking at how the price of a house depends on its size. But there are many other factors that affect the value of a house, such as location, build quality, number of bedrooms, presence of air conditioning, and so on. Just as we have fit the house price to its size, we can similarly fit the price to two or more variables in what’s called multiple linear regression. For the sake of demonstration, suppose we wanted to include the effect of the size of the yard on the price. It is quite reasonable to expect that the price also varies linearly with the yard size.

A 3D animation visualising multiple linear regression.

Notice how the house prices vary linearly with both the house size and the yard size. This double linear relationship manifests on the 3D plot by the data points forming a flat plane now instead of a straight line. To fit this, we would need to find the plane cutting through the data that minimises the sum of the squared errors, exactly analogous to the single-variable case. We would then be able to predict the price of a house given both the size of the house and its yard. Computationally this isn’t any different than finding the line of best fit, but once again care must be taken that the data we are fitting is actually linear.

Multiple linear regression might give more accurate predictions than single-variable regression because it takes into account the effects of other attributes (yard size) on top of the original one (house size). However, the benefit of adding more variables might eventually be offset by the increased computational complexity of the analysis, so it is best to include only the most relevant attributes for a given problem.

Share your thoughts

What factors will you need to take into consideration when you discuss the possible uses of multiple linear regression with your data analytics team?
This article is from the free online

Data Analytics for Managers

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now