Lec3 ppt2019
Lec3 ppt2019
Lecture 3
Oct. 2, 2019
ReCap: Properties of LS Estimators
E (β̂0 ) = β0 , E (β̂1 ) = β1 .
• Variances of β̂0 , β̂1 :
2
1 X
σ {β̂0 } = σ + Pn
2 2
n 2
i =1 (Xi − X)
σ 2
σ2 {β̂1 } = Pn .
i =1 (Xi − X )2
Standard errors (SE) of the LS estimators.
• Replace σ2 by MSE:
2
1 X
s 2 {β̂0 } = MSE + P ,
n n 2
i =1 ( Xi − X )
MSE
s 2 {β̂1 } = Pn .
i =1 (Xi − X )2
●
6
●
5
y
4
3
2
0 1 2 3 4 5 6
x
8
●
7
6
5
y
4
●
3
2
0 1 2 3 4 5 6
x
A Simulation Study
Yi = 2 + Xi + i , i = 1, · · · , 5.
• For each data set, derive the LS estimators β̂0 , β̂1 and MSE.
• Data set 1:
case X Y
1 1.86 3.08
2 0.22 2.27
3 3.55 4.38
4 3.29 5.12
5 1.25 1.38
β̂0 = 1.34, β̂1 = 0.94, MSE = 0.79.
• Data set 2:
case X Y
1 1.86 2.91
2 0.22 2.13
3 3.55 5.35
4 3.29 5.76
5 1.25 2.01
β̂0 = 1.19, β̂1 = 1.20, MSE = 0.52.
• ..., ...
• Data set 100:
case X Y
1 1.86 3.36
2 0.22 2.50
3 3.55 5.93
4 3.29 5.36
5 1.25 2.67
β̂0 = 1.75, β̂1 = 1.09, MSE = 0.24.
Note how the Xi s are kept fixed and how the LS estimators vary
across these data sets.
Figure: Sampling distributions of β̂0 , β̂1 , MSE. Sample means are
1.99, 1.02, 1.04 respectively. True parameters are 2, 1, 1, respectively.
25
20
Frequency
Frequency
15
5 10
0 5
0
beta_0 beta_1
histogram of MSE
25
Frequency
15
0 5
0 1 2 3 4
sigma^2
Figure: True: red solid; LS lines: grey broken; mean LS line: blue broken
7
6
5
y
4
3
2
0 1 2 3 4 5
x
We calculate the sample mean and sample standard deviation of
these 100 realizations of β̂0 , β̂1 , respectively. Then compare them
to the respective theoretical values.
• β̂0 : Theoretical mean and standard deviation:
v
u
t 2
1 X
E (β̂0 ) = β0 = 2, σ{β̂0 } = σ2 + P = 0.854.
n n 2
i = 1 ( Xi − X )
Yi = β0 + β1 Xi + εi , i = 1, . . . , n.
(1 − α)-Confidence interval of β1 :
0 1 2 3
beta_1
Heights
i =1 Xi − n (X ) = 3038.761. Also
Pn Pn
i =1 (Xi − X )2 = 2 2
So
s {β̂1 } =
• 95%-confidence interval of β1 :
(0) (0)
• Null hypothesis: H0 : β1 = β1 , where β1 is a given constant.
• T-statistic:
Why are the critical value approach and the pvalue approach
equivalent? How to conduct hypothesis testing with regard to β0 ?
Heights
• T statistic:
• Critical value:
• Since
• Or the pvalue . Since
• Conclude that