Week+3_418
Week+3_418
𝑧
1 1 2
𝐶𝐷𝐹 → ∫ exp (− 2 𝑧 ) 𝑑𝑧 → 𝑇𝑎𝑏𝑙𝑒 𝑍
−∞ 𝜎 √2𝜋 2𝜎
For Sure here 𝜎 = 1 if Standard normal and z is weighted by
standard deviation
𝜆𝑥 𝑒 −𝜆
𝑥!
𝑃 𝑥 (1 − 𝑃)1−𝑥
𝑋 Example 𝐷𝑖𝑠𝑡 𝑃𝐷𝐹
𝑋 → −∞: +∞ Returns of 𝑁𝑜𝑟𝑚𝑎𝑙 See above
(𝑛 > 30) Stock Market
(𝑛 > 30)
1
𝑁𝑜𝑟𝑚𝑎𝑙 → 𝑃𝜃 = ..
𝜎…
𝑆𝑡𝑢𝑑𝑒𝑛𝑡
Θ= 𝑃𝑜𝑖𝑠𝑠𝑜𝑛 → 𝑃 𝜃
𝑊𝑒𝑖𝑏𝑢𝑙𝑙
..
( .. )
1 1 2
𝐷~𝑁𝑜𝑟𝑚𝑎𝑙 ∈ Θ: 𝑃𝜃 = exp (− 𝑧 )
𝜎√2𝜋 2𝜎 2
1 1 2
𝑃𝑟𝑜𝑏 = exp (− 𝑧 )
𝜎√2𝜋 2𝜎 2
1 1 2 1 1 2
𝐿= exp (− 2 𝑧 ) × exp (− 2 𝑧 )
𝜎√2𝜋 2𝜎 𝜎√2𝜋 2𝜎
1 1 1 1
× exp (− 2 𝑧 2 ) × exp (− 2 𝑧 2 ) × … .
𝜎√2𝜋 2𝜎 𝜎√2𝜋 2𝜎
1 1 2
× exp (− 2 𝑧 )
𝜎√2𝜋 2𝜎
Clue Keywords:
• Probability Density Function.
• Likelihood Function: Joint PDF
𝟏 𝟏
𝑵
𝑳 = 𝚷𝒊=𝟏 𝒆𝒙𝒑 (− (𝒀 − ̂ )𝟐 )
𝒀
𝝈√𝟐𝚷 𝟐𝝈𝟐
𝟏 𝟏
𝑳= 𝑵
𝚷𝒊=𝟏 𝒆𝒙𝒑 (− 𝟐 (𝒀 − (𝜶 ̂ 𝑿)𝟐 )
̂+𝜷
𝝈√𝟐𝚷 𝟐𝝈
𝟏 𝟏
𝑳= 𝑵
𝚷𝒊=𝟏 𝒆𝒙𝒑 (− 𝟐 (𝒀 − 𝜶 ̂ 𝑿)𝟐 )
̂−𝜷
𝝈√𝟐𝚷 𝟐𝝈
𝟏 𝟏
𝑵
𝑳 = 𝚷𝒊=𝟏 𝒆𝒙𝒑 (− (𝒀 − ̂ )𝟐 )
𝒀
𝝈√𝟐𝚷 𝟐𝝈𝟐
𝟏 𝟏
𝑵
𝑳 = 𝚷𝒊=𝟏 𝒆𝒙𝒑 (− ̂ )𝟐 )
(𝒀 − 𝑿𝜷
𝟐𝝈 𝟐
𝝈√𝟐𝚷
See Appendix
• 𝚷 joins a constant by Power
• 𝚷 joins an Exponential by summation
𝑵
𝟏 𝟏
𝑳=( ) 𝒆𝒙𝒑 (− ∑(𝒀 − ̂ )𝟐 )
𝑿𝜷
𝝈√𝟐𝚷 𝟐𝝈𝟐
Before we derive the likelihood function, we can follow the recent
updates in Python, R, Stata, SAS: we take the Log then we derive
𝒍 → 𝑳𝒐𝒈(𝑳)
𝑵
𝟏 𝟏
𝑳=( ̂ )𝟐 )
) 𝒆𝒙𝒑 (− 𝟐 ∑(𝒀 − 𝑿𝜷
⏟𝝈√𝟐𝚷 ⏟ 𝟐𝝈
𝒂 𝒃
𝟏 𝟏
𝒍 = 𝑵. 𝒍𝒐𝒈 ( ̂ )𝟐 )
) + 𝒍𝒐𝒈 𝒆𝒙𝒑 (− 𝟐 ∑(𝒀 − 𝑿𝜷
𝝈√𝟐𝚷 𝟐𝝈
𝟏 𝟏
𝒍 = 𝑵. 𝒍𝒐𝒈 ( ̂ )𝟐
) − 𝟐 ∑(𝒀 − 𝑿𝜷
𝝈√𝟐𝚷 𝟐𝝈
𝟏
̂ )𝟐
𝒍 = 𝑵[𝒍𝒐𝒈 𝟏 − 𝒍𝒐𝒈 𝝈√𝟐𝚷] − 𝟐 ∑(𝒀 − 𝑿𝜷
𝟐𝝈
Log Likelihood Function of Normal Distribution
𝟏
̂ )𝟐
𝒍 = −𝑵(𝒍𝒐𝒈 𝝈√𝟐𝚷) − 𝟐 ∑(𝒀 − 𝑿𝜷
𝟐𝝈
𝟏
𝒍 = −𝑵𝒍𝒐𝒈 𝝈 − 𝑵 𝒍𝒐𝒈 √𝟐𝚷 − ∑(𝒀 − ̂ )𝟐
𝑿𝜷
𝟐𝝈𝟐
𝝏𝒍
̂
𝝏𝜷
𝝏𝒍
̂
𝝏𝝈
Appendix Math Notes:
Π exp(3) = exp(∑3)
exp(3 + 3 + 3) = 8103
exp(3) × exp(3) × exp(3) = 8103
When the Π joins an exponential it turns to summation.
When the Π joins a constant it turns to power
1 1
𝑃𝐷𝐹 = exp (− 2 (𝑥 − 𝜇𝑥 )2 )
𝜎√2𝜋 2𝜎
From an Econometric point of view, we assume our variable is not 𝑥 but
𝜀 where they follow normality with mean 𝜇𝜀 = 0 and variance is 𝜎 2
1 1
𝑃𝐷𝐹 = exp (− 2 (𝜀 )2 )
𝜎√2𝜋 2𝜎
Note 5. Review of Log Properties
log 𝑒 𝑎 = 𝑎 log 𝑒 = 𝑎
exp(𝑎) = 𝑒 𝑎