Assignment 2
Assignment 2
Guidelines
You are free to work on this assignment in groups (of up to 3 students) but
you are strongly encouraged to work out these problems individually before
discussing answers with your group. Each group should submit a single copy of
answers to these questions onto Moodle. Write your student ID and the names of
any student you worked with on this assignment. Names cannot be added after the
assignment is submitted. The whole assignment must be typed. Equations must be
typed with software for typing equations, such as the Equation Editor in MS Word.
Late submission or handwritten assignments will not be accepted and a zero score
will be given.
Questions
1 [30 points] Continue from Question 3 of Assignment 1.
(a) (21 points) Given the data (copied below), compute the following statistics:
(i) Total Sum of Squares (TSS), (ii) Explained Sum of Squares (ESS), (iii) Residual
Sum of Squares (RSS), (iv) R2 , (v) Adjusted R2 , (vi) Variance of 1 , (vii) Standard
error of 1 .
(b) (5 points) What might be a reason for which the estimator of 1 is biased
downwards? Explain.
(c) (4 points) If the reason you gave in part (b) is correct, does this mean that
the estimated coefficient of the class size is definitely smaller than the true e↵ect?
Explain.
1
1 .
a)
可
=
*
88 82 + 75+ 73 +57 ) / 5 =
15
)
T TSS = Ʃ- yp
(
(
=
169 + 49f 4 +324 =54
o
The
" Assignment
多,
:modo
1
ii)
regesso
;
?
M
y .5 s, x;
-
Y :
=
performanlei ,
×T =
sizei
Xi y 订 Yi gp
( -^
Yi y (
20 90 . 3 88 /90 3 .
-
÷
75) 234 09 .
/88 90 3) ≡ 5 29
-
.
.
.
(
40 80 .
1
8z 1 - 75 =
26 . 01 82 80 - =
3 61.
50 75 75 /75 -
75) == 0
( 75 =
0
69 9
2 2
60 .
巧 (69 9 75)
.
- = 26 01.
9
7369 . =
9 61.
=
800 59 7 . 57 (
≥=
5 7 75} 234 09 -
. 2 57 59 ( -
)
7
. 29
Sum :
520 25 8 .
Yg )
≥
ii ) ESS =
=
520 . 2
/
=
: τi ) RSS - ;) ISS ESStRss
=
= y
=
25 8 . 546 =
5202+RSS
RSS =
25 .
iv ) R2 =
ESS/ TSS
520 2
953
.
= =
0 .
546
v ) adjusted R
2
=
1 -
nk 1 -
(1 -
R
=
)
|
2 )
=
1 -
(1 -
R
6 937
立 -
vi )Var (β ) =
TSSX
σ
“
=
RS 的 = 25 =
86
比 2 灣
.
-
TSSx
"
Ʃ 2
"
( xT
" "
= -
π:) = (20 -
50) + (40 -
( 50)
50) +50 -
+ (60 .
)
50 + (80 50)≥=2000
-
8 6
Var ( ,β )
.
:
=
可死
o0
=
0 0043 .
、
》
^
se ( β, ) (
vir ) β
ioo
:
1
= 4s
=
0 .
06561
YI
=
Jot hix thaxatu .
x2 =γ +γix1 tv
0
= do +dix ha ( Jo + )
∴
YI t ,
a, t r tu
y
=
(
ho α 50 ) + (
e + h ,) x
γ , + hrtu )
Cumparnmdel
ehur : Yi =Bo Tβ 14 t E
.
: β , = { 1 tof 1
When there dowmward bias
is on β1 ,
I ,
- 31 α25 > =
0
c
子
Table 1: Class size and student performance
2 [25 points] The following equation describes the median housing price in a com-
munity in terms of amount of pollution (nox for nitrous oxide) and the average number
of rooms in houses in the community (rooms):
\ = 11.71
log(price) 1.043 log(nox), n = 506, R2 = 0.264
\ = 9.23
log(price) 0.718 log(nox) + 0.306rooms, n = 506, R2 = 0.514
(c) (5 points) Interpret the two R2 . Why can’t you use the R2 to compare the
two equations?
(d) (5 points) Compute the adjusted R2 and compare the explanatory power of
2
the two equations. [Hint: R̄2 = 1 (1 nR k)(n1 1) ]
(e) (5 points) The estimate of the elasticity of price with respect to nox in the
simple regression is more negative than the estimate in the multiple regression. Is
this relationship what you would have predicted, given your answer to part (b)? Does
this mean that 0.718 is definitely closer to the true elasticity than 1.043? Explain.
3 [30 points] Let ˆ0 and ˆ1 be the OLS intercept and slope estimators of the simple
linear regression model, respectively, and let ū be the sample average of the errors
(not the residuals!). P
(a) (5 points) Show that ˆ1 can be written as ˆ1 = 1 + ni=1 wi ui , where wi = SST
di
x
and di = xi x̄. P
(b) (5 points) Use part (a), along with ni=1 wi = 0, to show that ˆ1 and ū are
uncorrelated. [Hint: You are being asked to show that E[( ˆ1 1 ) · ū] = 0.]
2
eA
)
2
C 1R measuves the offif of model
goodness a ,
d)
Model 1 :
RE = 1
- HR 5,
]
品 !
= 0 .
2625
Model 2 :
RE =
1- ( -2
1
R
5062
)
-1
= 052
Model hasa 2
可 )
[ Ex( )= EXT -
- Ex
3 )
a β =
Ʃ(
X xR
= RX -
=
Ʃ-
xi ( βo+β xi + Ui -
可
) =
0 J
SSTX
Ʃβ (λi- π +β , Ʃ4 -] xi +Ʃ(xi π)
)
i
-
Ui 可 ε (Xπ
-
-
π )
=
SSTK
=
β, Ʃπ xP -
+ βπ EX π) +ƩxiuT
SSTX
=
β. SSTx + / : π)ui
Ex -
SSTX
=β+ 之 ω i =β itEurwi
b> E( [β -
β ,) ,
U: ) =
E ( Eu: wi ) a )
=
π EEEui ωi )
=
π E ( E) uω i+ Enω i) )
Cor ( ui xi )
E(
,
)
=
+ a Ʃ w:
ssTx
=
a ( O+ 0 )
= O
c ) Bi =
y -
π T
β
= 坑 Ʃ Yi -
π (β , + Ewini )
=
E( β +β o xi + Ui ) -
πβ , + π ( Ewini )
=
Bo + R π+ a- πβ . +λ ( β^ -β )
N
Bot π -
[ -
β 1)
d) Var ( β) o
=
Var ( Bo +a -
- )π ) β
=
Varla ) t VarliB Bia andB areancorrelated
Varlh Ʃ ui ) =Var β
(^-
(
=
)
+π β
)
( πPVur ( β^
)
Var (Eu: ) +
=
者 ( no2 ) +^
作
=
兵 +
SSTX
二
父
、
方
氏
。
父
一
方
(c) (5 points) Show that ˆ0 can be written as ˆ0 = 0 + ū ( ˆ1 1 )x̄.
ˆ
(d) (5 points) Use parts (b) and (c) to show that Var( 0 ) = /n + 2 (x̄2 )/SSTx .
2
(e) (5 points) Do the algebra to simplify the expression in part (d) to show that
2 1
P
n
n x2i
Var( ˆ0 ) = P
n
i=1
(xi x̄)2
i=1
P
. [Hint: SSTx /n = n 1 ni=1 x2i (x̄)2 .]
(f ) (5 points) Show that, when estimating 0 , it is best
Pto have x̄P= 0. What is
ˆ
Var( 0 ) in this case? [Hint: For any sample of numbers, i=1 xi > ni=1 (xi x̄)2 ,
n 2
ln(price) = 0 + 1 sqf t +u
(a) (5 points) What are the potential problems with this model? How would
you suggest John to improve his model? [Hint: Think about the potential omitted
variable bias. Be specific about the direction of the bias]
(b) (5 points) John believe that both the age of the apartment and its year of
construction may be important determinants of the price. Should he include both
variables in the model? Why or why not?
(c) (5 points) Suppose that distM T R is uncorrelated with sqf t, do you think
that distM T R should be included in the model? Why or why not?
3
) Var ( i
β )
兵
如
e =
+
Fπ
SSTx
^ (六 ) SSTK
0
+ =☆
=
SSTx
+ { R☆
2
[2
)
" x] π^
n -
(
=
SSTX
' "
(
& n Ʃ xi
=
sSTX
'
=
σ n
^
ExjI
xixPestimate
(
Since ( xi π) ≥≥0
2
ExT ε
-
≥
( P
Exi
when theequality holds when x
l , only
= 0
2
( -X
,
Exi
'
Varl βδ ) xiP
& n ε(
so that =
is minimized to
Ʃ (XT π ) -
& n+ ( . ) =π^ 11
Σ
小
1
ikely to be
Priceisnaffected by multiplefathus
4