Multiple Linear Regression
Multiple Linear Regression
𝑥𝑦 = 𝑎 𝑥+𝑏 𝑥2
y=a+b1x1+b2x2
𝑦 = 𝑁𝑎 + 𝑏1 x 1 + 𝑏2 x2
𝑥1 𝑦 = 𝑎 𝑥1 + 𝑏1 𝑥1 2 +𝑏2 x1x2
𝑥2 𝑦 = 𝑎 𝑥2 + 𝑏1 x1x2+𝑏2 x22
Example
Method 1- Normal Equations
y x1 x2 x1 y x2 y x1 x2 x1 2 X22
4 15 30 60 120 450 225 900
6 12 24 72 144 288 144 576
7 8 20 56 140 160 64 400
9 6 14 54 126 84 36 196
13 4 10 52 130 40 16 100
15 3 4 45 60 12 9 16
54 48 102 339 720 1034 494 2188
54 = 6𝑎 + 48𝑏1 + 102𝑏2
339 = 48𝑎 + 494𝑏1+1034𝑏2
720 = 102𝑎 + 1034𝑏1+2188𝑏2 y=16.47+0.38x1-0.62x2
Example
y x1 x2 x1 y x2 y x1 x2 x1 2 X22
2 3 4 6 8 12 9 16
4 5 6 20 36 30 25 36
6 7 8 42 48 56 49 64
8 9 10 72 80 90 81 100
20 = 4𝑎 + 24𝑏1 + 28𝑏2
140 = 24𝑎 + 164𝑏1+188𝑏2
172 = 28𝑎 + 188𝑏1+216𝑏2 y=0+2x1-1x2
MLR
Method 2-
[ x22 ) 𝑥1 𝑦 − ( x1x2 𝑥2 𝑦 ]
𝑏1 =
( 𝑥1 2 )( 𝑥2 2 ) − x1x22
[ x12 ) 𝑥2 𝑦 − ( x1x2 𝑥1 𝑦 ]
𝑏2 =
( 𝑥1 2 )( 𝑥2 2 ) − x1x22
𝑏0 = 𝑦 − 𝑏1 𝑥1 −𝑏2 𝑥2
MLR - two independent variables
𝑌 = 40.96 − 6.30𝑋1 + 24.77𝑋2
Method 3
(Yule’s Notation)
Finding regression coefficient from correlation
coefficients (deviation from mean)
yi
ŷi xi
C A
B
y
B y
A
C
yi
• H0:β1= β1,0
• H1:β1≠ β1,0
• Coefficient of Multiple correlation
=sqrt(Coefficient of determination )
Conditions: intercept is included and best
possible linear predictors are used.
• Coefficient of determination is more general
case including non-linear predictions and
predicted values not derived from model
fitting approach
R1.23 = Multiple Correlation Coefficient
coefficient of X1 on X2 and X3
𝑟212+ 𝑟213 −2𝑟12 𝑟13 𝑟23
• 𝑅 21.23 =
1−𝑟223
𝑟221+ 𝑟223 − 2𝑟12 𝑟13 𝑟23
𝑅2 2.13 = 1 − 𝑟213
𝑅1.23 = 0.6196
𝑅2.13 = 0.4912
𝑅1.23 = 0.6111