Multiple linear regression is the extension of simple linear regression and is equally as common in statistics. To understand how multiple linear regression analysis works, try to solve the following problem by reviewing what you already know and reading through this guide. This guide is meant for those unsure how to approach the problem or for those encountering this concept for the first time.

The best Maths tutors available
Poonam
5
5 (68 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (82 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (60 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Anthony
5
5 (86 reviews)
Anthony
£15
/h
Gift icon
1st lesson free!
Johann
5
5 (60 reviews)
Johann
£50
/h
Gift icon
1st lesson free!
Tomi
5
5 (40 reviews)
Tomi
£85
/h
Gift icon
1st lesson free!
Imad
5
5 (27 reviews)
Imad
£95
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (165 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Poonam
5
5 (68 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (82 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (60 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Anthony
5
5 (86 reviews)
Anthony
£15
/h
Gift icon
1st lesson free!
Johann
5
5 (60 reviews)
Johann
£50
/h
Gift icon
1st lesson free!
Tomi
5
5 (40 reviews)
Tomi
£85
/h
Gift icon
1st lesson free!
Imad
5
5 (27 reviews)
Imad
£95
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (165 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Let's go

Problem 5

You’re curious about which factors play into the salary people earn. In order to find out you’d like to conduct a multiple linear regression analysis on data that has the salary, education level in years, and work experience for 10 individuals. Conduct a multiple regression analysis by finding the regression model on the following data set.

EducationExperienceSalary
111030000
11627000
121020000
12525000
13529000
14635000
14538000
16840000
16745000
16228000
18630000
18255000
22565000
23225000
24175000

What is MLR?

Multiple linear regression is the extension of simple linear regression. Meaning, the basic concepts behind multiple linear regression, or MLR, are the same. The main difference, however, is that multiple linear regression has one response variable with two or more explanatory variables.

The motivation behind MLR is that in many cases, the predictions from regression models get better with more explanatory variables. Intuitively, this makes sense as the majority of the phenomena around us - the demand for goods, the growth of plants, etc. - typically have more than just one variable related to them. Mathematically, this also makes sense: the more variables you add to the model, the higher the explained variance, or R squared value, of the model.

However, introducing more variables means you should practice extra precaution during your analysis. Having a high r-squared value doesn’t always mean you’ve found the best regression model. Often, too high of an r-squared value can signal towards underlying problems with your model. Take a look at some of the common problems you can encounter when building your MLR model.

ConceptDefinitionResulting Problems
OverfittingAdding too many predictorsThe model is too closely related, or “fit”, to the sample data set to the point that it introduces a lot of variability
UnderfittingAdding too few predictorsThe model does not “fit” the data well enough because it is not complex enough to the point that it introduces bias
MulticollinearityPairs of explanatory variables are too highly correlatedReduces the reliability of the model because it affects the variance

The first two concepts are often referred to as the bias-variance trade-off. The more complex your model, the higher the risk of overfitting the data and therefore having higher variance. The less complex the model, the higher the risk of underfitting the data and therefore the having higher bias. The best models find the sweet spot between the overfitted and underfitted model, which can be visualized in the graph below.

model_complexity

MLR Explained

In order to explain multiple linear regression, let’s start with the multiple regression model.

[

y = beta_{0} + beta_{1}x_{1} + beta_{2}x_{2} + beta_{3}x_{3} + … + beta_{n}x_{n} + u_{i}

]

As you may notice, this is simply an extension of the SLR model, which can be written in any of the following ways.

In order to understand this equation, let's break it down by first looking at the linear parameters.

linear_parameters

Find a summary of these linear parameters below

Linear ParameterDescription
The intercept
The regression coefficient of the first independent variable
The regression coefficient of the second independent variable
The regression coefficient of the th independent variable

Next, take a look at the error term.

error_term

Recall that this error term is based off of the real population parameters. In the MLR equation, this error term is actually assumed to be zero. Because we do not know the true population parameters, we arrive at the estimated multiple regression equation.

[

hat{y} = b_{0} + b_{1}x_{1} + b_{2}x_{2} + b_{3}x_{3} … + b_{n}x_{n}

]

Take a look at the table below to understand what this estimated MLR equation means.

Estimated ParameterDescription
The estimates of the population parameters
The estimate of the parameter

Remember that the population parameters are measured from the actual population, whereas the estimates of these parameters are based off of a sample from the population and they are called statistics.

MLR Estimators

To calculate the estimators, let’s start with the easiest first, which is the intercept. The equation for the intercept is simply a rearranged version of the MLR equation. To illustrate this, take an MLR equation with only two independent variables.

[

y = b_{0} + b_{1}x_{1 + b_{2}x_{2}}

]

Solving for , we get:

[

b_{0} = bar{y} - b_{1}bar{x_{1}} - b_{2}x_{2}}

]

The formulas for the and estimators are a bit more complicated. Take a look at the table below to see the formulas you’ll need to calculate these estimators.

ElementFormula
 

Two Variable MLR Step by Step

The first step in solving for the multiple regression model is to calculate the variables we’ll be plugging into our formulas.

ObservationSalaryEducationExperience
1300001110121100330000300000110
2270001161213629700016200066
3200001210144100240000200000120
4250001251442530000012500060
5290001351692537700014500065
6350001461963649000021000084
7380001451962553200019000070
84000016825664640000320000128
94500016725649720000315000112
102800016225644480005600032
113000018632436540000180000108
1255000182324499000011000036
1365000225484251430000325000110
142500023252945750005000046
1575000241576118000007500024
Total567000240804096534970900027630001171
Mean37800165

Next, we go ahead and plug them in.

[

sum x_{1}^2 = 4096 - frac{(240)^2}{15} = 256

]

[

sum x_{2}^2 = 534 - frac{(80)^2}{15} = 107

]

[

sum x_{1}y = 9709000 - frac{567000*240}{15} = 637000

]

[

sum x_{2}y = 2763000 - frac{567000*80}{15} = -261000

]

[

sum x_{1}x_{2} = 1171 - frac{240*80}{15} = -109

]

[

b_{1} = frac{(107*637000) - (-109* -261000)}{(256*107) - (-109)^2} = 2560

]

[

b_{2} = frac{(256*-261000) - (-109*637000)}{(256*107) - (-109)^2} = 168

]

[

b_{0} = 37800 - (2560*16) - (168*5) = -4051

]

Putting these numbers all together, we get a multiple regression model of:

[

y = -4051 + 2560x_{1} + 168x_{2}

]

Summarise with AI:

Did you like this article? Rate it!

4.00 (3 rating(s))
Loading...
Emma

Emma

I am passionate about travelling and currently live and work in Paris. I like to spend my time reading, gardening, running, learning languages and exploring new places.