SW 4 - Academics

advertisement
Eco 205: Econometrics
• Any questions?
1
Population Linear Regression Model
Yi = b 0 + b1X i + u i
population data point
Y
pop slope = b1
Observed Value
of Y for X3
u3
u11
Y11
b0
X3
X11
X
2
Sample Regression Equation
chosen in sample
not chosen in sample
ˆ = bˆ + bˆ X
Y
i
0
1 i
Y
Y3
estimated error for X3
(residual)
uˆ 3
estimated
intercept =
pop slope = b1
u3
Yˆ3
bˆ 0
b0
estimated slope = bˆ1
X3
X
3
The OLS estimator solves
n
2
ˆ
ˆ
min å[Yi - (b 0 + b1X i )]
bˆ0 , bˆ1
i= 1
4
5
California Test Score/Class Size data
• Interpretations
6
Predicted values & residuals:
7
OLS regression: STATA output
regress
testscr
Regression
str, robust
with robust
standard
errors
Number of obs
F( 1,
418)
Prob > F
R-squared
Root MSE
=
=
=
=
=
420
19.26
0.0000
0.0512
18.581
------------------------------------------------------------------------|
Robust
testscr |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
--------+---------------------------------------------------------------str | -2.279808
.5194892
-4.39
0.000
-3.300945
-1.258671
_cons |
698.933
10.36436
67.44
0.000
678.5602
719.3057
-------------------------------------------------------------------------
8
Measures of Fit
9
The Standard Error of the
Regression (SER)
10
Root Mean Squared Error (RMSE)
11
2
R
and SER Example
12
The Least Squares Assumptions
13
LSA #1: E(u|X = x) = 0
14
LSA #2: (Xi,Yi), i = 1,…,n are i.i.d.
LSA #3: E(X4) < ∞ and E(Y4) < ∞
15
OLS can be sensitive to an outlier
16
Sampling Distribution of bˆ1
17
Some Preliminary Algebra …
18
n
bˆ1 - b1 =
å( X
i= 1
n
n
i
- X )( ui - u )
2
(
X
X
)
å i
i= 1
=
å( X
i
- X )ui
i =1
n
2
(
X
X
)
å i
i= 1
19
Now we can calculate E( bˆ1) and var( bˆ1 )
é n
ù
ê å ( X i - X )ui ú
ú
E [ bˆ1 ] = E [b1] + E ê i=n1
ê
2 ú
ê å( Xi - X) ú
ë i=1
û
é n
ù
ê å ( X i - X ) E [ u i X i ]ú
ú= ?
E [ bˆ1 ] = b1 + E ê i=1 n
ê
ú
2
å( Xi - X ) ú
ê
ë
û
i= 1
20
Next calculate var( bˆ1)
21
22
The larger the variance of X, the
smaller the variance of bˆ1
There are the same number of black and blue dots – using which
would you get a more accurate regression line?
23
What is the sampling distribution of bˆ ?
1
24
We are now ready to turn to hypothesis tests & confidence
intervals …
25
Download