Topic 3c Multiple Regression
Topic 3c Multiple Regression
Topic 3c Multiple Regression
Y = f (X1 ; X2 )
Yi = b0 + b1 X1 + b2 X2
n n
Σ ei2 = Σ (Yi b̂0 b̂1 X1i b̂2 X2i )2
i =1 i =1
∂Σe 2 ∂w
= 2w , = X1i
∂w ∂b̂1
∂Σe 2
= 2Σ(Yi b̂0 b̂1 X1i b̂2 X2i ). ( X1i ) = 0
∂b̂1
ΣX1i Yi = b̂0 ΣX1i + b̂1 ΣX1i2 + b̂2 ΣX1i X2i
∂Σe 2 ∂w
= 2w , = X2i
∂w ∂b̂2
∂Σe 2
= 2Σ(Yi b̂0 b̂1 X1i b̂2 X2i ). ( X2i ) = 0
∂b̂2
ΣX2i Yi = b̂0 ΣX2i + b̂1 ΣX1i X2i + b̂2 ΣX2i2
The normal equation gives;
ΣYi = nb̂0 + b̂1 ΣX1i + b̂2 ΣX2i
ΣX1i Yi = b̂0 ΣX1i + b̂1 ΣX1i2 + b̂2 ΣX1i X2i
The Normal Equations of OLS (Cont’d)
Σe 2
RY2 .X 1 .X 2 = 1 or
Σy 2
b̂1 (Σx1 y ) + b̂2 (Σx2 y )
RY2 .X 1 .X 2 =
Σy 2
The standard error is given as
s
Σe 2 1 X̄12 Σx22 + X̄2 Σx12 2X̄1 X̄2 Σx1 x2
s (b̂0 ) = . +
n k n (Σx12 )((Σx22 ) (Σx1 x2 )2
s
Σe 2 Σx22
s (b̂1 ) = .
n k (Σx12 )((Σx22 ) (Σx1 x2 )2
The Normal Equations of OLS (Cont’d)
s
Σe 2 Σx12
s (b̂2 ) = .
n k (Σx1 )((Σx22 ) (Σx1 x2 )2
2
Example
det b̂1
b̂1 =
2det A 3
0.01 0.8 8
det b̂1 = 40.06 4.5 42.1 5
8 705 7980
4.5 42.1 0.06 42.1 0.06 4.5
det b̂1 = 0.01 0.8 +8
705 7980 8 7980 8 705
det b̂1 = 0.01(35910 29680.5) 0.8(478.8 336.8) + 8(42.3 36)
det b̂1 = 0.01(6229.5) 0.8(142) + 8(6.3)
det b̂1 = 62.295 113.6 + 50.4 = 0.905
Solution (Cont’d)
det b̂2
b̂2 =
2det A 3
0.01 0.06 0.8
det b̂2 = 40.06 0.39 4.5 5
8 42.1 705
0.39 4.5 0.06 4.5 0.06 0.39
det b̂2 = 0.01 0.06 + 0.8
42.1 705 8 705 8 42.1
det b̂2 = 0.01(274.95 189.45) 0.06(42.3 36) + 0.8(2.526 3.12)
det b̂2 = 0.01(85.5) 0.06(6.3) + 0.8( 0.594)
det b̂2 = 0.855 0.378 0.4752 = 0.0018
det b̂2 0.0018
b̂2 = = = 0.0143
det A 0.1259
Solution (Cont’d)
s
Σe 2 Σx22
s (b̂1 ) = .
n k (Σx12 )((Σx22 ) (Σx1 x2 )2
s
365.7 1580000
s (b̂1 ) = .
10 3 (30)(1580000) ( 5900)2
s (b̂1 ) = 2.55
s
Σe 2 Σx12
s (b̂2 ) = .
n k (Σx12 )((Σx22 ) (Σx1 x2 )2
s
365.7 30
s (b̂2 ) = .
10 3 (30)(1580000) ( 5900)2
s (b̂2 ) = 0.01
Solution (Cont’d)
n
Σ ( et et 1)
2
278.0227
t =2
DW = n = = 1.055
263.306
Σ et2
t =1