You are on page 1of 6

Econometrics 1 - Problem set 1

Samuele Borsini Luigi Calro Murialdo Xinyi Zhang


0001083685 0001037355 0001075309

1 Question 1
Solution (1)
Solution (a) The population values are:
   
β0 21.14285714
β1  =  0.2619047619 
β2 −0.0952380952

Solution (b) Based on the function provided by the problem:


Y = β0 + Xβ + ϵ =⇒ ϵ = Y − β0 − Xβ
and
E(Y |X) = β0 + Xβ
Thus:
E(ϵ|X1 , X2 ) = E(Y − β0 − Xβ|X1 , X2 )
= E(Y |X1 , X2 ) − (β0 + Xβ)
= (β0 + Xβ) − (β0 + Xβ) = 0
In conclusion, the condition E(ϵ|X1 , X2 ) = 0 hold in the above population
model.

Solution (c) Since β1 is the coefficient for X1 of the conditional expectation


function model, we can say that it is the marginal effect of X1 on Y . So if X1
increases by a unit, that will cause an increase in the conditional expectation of
Y by β1 (0.2619047619) units.

Solution (d) The OLS estimator can be computed as follows.


β̂ = (X ′ X)−1 X ′ y
The estimates are: ˆ  
β0 18.84283835
β̂ = βˆ1  =  0.3611005262 
βˆ2 −0.0391014571

1
Solution (2)
Solution (a) The results have been saved inside the file “1 2 a.dta”.

Solution (b) Suppose β̂ is unbiased, then it satisfies

E(β̂|X) = β =⇒ E(β̂|X) − β = 0

Since we cannot compute the conditional expectation of the OLS, we can use the
sample average that (by the weak law of large numbers) should approximate the
1 Pn ˆ
conditional expectation (as n → ∞, βk → E(β̂k |X)). The table that
n i=1 i
follows displays the sample averages of the estimates and the “sample bias”,
computed as the difference between the sample averages and the population’s
values.

Estimates Sample average “Sample bias”


βˆ0 21.23686518 0.09400804
βˆ1 0.2582010924 -0.0037036695
βˆ2 -0.0986033849 -0.0033652897

Thus, the fact that the “sample bias” is small evidences the fact that the true
bias should be zero, hence βˆ0 , βˆ1 and βˆ2 should be unbiased.

Solution (c) As we can see from the graphs, the distributions of βˆ1 and βˆ2
are not normal. Nevertheless, they are not highly different from a normal. It
might be the case in which the central limit theorem holds, yet due to the
low quantity of observations (1000) the distributions are still not really smooth.

βˆ1 distribution βˆ2 distribution

Solution (3)
Solution (a) Compared with the previous ones, the distributions of βˆ1 and
βˆ2 are really close to being normal this time. Thus, as we pointed out before,
that is probably cause by the fact that the CLT holds.

2
βˆ1 distribution βˆ2 distribution

2 Question 2
Solution (1)
Solution (a) We define the Least Square estimator as follows:

βb = (X ′ X)−1 X ′ Y

Where:    
Y1 1 Temp1 Prec1
 Y2  1 Temp2 Prec2 
Y = .  X = .
   
.. .. 
 ..   .. . . 
Yn 1 Tempn Precn
The estimates for Model 5 are presented below:
ˆ  
β0 11830.78694
βb = βˆ1  = −214.3289192
βˆ2 −160.6549817

Solution (b) We define respectively the total sum of squares, the residual
sum of squares, and the explained sum of squares.
n
X
SST = (Yi − Ȳ ) · (Yi − Ȳ ) = 6522962196
i=1
Xn
SSR = (Ŷi − Ȳ ) · (Ŷi − Ȳ ) = 5782652519
i=1
Xn
SSE = (Yi − Ŷi ) · (Yi − Ŷi ) = 740309677.8
i=1

3
Solution (c) The R2 is a measure of the model goodness of fit: it indicates
how much of the dependent variables is explained by the indipendent variables
and it is defined as follows:
SSR
R2 = 1 − = 0.1134928665
SST

Solution (d) The fitted values and residuals are defined below:

Ŷ = X β̂
ê = Y − Ŷ

Solution (e) From the STATA’s relusts we know:


n
1X
ê¯ = eˆi = 1.58049 · 10−12
n i=1

The residuals’ average is zero by construction, yet the result is not because of
the approximation error.
We can compute the sample covariance between the residuals and the re-
gressors using the short formula since ê¯ = 0:
Pn
1.62819 · 10−12
   
i=1 êi
1 ′ 1 n
X ê =  Pi=1 Tempi · êi  = 1.72588 · 10−10 
P
n n n
i=1 Preci · êi 4.47751 · 10−11

As expected the results tend to zero as the Xs and the residuals are orthogonal
by construction (so their value is actually zero).

Solution (f ) From STATA we obtain:


n
1X
Ȳ = Yi = 6031.943958
n i=1
n
¯ 1X
Ŷ = Ŷi = 6031.943958
n i=1

In order to compare them, we compute the difference between the two:


¯
Ȳ − Ŷ = 1.81899 · 10−12

By construction this difference is zero, yet the computation does not return zero
due to STATA’s approximation error.

4
Solution (2)
Solution (a) The table presents the results obtained using MATA and the
ones obtained using STATA.

MATA STATA
βˆ0 11830.78694 11830.79
βˆ1 -214.3289192 -214.3289
βˆ2 -160.6549817 -160.655

As we can see, the results are the same, except for the negligible decimal ap-
proximation.

Solution (b) The average fitted value is 6031.944 and the average value of Yi
is 6031.944. Indeed, they are exactly the same.
The first observation is underpredicted (the predicted value is 6871.649,
while the value is 13080.423), whereas the second observation is overpredicted
(the predicted value is 9408.199, while the value is 8378.71).

Solution (c) We show that the sample average of the OLS residuals is equal
to zero by computing it on STATA.
n
1X
ê¯ = eˆi = 4.13 · 10−6
n i=1

Since we put a constant term among the regressors, we know by construction


that ê¯ is exactly zero, yet the number we obtain is not because of the STATA’s
approximation.

Solution (3)
Solution (a) We expect β˜1 to be biased, because since the true model is

Yi = β0 + β1 Tempi + β2 Preci + ϵi

omitting Preci will create omitted variable bias.

Solution (b) We obtain βˆ1 equal to -214.3289 and β˜1 equal to -275.5626. We
expect them to be very similar:
• When Preci and Tempi are weakly correlated (we expect them to be equal
when the two variables are uncorrelated).

• When β2 is close to zero (if β2 is exactly equal to zero, then β˜1 = βˆ1 ).

5
Solution (c) The estimate for Model 6 was β˜1 equal to -275.563. The par-
tialling out steps for the same Model will be:
1. Regress Yi on the constant:

Yi = α̂ + uˆ1

We obtain α̂ equal to 6031.944.


2. Regress Tempi on the constant

Tempi = γ̂ + uˆ2

We obtain γ̂ equal to 18.75988.


3. Regress uˆ1 on uˆ2 :
uˆ1 = δˆ0 + δˆ1 uˆ2 + uˆ3
We obtain δˆ1 equal to -275.563, that is equal to β˜1 .

You might also like