Académique Documents
Professionnel Documents
Culture Documents
Introduction to Econometrics
Professor Woodbury
Fall Semester 2015
Simple Regression (Regression with One Regressor)
1. Introduction to linear regression
2. Defining the linear regression model
3. Estimating the linear regression model method of moments
4. Algebraic Properties and measures of fit of OLS
5. Sampling distribution of the OLS estimator
6. Hypothesis testing and confidence intervals for 0 and 1
Yi = 0 + 1X i
Actual values of Y:
!
Yi = 0 + 1X i + u i
u i = Yi Yi = Yi ( 0 + 1X i )
2
u
=0
i=1 i
X
u
=0
i
i
i=1
Yi = 0 + 1X i
Y = 1 + 2 X
u1 P1
Q1
1 + 2 X 1
X1
Q2
P2
X2
Q3
Q4
P3
X3
X4
SIMPLE REGRESSION
MODEL
observations
is a residual
(ei or
u i )
Y (actual value)
Y
P4
Y (fitted value)
Y Y = e (residual)
e4
R3
e1
R2
P1
R1
b1
X1
e2
P2
X2
Y = b1 + b2 X
R4
e3
P3
X3
X4
The discrepancies between the actual and fitted values of Y are known as the residuals.
P4
Y (fitted value)
Y = b1 + b2 X
u4
Y = 1 + 2 X
Q4
1 + 2 X 4
b1
X1
X2
X3
X4
Both of these lines will be used in our analysis. Each permits a decomposition of the value
roe
salary
salaryhat
uhat
14.1
1095
1224.058
129.0581
10.9
1001
1164.854
163.8542
23.5
1122
1397.969
275.9692
5.9
578
1072.348
494.3484
13.8
1368
1218.508
149.4923
20.0
1145
1333.215
188.2151
16.4
1078
1266.611
188.6108
16.3
1094
1264.761
170.7606
10.5
1237
1157.454
10
26.3
833
1449.773
616.7726
11
25.9
567
1442.372
875.3721
12
26.8
933
1459.023
526.0231
13
14.8
1339
1237.009
101.9911
14
22.3
937
1375.768
438.7678
15
56.3
2011
2004.808
6.191895
79.54626
SST = i=1(Yi Y )2 !
n
SSE = i=1(Yi Y )2
n
SSR = i=1u i2
n
u i = Yi Yi
implies
Yi = Yi + u i
10
Yi = Yi + u i
n
2
2
(Y
Y
)
=
(
Y
Y
)
+
u
i=1 i
i=1 i
i=1 i
n
11
SSE
R =
SST
2
SSR
=1
SST
So R-squared measures the fraction of the total variation in
(or variance of) Yi that is explained by the regression that
is, by X
But beware!
o A high R-squared does not mean that the regression has a
causal interpretation
o And a low R-squared doest mean the regression is useless
12
13
SER = su
2
u
i=1 i
n
n2
SSR
n2
14
15
u
i=1 i
n
RMSE =
SSR
n
16
= 698.9 2.28STR! !
(10.4) (0.52)
17
18
and
1 we first
19
Yi = 0 + 1X i + ui
This seems more restrictive that it really is
For example, if we choose Y to be the natural logarithm of
earnings (rather than earnings), and X to be years of
schooling, we will estimate a nonlinear relationship between
schooling and earnings (examples to follow)
That is why the assumption is linear in parameters
20
21
22
23
Sample selection that is non-random is another case of nonrandom sampling, and it is very difficult to handle
o For example, if we want to estimate the response of
married women to a change in the wage, we are forced to
use the sample of women who are already working
(because they have wages we can observe)
o But working women may be different from non-working
women in unoberved ways, so the estimates we obtain
wont be applicable generally
24
25
26
27
E(y|x) 5
x1
x2
x3
x
MPLE 2.13
In order to get an unbiased estimator of the ceteris paribus effect of educ on wage, we must
28
53
12
E(wage|educ) 5
0 1
1educ
16
educ
With the homoskedasticity assumption in place, we are ready to prove the following:
wage
29
30
31
E( 0 ) = 0
and
!
E( 1 ) = 1
E(Y ) = Y
33
Two notes
That is,
34
and
35
What is var(
1 )?
36
= E[( 1 1 )2 ]
37
X
)
var(ui )
i=1 i
n
var( 1 ) = 2 =
1
(X
X
)
i=1 i
var(ui )
i=1(X i X )
n
var(Yi )
2
(X
X
)
i=1 i
n
var(ui ) = var(Yi )
Why?
38
Note that
!
39
var( 1 ) = 2 ==
1
=
n
2
SST
(X
X
)
X
i=1 i
var(ui )
40
var( 1 ) =
var(ui )
i=1(X i X )
n
2
2
(X
X
)
i=1 i
n
)
var(
var(Yi ) or var(ui ) or 2 is
First,
1 is smaller when
smaller
Makes sense the smaller the variance of Y, the less likely it is
we will draw extreme samples
Why? Because extreme samples are simply less likely to occur
Also, smaller errors mean the data will be closer to the
population regression line, so the estimate of the slope will be
more precise
41
var( 1 ) =
var(ui )
n
(X i X )
i=1
var(Yi )
n
(X i X )
i=1
42
2 = E(u 2 )
We dont observe ui (the errors), but we can use residuals to
compute an estimator of 2:
= (1/ n) i=1u i2
2
43
44
E( 2 ) = 2
That is,
is an unbiased estimator of 2
(Again, the divisor should be (n2), not n, but in a large sample,
this is not an issue)
45
var( 1 ) = =
1
var(ui )
i=1(X i X )
n
2
2
(X
X
)
i=1 i
n
for 2
2
var( 1 ) =
So we have an estimator for
1
46
How is
is normal
1 distributed?
1 ~ N( 1, 2 )
1
47
is normal)
1 ~ N( 1, 2 )
1
48
E( 0 ) = 0 and !E( 1 ) = 1
1 is
2. The variance of
var( 1 ) = 2
1 is normal
49
50
51
t=
Y:
Y Y ,0
sY / n
52
53
1 1,0
t=
SE( )
1
54
)
SE(
What is
1 ?
)
SE(
SE( 1 ) = 2
55
Two-sided alternative
Return to calculation of the t-statsitic:
1 1,0 1 1,0
t=
=
SE( 1 )
2
1
56
783
area = .95
rejection
region
area = .025
0
c
rejection
region
area = .025
57
One-sided alternative
1 1,0 1 1,0
t=
=
2
SE( 1 )
1
58
FIGURE C.5 Rejection region for a 5% significance level test against the one-sided
alternative N > N0.
area = .95
0
c
rejection
area = .05
59
SE( 0 ) = 10.4!
SE( 1 ) = 0.52
!
!
1 1,0
t=
SE( )
1
61
62
Confidence intervals
SE(
{ 1 1.96
1 }
63
SE( 0 ) = 10.4
SE( 1 ) = 0.52
= 698.9 2.28STR
SE(
{ 1 1.96
1 } = {2.28 1.960.52} = {3.30, 1.26}
Equivalent statements:
The 95% confidence interval does not include zero;
The hypothesis 1 = 0 is rejected at the 5% level
64
= 698.9 2.28STR
(10.4) (0.52)
This expression means that:
The estimated regression line is
!
= 698.9 2.28STR
65
Number of obs =
F(
1,
420
418) =
19.26
Prob > F
0.0000
R-squared
0.0512
Root MSE
18.581
------------------------------------------------------------------------|
testscr |
Robust
Coef.
Std. Err.
P>|t|
--------+---------------------------------------------------------------str |
-2.279808
.5194892
-4.38
0.000
-3.300945
-1.258671
_cons |
698.933
10.36436
67.44
0.000
678.5602
719.3057
-------------------------------------------------------------------------
66
so:
!
!
t (for 1 = 0) = 4.38
p-value = 0.000
95% confidence interval for 1 is (3.30, 1.26)
67