Mathemathical Economics
Mathemathical Economics
mathemathical economics
CHAPTER THREE
THE MULTIPLE LINEAR REGRESSION
3.1 Introduction: The Multiple Linear Regression
3.2 Assumptions of the Multiple Linear Regression
3.3 Estimation: The Method of OLS
3.4 Properties of OLS Estimators
3.5 Partial Correlations and Coefficients of
Multiple Determination
3.6 Statistical Inferences in Multiple Linear
Regression
3.7 Prediction with Multiple Linear Regression
1
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
Population Random
Population slopes
Y-intercept Error
Yi = β 0 + β1 X 1i + β 2 X 2i + • • • + β K X Ki + ε i
Y = βˆ + βˆ X + βˆ X + • • • + βˆ X + e
i 0 1 1i 2 2i K Ki i
Residual
Dependent (Response) Independent (Explanatory)
variable (for sample) variables (for sample) 2
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.1
3.1 Introduction:
Introduction: The
The Multiple
Multiple Linear
Linear Regression
Regression
) What changes as we move from simple to
multiple regression?
1. Potentially more explanatory power with more
variables;
2. The ability to control for other variables; (and
the interaction of the various explanatory
variables: correlations and multicollinearity);
3. Harder to visualize drawing a line through
three or more (n)-dimensional space.
4. The R2 is no longer simply the square of the
correlation coefficient between Y and X.
3
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.2
3.2 Assumptions
Assumptions of
of the
the Multiple
Multiple Linear
Linear Regression
Regression
) Assumptions 1 – 7 in Chapter Two.
1. E(ɛi|Xji) = 0. (for all i = 1, 2, …, n; j = 1, …, K)
2. var(ɛi|Xji) = σ2. (i ≠ s) (Homoscedastic errors)
3. cov(ɛi,ɛs|Xji,Xjs) = 0. (i ≠ s) (No autocorrelation)
4. cov(ɛi,Xji) = 0. Errors are orthogonal to the Xs.
5. Xj is non-stochastic, and must assume different
values.
6. n > K+1. (Number of observations > number of
parameters to be estimated). Number of
parameters is K+1 in this case ( β0, β1, …, βK )
7. ɛi ~N(0, σ2). Normally distributed errors.
Downloaded by Solomon Getu ([email protected])
5
lOMoARcPSD|39678933
3.2
3.2 Assumptions
Assumptions of
of the
the Multiple
Multiple Linear
Linear Regression
Regression
) Additional Assumption:
8. No perfect multicollinearity: That is, no exact
linear relation exists between any subset of
explanatory variables.
) In the presence of perfect (deterministic) linear
relationship between/among any set of the Xjs,
the impact of a single variable ( β j ) cannot be
identified.
) More on multicollinearity in a later chapter!
6
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
The Case of Two Regressors (X1 and X2)
Yˆi = βˆ0 + βˆ1 X1i + βˆ2 X 2i Yˆi = βˆ0 + βˆ1 X1i + βˆ2 X 2i
yˆ i = βˆ1 x1i + βˆ2 x2i ei = Yi −Yˆi = Yi −Y +Y −Yˆi = Yi −Y − (Yˆi −Y )
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
⎛ ∑ y i x1i ⎞ ⎡ ∑ x 1i2 ∑x x ⎤ ⎛ βˆ 1 ⎞
⇒ ⎜⎜ ⎟=⎢ 1i 2i
⎥ ⎜⎜ ˆ ⎟⎟
⎝ ∑ i 2i ⎠ ⎢⎣∑ x 2i x 1i
⎟
y x ∑x 2
2i ⎥⎦ ⎝ β 2 ⎠
F = A • β̂
Solve for the coefficients:
Determinant: A = ∑ 1i ∑ x1i x2i
2
x
= ∑ x12i ∑ x22i − (∑ x1i x 2i ) 2
∑ x1i x2i ∑ 2i
x 2
∑y xi 2i ∑x 2
2i
2i
β1 =
ˆ =
A (∑ x1i )(∑ x 2i ) − (∑ x1i x 2i )
2 2 2
8
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
Similarly, to find β̂2, substitute the second column
of A by elements of F, then find |A2|, and finally
A2
find .
A
A2 =
∑ x ∑ 2
yx
1i i 1i
= (∑ yi x2i )(∑x12i ) − (∑x1i x2i )(∑ yi x1i )
∑x x ∑y x
1i 2i i 2i
β2 =
ˆ =
1i
βˆ 0 = Y − βˆ1 X 1 − βˆ 2 X 2
9
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
The Case of K Explanatory Variables
) The number of parameters to be estimated:
K+1 ( β0 , β1, β2 ,…, β K).
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
.
⎡ Y1 ⎤ ⎡1 X 11 X 21 X 31 … X K1 ⎤ ⎡ βˆ 0 ⎤ ⎡e 1 ⎤
⎢Y ⎥ ⎢1 ⎥ ⎢ˆ ⎥ ⎢ ⎥
⎢ 2⎥ ⎢ X12 X 22 X 32 … X K2 ⎥ ⎢ β 1 ⎥ ⎢e 2 ⎥
⎢Y3 ⎥ = ⎢1 X13 X 23 X 33 … X K3 ⎥ • ⎢ βˆ 2 ⎥ + ⎢e 3 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣Yn ⎥⎦ ⎢⎣1 X1n X 2n X 3n … X Kn ⎥⎦ ⎢⎣βˆ K ⎥⎦ ⎢⎣e n ⎥⎦
n ×1 n × ( K + 1) (K +1) ×1 n ×1
Y = Xβ + e
ˆ
Downloaded by Solomon Getu ([email protected])
11
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
.
⎡e 1 ⎤ ⎡ Y1 ⎤ ⎡1 X 11 X 21 X 31 … X K1 ⎤ ⎡ βˆ 0 ⎤
⎢e ⎥ ⎢Y ⎥ ⎢1 ⎥ ⎢ˆ ⎥
⎢ 2⎥ ⎢ 2⎥ ⎢ X 12 X 22 X 32 … X K2 ⎥ ⎢ β 1 ⎥
⎢e 3 ⎥ = ⎢Y3 ⎥ − ⎢1 X 13 X 23 X 33 … X K3 ⎥ * ⎢ βˆ 2 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣e n ⎥⎦ ⎢⎣Yn ⎥⎦ ⎢⎣1 X 1n X 2n X 3n … X Kn ⎥⎦ ⎢⎣βˆ K ⎥⎦
e = Y − Xβ̂
12
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
⎛ e1 ⎞
⎜ ⎟
⎜ e2 ⎟
RSS = ∑ei2 = e12 + e22 + ...+ en2 = (e1 e2 … en ).⎜ ⎟ ⇒RSS= e'e
⎜ ⎟
⎜e ⎟
⎝ n⎠
RSS = (Y − Xβˆ )'(Y − Xβˆ ) = Y'Y − Y'Xβˆ − βˆ ' X'Y + βˆ ' X'Xβˆ
Since Y' Xβˆ is a costant, Y' Xβˆ = (Y' Xβˆ )' = βˆ ' X' Y
⇒ RSS = Y'Y − 2βˆ ' X'Y + βˆ ' (X'X)βˆ
∂( RSS) ∂(RSS )
F.O.C. : =0 ⇒ = −2X' Y + 2X' Xβˆ = 0
∂(βˆ ) ∂(βˆ )
⇒ −2X' (Y − Xβˆ ) = 0
Downloaded by Solomon Getu ([email protected])
13
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
⎡ 1 1 … 1 ⎤ ⎛ e ⎞ ⎛ 0⎞
⎢ X11 X12 … X1n ⎥ ⎜ 1 ⎟ ⎜ ⎟
⎢X ⎥ ⎜ e2 ⎟ ⎜ 0⎟
… X 2n ⎥.⎜ ⎟ = ⎜ ⎟
⇒
. X'e = 0 ⇒ ⎢ 21 X 22
⎢ ⎥⎜ ⎟ ⎜ ⎟
⎢X ⎜ ⎟ ⎜ ⎟
⎣ K1 X K 2 … X Kn ⎥⎦ ⎝ n ⎠ ⎝ 0⎠
e
1. ∑ ei = 0 2. ∑ ei X ji = 0. ( j = 1,2,..., K )
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
⎛ βˆ0 ⎞ ⎡ 1 ⎤ ⎡1 X11 … X K1 ⎤
⎜ ⎟ 1 … 1 ⎢ ⎥
⎜ β
ˆ ⎟ ⎢ X X … X 1n ⎢
⎥ 1 X … X K2 ⎥
βˆ = ⎜ 1 ⎟ X/ X = ⎢ 11 12
⎥.
12
⎢ ⎥⎢ ⎥
⎜ ⎟
⎜ βˆ ⎟ ⎢⎣ X K1 X K 2 … X Kn ⎥⎦ ⎢1 X … X ⎥
⎝ K⎠ ⎣ 1n 2n ⎦
⎡ n ∑X … ∑XK ⎤
⎢ ⎥
1
⇒X X=
/ ⎢ ∑ X1 ∑X 2
1 …∑ X 1 X K ⎥
⎢ ⎥
⎢ ⎥
⎢⎣∑ X K ∑X K X1 … ∑ X K2 ⎥⎦
⎡ 1 1 … 1 ⎢ ⎥⎤ ⎡ Y1 ⎤ ⎡ ∑Y ⎤
⎢ YX ⎥
⎢ X 11
X Y=⎢
/
X 12 … X 1 n ⎥ ⎢Y 2 ⎥
⎥ ⇒ X/Y = ⎢
∑ 1⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢⎣ X K 1 … X Kn ⎥⎦ ⎢Y ⎥ ⎢ YX ⎥
⎣∑
X K2
⎣ n⎦ K ⎦
15
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
3.3
3.3 Estimation:
Estimation: The
The Method
Method of
of OLS
OLS
. ˆβ = (X' X)−1 (X' Y)
-1
⎛ βˆ 0 ⎞ ⎡ n ∑X ∑X … ∑X ⎤ ⎛ ∑Y ⎞
⎜ ⎟ ⎢ 1 2 K
⎥ ⎜ ⎟
⎜ βˆ1 ⎟ ⎢ ∑ X 1 ∑X ∑X X … ∑X X ⎜ ∑ YX 1 ⎟
2
1 1 2 1 K ⎥
⎜ ˆ ⎟=⎢ X ⎜ YX ⎟
⎜ β2 ⎟ ⎢ ∑ 2 ∑X X ∑X ∑X X ⎜∑ 2 ⎟
2
… ⎥
⎥
2 1 2 2 K
⎜ ⎟ ⎢ ⎥ ⎜ ⎟
⎜⎜ ˆ ⎟⎟ ⎢ 2 ⎥ ⎜⎜ ⎟⎟
⎝ β K ⎠ ⎣∑ X K ∑X K X1 ∑X K X2 … ∑ K ⎦
X ⎝ ∑ YX K ⎠
(K+1)×1 (K +1)×(K +1) (K+1)×1
16
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
∑e 2
∑ (x − b x ) 2
∑
12 1 12 2
⇒ bye =
∑ yx − b ∑ yx
1 12 2 But, b12 =
xx 1 2
∑ x + b ∑ x − 2b ∑ x x
2
1
2 2
12 Downloaded by2Solomon Getu ([email protected])
12 1 2
∑x 2
20 2
lOMoARcPSD|39678933
⇒b =
2
∑ ∑
ye
xx xx
∑ x + ( x ) ∑ x − 2( x )∑ x x
2 1 2 2 2 1 2
∑ ∑
1 2 2 2 1 2
2 2
⇒ bye =
∑2 x 2
(∑ x x ) 2
(∑ x x ) 2
∑ x1 + −2
2 1 2 1 2
∑2 x 2
∑2 x 2
b =
∑x ∑ yx − ∑x x ∑ yx 2
∑x ∑x − (∑x x )
ye 2 2 2
∑x
1 2 1 2
2
bye =
2
= (R 2
y•12 − R )∑ y
2
y•1
2
28
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
2. proportion of ∑y 2
i 3. proportion of ∑ i that
y 2
∑y 2 n
∑ i
y 2
i =1
) Coefficients of Partial Determination:
R 2
y•12 −R 2
y•1
R 2
y •12 −R 2
y •2
r 2
y 2•1 = r 2
y1•2 =
1− R 2
y•1
1− R 2
y •2 31
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
∑ yˆ 2
∑ e 2
[ ∑ e 2
]
R 2
= = 1− n − (K + 1)
= 1−
∑y ∑y
2
R
[∑
2 2 2
y
]
n−1
(Dividing TSS and RSS by their df).
)K + 1 represents the number of parameters to be
estimated. e2
R 2
= 1−[
∑ •
n −1
]
∑y 2
n − K −1
n −1 As long as K ≥ 1,
R = 1− (1− R ) • (
2 2
)
n − K −1 1− R 2 > 1− R2 ⇒ R 2 < R2
n −1 In general, R 2 ≤ R 2
1− R = (1− R ) • (
2 2
) As n grows larger (relative
n − K −1
to K ), R 2 → R 2 . 34
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
Numerical Example:
Y (Salary in X1 (Years of post X2 (Years of
'000 Dollars) high school Experience)
Education)
30 4 10
20 3 8
36 6 11
24 4 9
40 8 12
ƩY = 150 ƩX1 = 25
Downloaded by Solomon Getu ([email protected])
ƩX2 = 50 36
lOMoARcPSD|39678933
Numerical Example:
β = ( X' X ) X' Y
ˆ −1
−1
⎛ βˆ ⎞ ⎡ n
⎜ ⎟ ⎢
0 ∑ X ∑ X 1 ⎤ ⎛ ∑Y ⎞
⎥ ⎜ ⎟ 2
⎜ βˆ ⎟ = ⎢∑ X
1 ∑1 X ∑ X X2
1 1 2 ⎥ • ⎜ ∑YX1 ⎟
⎜⎜ ˆ ⎟⎟ ⎢ ⎜ YX ⎟
β
⎝ ⎠
2 ⎣∑ X ∑ X
2 X ∑1 X 2
2 ⎥
2 ⎦ ⎝∑ 2 ⎠
⎛ βˆ 0 ⎞ ⎡ 5 25 50 ⎤ −1 ⎛ 150 ⎞
⎜ ⎟ ⎜ ⎟
⎢ ⎥
⎜ βˆ 1 ⎟ = 25 141 262 • ⎜ 812 ⎟
⎜⎜ ˆ ⎟⎟ ⎢ ⎥
⎜ 1552 ⎟
β ⎢ ⎥
⎝ 2⎠ ⎣ 50 262 510 ⎦ ⎝ ⎠
⎛ βˆ 0 ⎞ ⎛ - 23.75
⎜ ⎟ ⎜ ⎞
⎛βˆ 0 ⎞ ⎡40.825 4.375 - 6.25⎤ ⎛ 150⎞ ⎟
⎜ ⎟ ⎜ ⎟ ⇒ ⎜ βˆ 1 ⎟ = ⎜ - 0.25
⎢ ⎥
⎜βˆ 1 ⎟ = 4.375 0.625 - 0.75 •⎜ 812⎟ ⎟
⎜⎜ ˆ ⎟⎟ ⎢ ⎥ ⎜⎜ ˆ ⎟⎟ ⎜ ⎟
β ⎢ ⎥ ⎜1552⎟ β
⎝ ⎠ ⎝ 5.5 ⎠
⎝ 2⎠ ⎣ - 6.25 - 0.75 1 ⎦ ⎝ ⎠ 2
1. TSS = ∑ y 2 = ∑ Y 2 − nY 2
TSS = 4772 − 5(30) 2
⇒ TSS = 272
2. ESS = ∑ yˆ = ∑ 2
(β x + β x )
ˆ ˆ 2
1 1 2 2
ESS = β1 ∑ x1 + β2 ∑ x2 + 2 βˆ1 βˆ 2 ∑ x1 x2
ˆ 2 2 ˆ 2 2
Regressing Y on X 1 :
βˆ y1 =
∑ yx 1
=
∑ YX 1 − nX 1Y
=
62
= 3.875
∑x 2
1 ∑X 1
2
− nX 1
2
16
ESS SIMP βˆ y •1 ∑ yx1 3.875 × 62
6. R 2
= = = = 0.8833
∑y
y •1 2
TSS 272
RSSSIMP = (1 − 0.8833)(272) = 0.1167(272) = 31.75
X 1 (education ) alone explanis about 88.33% of the difference s
in wages, and leaves about 11.67% ( = 31.75) unexplaine d.
7. R 2
y •12 −R 2
y •1 = 0.9945 − 0.8833 = 0.1112
(R 2
y •12 − R )∑ y = 0.1112(272) = 30.25
2
y •1
2
43
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
R 2
y •12 −R 2
y •1 0.9945 − 0.8833
8. r 2
y 2•1 = = = 0.9528
1− R 2
y •1 1 − 0.8833
Or, X 2 (experienc e) explains about 95.28%
( = 30.25) of the wage differenti al that X 1 has
left unexplaine d ( = 31.75). 44
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
ε i ~ N(0,σ ) 2
σ 2
β1 ~ N( β1 , var(β1 ));
ˆ ˆ var(βˆ )=
∑x (1 − r )
1 2 2
1i 12
σ 2
βˆ2 ~ N (β 2 , var(βˆ2 )); var(βˆ2 ) =
∑x 2
2i (1 − r )
2
12
βˆ0 ~ N(β0 , var(βˆ0 ));
σ 2
var(β0 ) =
ˆ + X 22 var(βˆ1 ) + X12 var(βˆ2 ) + 2X1 X 2 cov(βˆ1 , βˆ2 )
n Downloaded by Solomon Getu ([email protected])
45
lOMoARcPSD|39678933
( ∑ x 1i x 2 i ) 2
r 2
=
∑x ∑x
12 2 2
1i 2i
∑x 2
2i (1 − r ) is the RSS from regressing X 2 on X 1 .
2
12
RSS
σˆ = 2
is an unbiased estimator of σ .
2
3.6
3.6 Statistical
Statistical Inferences
Inferences in in Multiple
Multiple Linear
Linear Regression
Regression
−1
⎡ n ∑ X1 … ∑ XK ⎤
⎢ ⎥
2 ⎢∑ 1
X ∑ X1 2
…∑ X1 X K ⎥
var− cov(β) = σ (X X) = σ
ˆ 2 / -1
⎢ ⎥
⎢ 2 ⎥
⎢⎣∑ X K ∑ X K X1 … ∑ X K ⎥⎦
−1
⎡ n ∑ X1 … ∑ XK ⎤
⎢ ⎥
2⎢∑ ∑ …∑ X1 X K ⎥
∧ 2
X1 X1
var − cοο(β) = σˆ
ˆ
⎢ ⎥
⎢ ⎥
)Note that: ⎢
⎣ ∑ X K ∑ X K X 1 … ∑ X K ⎥⎦ 2
n − K −1
Note:
) Ceteris paribus, the higher the correlation
coefficient between X1 & X2 ( r12 ), the less
precise will the estimates βˆ1 & βˆ2 be, i.e., the CIs
for the parameters β1 & β 2 will be wider.
) Ceteris paribus, the higher the degree of
variation of the Xjs (the more Xjs vary in our
sample), the more precise will the estimates be –
narrow CIs for population parameters.
Downloaded by Solomon Getu ([email protected])
48
lOMoARcPSD|39678933
~ tn−K−1;∀j = 0,1,...,K.
seˆ(βˆ j )
49
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
RSS (n − K − 1)σ̂ 2
= ~ χ 2
n−K −1
σ 2
σ 2
( RRSS − URSS) / K R2 / K
⇒ = ~ FK ,n− K −1
URSS /(n − K − 1) (1 − R ) /(n − K − 1)
2
−1
⎡ 5 25 50 ⎤ ⎡40.825 4.375 - 6.25 ⎤
(X' X) −1 ⎢ ⎥
= ⎢25 141 262⎥ ⎢ = ⎢ 4.375 0.625 - 0.75 ⎥⎥
⎢⎣50 262 510⎥⎦ ⎢⎣ - 6.25 - 0.75 1 ⎥⎦
RSS 1.5
σ is estimated by : σˆ =
2 σˆ =
2 2 = 0.75
n − K −1 2
∧
⎡ 40.825 4.375 - 6.25 ⎤
var − cov ( β̂ ) = 0.75 ⎢⎢ 4.375 0.625 - 0.75 ⎥⎥
⎢⎣ - 6.25 - 0.75 1 ⎥⎦
⎡30.61875 3.28125 - 4.6875 ⎤
= ⎢⎢ 3.28125 0.46875 - 0.5625 ⎥⎥
⎢⎣ - 4.6875 - 0.5625 0.75 ⎥⎦ 53
Downloaded by Solomon Getu ([email protected])
lOMoARcPSD|39678933
2
R /K 0.9945 / 2
d) Fc = = ≈ 180.82
(1 − R ) /(n − K − 1) 0.0055 / 2
2
59
Downloaded by Solomon Getu ([email protected])