00 Econometrics Notes
00 Econometrics Notes
00 Econometrics Notes
⏟
𝑆𝑃𝐸 = 𝑓 (⏟
𝑇𝑖𝑚𝑒 𝑆𝑝𝑒𝑛𝑡 𝐿𝑒𝑎𝑟𝑛𝑖𝑛𝑔, 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐿𝑒𝑐𝑡𝑢𝑟𝑒𝑠 𝐴𝑡𝑡𝑒𝑛𝑑𝑒𝑑 )
Dependent Variable 𝐼𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠
• The Data deals with collection and determining the relation of parameters with the
dependent variable whether positive or negative.
• The Estimation is to find the parameters 𝛽0 , 𝛽1 , 𝛽2
• If the Test failed go back to Model phase and recreate or change the mathematical
relationships, add more parameters and collect new data for them
Remark: The standard deviation is an indication of how much the data scattered from the mean
Pearson correlation coefficient
∑(𝑥 𝑖 − 𝑥̅ )(𝑦𝑖 − 𝑦̅)
𝑟𝑥,𝑦 = , −1 ≤ 𝑟𝑥,𝑦 ≤ 1
√∑(𝑥𝑖 − 𝑥̅) 2∑(𝑦𝑖 − 𝑦̅) 2
This coefficient shows the relation and the nature of the two variables
• Deterministic
• Stochastic
• Independent
r Relation
0.9 < 𝑟𝑥,𝑦 < 1 Very Strong Case Meaning
0.75 < 𝑟𝑥,𝑦 < 0.9 Strong |𝑟𝑥,𝑦 | = 1 Deterministic
0.6 < 𝑟𝑥,𝑦 < 0.75 Moderate 𝑟𝑥,𝑦 = 0 Independent
0.3 < 𝑟𝑥,𝑦 < 0.6 Probability of having −1 < 𝑟𝑥,𝑦 < 1 Stochastic
relation
𝑟𝑥,𝑦 > 0 𝑥↑ 𝑦↑
0 < 𝑟𝑥,𝑦 < 0.3 No probability
𝑟𝑥,𝑦 < 0 𝑥↑ 𝑦↓
6 1 2
3 4 5
Another formula for Pearson correlation coefficient
∑(𝑥 𝑖 − 𝑥̅ )(𝑦𝑖 − 𝑦̅ )
𝑟𝑥,𝑦 =
√∑(𝑥𝑖 − 𝑥̅) 2∑(𝑦𝑖 − 𝑦̅) 2 ∑𝑥 𝑖
𝑥̅ =
𝑛
∴ ∑𝑥 𝑖 = 𝑛 ⋅ 𝑥̅ , (1)
𝑆𝑡𝑎𝑟𝑡 𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑁𝑢𝑚𝑒𝑟𝑎𝑡𝑜𝑟
∑(𝑥 𝑖 − 𝑥̅ )(𝑦𝑖 − 𝑦̅) , 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦 …
∑(𝑥 𝑖𝑦𝑖 − 𝑥 𝑖𝑦̅ − 𝑦𝑖 𝑥̅ + 𝑥̅𝑦̅ ), 𝑠𝑖𝑚𝑝𝑙𝑖𝑓𝑦
∑𝑥𝑖 𝑦𝑖 − ∑𝑥𝑖 𝑦̅ − ∑𝑦𝑖 𝑥̅ + ∑𝑥̅𝑦̅, 𝑟𝑒𝑝𝑙𝑎𝑐𝑒 𝑢𝑠𝑖𝑛𝑔 (1)
∑𝑥𝑖 𝑦𝑖 − 𝑛𝑥̅𝑦̅ − 𝑛𝑦̅𝑥̅ + ∑𝑥̅𝑦̅, 𝑠𝑖𝑚𝑝𝑙𝑖𝑓𝑦
∑𝑥𝑖 𝑦𝑖 − 2𝑛𝑥̅𝑦̅ + ∑𝑥̅𝑦̅, 𝑠𝑖𝑚𝑝𝑙𝑖𝑓𝑦
∑𝑥𝑖 𝑦𝑖 − 2𝑛𝑥̅𝑦̅ + 𝑛𝑥̅𝑦̅, 𝑠𝑖𝑚𝑝𝑙𝑖𝑓𝑦
∑𝒙𝒊 𝒚𝒊 − 𝒏𝒚 ̅𝒙̅
𝑇ℎ𝑒 𝐷𝑒𝑛𝑢𝑚𝑒𝑟𝑎𝑡𝑜𝑟
∑(𝑥 𝑖 − 𝑥̅ ) 2
∑𝑥𝑖2 − 2∑𝑥 𝑖 𝑥̅ + ∑𝑥̅ 2 , 𝑟𝑒𝑝𝑙𝑎𝑐𝑒 𝑢𝑠𝑖𝑛𝑔 (1)
∑𝒙𝒊 𝒚𝒊 − 𝒏𝒚
̅𝒙̅
𝑆𝑜, 𝑟𝑥,𝑦 =
√∑𝒙𝟐𝒊 − 𝒏𝒙
̅ 𝟐 ⋅ ∑𝒚𝟐𝒊 − 𝒏𝒚
̅𝟐
Regression Models
Model Parameters
Independent Var.
Theoretical Line
formula
y=ß ß
Estimated Line
Dependent Var. Error formula
y=ß ß
Note: We take the square of the vertical distances to eliminate the misleading negative sign
Wrong!
Even the sum of errors is 0
But sum of squares is 25
Correct
-5
5
Elasticity Index
∆𝑦 ∆𝑥
𝜀𝑥𝑦 = :
𝑦 𝑥
∆𝑦 𝑥 ∆𝑦 𝑥
= ⋅ → ⋅
𝑦 ∆𝑥 ⏟∆𝑥 𝑦
𝑆𝑙𝑜𝑝𝑒
𝑥
∴ 𝜀𝑥𝑦 = 𝛽̂1 ⋅ ̂ ̂1𝑥 , 𝑛𝑜𝑡𝑒 𝑡ℎ𝑎𝑡 𝑖𝑡 𝑖𝑠 𝑎 𝑣𝑎𝑙𝑢𝑒 𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑖𝑛𝑑𝑖𝑐𝑎𝑡𝑜𝑟, "𝑥 𝑣𝑎𝑙𝑢𝑒 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑"
𝛽0 +𝛽
Another formula for Pearson correlation coefficient
2
∑(𝑦𝑖 − 𝛽̂0 − 𝛽̂1 𝑥 𝑖 ) → 𝑚𝑖𝑛 (𝑓𝑖𝑟𝑠𝑡 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑤𝑖𝑡ℎ 𝑟𝑒𝑠𝑝𝑒𝑐𝑡 𝑡𝑜 𝛽̂0 )
2
∑(𝑦𝑖 − 𝛽̂0 − 𝛽̂1 𝑥 𝑖 ) → 𝑚𝑖𝑛 (𝑓𝑖𝑟𝑠𝑡 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑤𝑖𝑡ℎ 𝑟𝑒𝑠𝑝𝑒𝑐𝑡 𝑡𝑜 𝛽̂1 )
∑(𝑥 𝑖 − 𝑥̅ )(𝑦𝑖 − 𝑦̅ )
𝑟𝑥,𝑦 =
√∑(𝑥𝑖 − 𝑥̅) 2∑(𝑦𝑖 − 𝑦̅) 2
∑𝒙𝒊 𝒚𝒊 − 𝒏𝒚
̅𝒙̅
𝑟𝑥,𝑦 =
√∑𝒙𝟐𝒊 − 𝒏𝒙
̅ 𝟐 ⋅ ∑𝒚𝟐𝒊 − 𝒏𝒚
̅𝟐
̂𝟎 = 𝒚
𝜷 ̂𝟏 𝒙
̅−𝜷 ̅, (𝟒)
∑ 𝑦𝑖 𝑥𝑖 − 𝑛𝑥̅𝑦̅
∴ 𝛽̂1 =
∑ 𝑥𝑖2 − 𝑛𝑥̅ 2
∑( 𝑥−𝑦̅) 2
∴ 𝑟𝑥,𝑦 = 𝛽̂1 ⋅ √∑(
̅) 2
𝑦−𝑦
Price Elasticity of Demand
P
∆𝑸 ∆𝑷
𝜺𝑸,𝑷 = ∶
𝑸 𝑷
∆𝑄 𝑃 32
∴ 𝜀𝑄,𝑃 = ⋅
∆𝑃 𝑄
𝑃 24 ȁ 𝜀ȁ > 1
𝐼𝑓 𝑄 = 32 − 𝑃, 𝑡ℎ𝑒𝑛, 𝜀𝑄,𝑃 = −1 ×
32 − 𝑃
16 ȁ 𝜀ȁ = 1
𝑥̅ 8 ȁ 𝜀ȁ < 1
𝐸𝑙𝑎𝑠𝑡𝑖𝑐𝑖𝑡𝑦 𝐼𝑛𝑑𝑒𝑥 𝜀𝑥𝑦 = 𝛽̂1 ⋅
𝛽̂0 + 𝛽̂1 𝑥̅
Q
32
Sum of Squares
𝑦𝑖 − 𝑦̅ = 𝑦𝑖 − 𝑦ො 𝑖 + 𝑦ො𝑖 − 𝑦̅ 𝑦ො 𝑖
𝑆𝑆𝐸
∑(𝑦𝑖 − 𝑦̅)2
⏟ = ∑(𝑦𝑖 − 𝑦ො𝑖 )2
⏟ + ∑(𝑦ො𝑖 − 𝑦̅)2
⏟ 𝑆𝑆𝑇
𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝑇𝑜𝑡𝑎𝑙 𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝐸𝑟𝑟𝑜𝑟 (𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙) 𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝑅𝑒𝑔𝑟𝑒𝑠𝑠𝑖𝑜𝑛
𝑺𝑺𝑻 𝑺𝑺𝑬 𝑺𝑺𝑹 𝑆𝑆𝑅
𝑦̅
𝑺𝑺𝑹
𝑺𝑹𝟐 = , 0 ≤ 𝑅2 ≤ 1
𝑺𝑺𝑻
𝑖𝑓 𝑅 2 = 1, 𝑆𝑆𝑅 = 𝑆𝑆𝑇
𝑖𝑓 𝑅 2 = 0, 𝑆𝑆𝑅 = 0
When 𝑅 2 = 0.85 that means: We are able to explain the Y variable around the sample mean by
only 85% using our model
̂𝑖) 2
∑( 𝑦𝑖 −𝑦
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐸𝑟𝑟𝑜𝑟 𝜎𝑒 = √
𝑛−2
∑( 𝑦𝑖−𝑦̂𝑖 ) 2 𝜎𝑒 ∑𝑥2𝑖
𝜎𝛽̂1 = √( = 𝜎𝛽̂0 = 𝜎𝑒 ⋅ √
𝑛−2) ⋅∑( 𝑥−𝑥̅) 2 √( 𝑥𝑖 −𝑥̅ ) 2 𝑛⋅∑(𝑥−𝑥̅) 2
∑ 𝑦𝑖 𝑥 𝑖 − 𝑛𝑥̅ 𝑦̅
𝛽̂1 =
∑ 𝑥 2𝑖 − 𝑛𝑥̅ 2
𝛽̂0 = 𝑦̅ − 𝛽̂1 𝑥̅,
for the slop will start with negative value until reach one point to get positive due to Bo is
negative
If the GDP increased by 1 EUR then the AGAE will increase by 1,24974935917592
𝑥
𝐸𝑙𝑎𝑠𝑡𝑖𝑐𝑖𝑡𝑦 𝐼𝑛𝑑𝑒𝑥 𝜀𝑥𝑦 = 𝛽̂1 ⋅ ̂ ̂1𝑥 , only for 1%
𝛽0 +𝛽
∑(𝑦𝑖 − 𝑦̅) 2
⏟ = ∑(𝑦𝑖 − 𝑦ො 𝑖 )2
⏟ + ∑(𝑦ො 𝑖 − 𝑦̅) 2
⏟
𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝑇𝑜𝑡𝑎𝑙 𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝐸𝑟𝑟𝑜𝑟 (𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙) 𝑆𝑢𝑚 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒𝑠 𝑅𝑒𝑔𝑟𝑒𝑠𝑠𝑖𝑜𝑛
𝑺𝑺𝑻 𝑺𝑺𝑬 𝑺𝑺𝑹
𝑆𝑆𝑅
𝑅2 = We are able to explain the Y variable around the sample mean by only 00% using
𝑆𝑆𝑇
our model
There is a strong linear association between the dependent and independent variable.
𝑟𝑥𝑦2=0.985232=𝑅2
we know that the association between the two indicators is valid if there is only one independent
variable and one dependent variable.
̂𝑖) 2
∑( 𝑦𝑖 −𝑦
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐸𝑟𝑟𝑜𝑟 𝜎𝑒 = √ , The average differences between the estimated and the
𝑛−2
observed y is value of sigma e
∑( 𝑦𝑖−𝑦̂𝑖 ) 2 𝜎𝑒
𝜎𝛽̂1 = √( = , the average differences between 𝛽̂1 and the sample 𝛽1 is =
𝑛−2) ⋅∑( 𝑥−𝑥̅) 2 √∑( 𝑥𝑖 −𝑥̅) 2
Which go very close to zero indicating that Our estimation of B1 is describe most of the data
from our model
∑𝑥2𝑖
𝜎𝛽̂0 = 𝜎𝑒 ⋅ √
𝑛⋅∑(𝑥−𝑥̅) 2
𝛽̂𝑘
𝑡=
𝜎𝛽̂𝑘
As we can see the interval does not include the zero value, it means that the β1 parameter
cannot be zero at 95% confidence level.