Lecture4 - Copy (1)
Lecture4 - Copy (1)
Econometrics
Part I - Univariate analysis
Sahar Parsa
1
Outline
2
Solution OLS estimator
Solve for the OLS estimator
𝑁
min ∑ 𝑒2𝑖
𝑎,𝑏
𝑖
⇔
𝑁
min ∑(𝑌𝑖 − 𝑎 − 𝑏𝑋𝑖 )2
𝑎,𝑏
𝑖
3
Derive the estimator
4
Derive the estimator
𝛼𝑂𝐿𝑆 = 𝑌 ̄ − 𝛽𝑂𝐿𝑆 𝑋̄
5
Derive the estimator
𝑁
∑[𝑌𝑖 − [𝑌 ̄ − 𝛽𝑂𝐿𝑆 𝑋]̄ − 𝛽𝑂𝐿𝑆 𝑋𝑖 ]𝑋𝑖 = 0
𝑖=1
⇔
𝑁
∑[(𝑌𝑖 − 𝑌 ̄ ) − 𝛽𝑂𝐿𝑆 (𝑋𝑖 − 𝑋)]𝑋
̄ 𝑖 =0
𝑖=1
6
Derive the estimator
𝑁
∑𝑖=1 𝑌𝑖 𝑋𝑖
𝑆 − 𝑌 ̄ 𝑋̄
𝛽𝑂𝐿𝑆 = 𝑌2𝑋 = 𝑁
𝑁
𝑆𝑋 ∑𝑖=1 𝑋𝑖2
𝑁 − 𝑋̄ 2
𝛼𝑂𝐿𝑆 = 𝑌 ̄ − 𝛽𝑂𝐿𝑆 𝑋̄
7
OLS predicted values and residuals
𝑒𝑖 = 𝑌𝑖 − 𝑌𝑖̂
8
Difference between OLS estimator and the popula-
tion regression model
𝛼 = 𝔼[𝑌𝑖 ] − 𝛽𝔼[𝑋𝑖 ]
𝐶𝑜𝑣[𝑌𝑖 𝑋𝑖 ]
𝛽=
𝑉 𝑎𝑟[𝑋𝑖 ]
2. OLS intercept and slope
𝛼𝑂𝐿𝑆 = 𝑌 ̄ − 𝛽𝑂𝐿𝑆 𝑋̄
𝑆
𝛽𝑂𝐿𝑆 = 𝑌2𝑋
𝑆𝑋
9
Difference between estimator and population
2
monthly salary
10
Population regression error and OLS residual
• Unobserved
• Random variable
• Observed data
• Depends on the sample
• Itself a statistics
11
Algebraic Properties
Algebraic properties
12
#1 Sample average of the residuals
𝑁
∑ 𝑖 𝑒
𝑒̄ = 𝑁𝑖
= 0: The sample average of the residuals are
(always) equal to zero.
⇔
𝑁
∑ 𝑒𝑖 = 0
𝑖=1
𝑁
∑𝑖 𝑒𝑖
Hence: 𝑁 = 0.
13
#1 Sample average of the residuals
14
#1 Sample average of the residuals
log of wage on education in years
3.0
2.5
monthly salary
2.0
1.5
1.0
9 12 15 18
number of years of education
Data Wooldridge
15
#2 Residuals are orthogonal to 𝑋𝑖
⇔
𝑁
∑ 𝑒𝑖 𝑋𝑖 = 0
𝑖=1
16
#2 Residuals are orthogonal to 𝑋
𝑁
∑ 𝑒𝑖 𝑋𝑖
𝑆𝑒𝑋 = 𝑖=1 − 𝑒𝑋̄ ̄
𝑁
We know from the previous property that 𝑒 ̄ = 0, hence:
𝑁
∑ 𝑒𝑖 𝑋𝑖
𝑆𝑒𝑋 = 𝑖=1 =0
𝑁
because
𝑁
∑ 𝑒𝑖 𝑋𝑖 = 0
𝑖=1
from the FOC.
17
Decomposition in two orthogonal components
1. 𝑌𝑖̂ depends on 𝑋𝑖
2. 𝑒𝑖 residual
18
Decomposition in two orthogonal components
𝑌 ̄ = 𝛼𝑂𝐿𝑆 + 𝛽𝑂𝐿𝑆 𝑋̄
19
SST, SSE, and SSR
21
Relation with other statistics
Relation between 𝛽𝑂𝐿𝑆 and the coefficient of corre-
lation
𝑆𝑋𝑌
𝑟𝑌 𝑋 = 2 𝑆2
√𝑆 𝑋 𝑌
The OLS estimator is:
𝑆𝑌 𝑋
𝛽𝑂𝐿𝑆 = 2
𝑆𝑋
Hence,
𝑆𝑌 𝑋 𝑆 𝑆 𝑆
𝛽𝑂𝐿𝑆 = = 𝑌 𝑋 𝑌 = 𝑟𝑌 𝑋 𝑌
𝑆𝑋 𝑆𝑋 𝑆𝑋 𝑆𝑌 𝑆𝑋 𝑆𝑋
22