Assignment 1
Assignment 1
PROBLEM 1 (THEORY)
10 MARKS
Show E ( y ix i)= 0 + 1 x i
a)
(3 marks)
From the error term assumption (zero conditional mean) we know that:
Then
yi
E( y ix i )=E
= E(
)=
E ( ui|x i )=E ( ui ) =0
E( 0 + 1 x i +ui )
0 +E ( 1 x i)+E (ui)
0+ 1 xi +0
0+ 1 xi
E ( y i|x i )= 0 + 1 x i asrequired
b)
(4 marks)
Y is a binary variable which only takes on the values of 1 and 0. Therefore this is a case of binomial
probability. Then y=1 (individual uses public transport to go to work) is depicted as success and y=0
(individual does not use public transport to go to work) as failure, we have:
c)
(3 marks)
SSR y i ^0 ^1 x i
y i= ^ 0 + ^ 1 x i +ui
i=1
^ 0
ui= y i ^0 ^ 1 x i
=0
2 ( y i ^ 0 ^ 1 x i ) =0
i=1
u^ i2
i=1
i=1
y in ^o ^ 1 x i=0
i=1
y i ^ 0 ^ 1 x i
yi
i=1
y ^ o ^1 x=0
SSR ( ^ 0 , ^ 1)
xi
^
^
n o 1 i=1 =0
n
n
i=1
minimise
( x, y )
Rearranging
y= ^ o + ^ 1 x
is always
SSR ( ^ 0 , ^ 1 )
=0
^
( x, y )
is always on the
PROBLEM 2 (STATA)
a)
Use STATA to estimate the model by OLS. Interpret the signs of coefficients and
the significance. (2 marks)
The coefficient of gdp (B1) is positive which indicates that for every unit increase in gdp,
^
debt
will increase by 4.473415 assuming all else is constant. This impact is significantly
The coefficient of sur (B2) is negative. The model demonstrates that for every unit increase in
sur,
^
debt
will decrease by 3564.548 assuming all else is constant. This indicates that one
unit increase in budget surplus will completely offset public debt if gdp is 0. Despite the large
coefficient of budget surplus, the model still predicts a range of 2460.705 to 3451.303 in
public debt. This allows an inference that gdp has much larger values relative to sur.
b)
Use STATA to calculate the fitted values (predicted values) for the following
regressors values. (4 marks)
Firstly, entering the command predict debthat provides the predicted values for all data entries.
Secondly, using the display command calculates the values of the predicted public debt (given gdp
and sur values) shown in the screenshot.
Figure 2: Predicted Values
GDP
SUR
108.547
0.366381
2623.247
92.913
0.282695
2851.612
90.213
0.398573
2782.936
134.792
0.220599
3260.299
^
Debt
c) Use STATA to test the null hypothesis H0: 1= 2=0 against the alternative H1: At
least 10 or 20. Show the F-statistic and the p-value of the test. How many
degrees of freedom does the test have? (2 marks)
Using the command line test gdp sur to test for H0 produces the following statistics.
Figure 3: Hypothesis Testing 1
F statistic = 4.78
P-value = 0.0107
The test has 2 model (numerator) df and 89
(denominator) residual df.
Therefore we reject the null hypothesis with a 95%
confidence level (=0.05) as the p-value of 0.0107 is lower than alpha.
d) Use STATA to test the null hypothesis H0: 2=-3500 against the alternative H1: 23500. Show the statistics and the p-value of the test. (2 marks)
Entering the command test sur=-3500 produces the following values:
Figure 3: Hypothesis Testing 2
F-statistic = 0.00
T-statistic = -0.0317774
P-value = 0.9747
Df=91 (t test)
Therefore we fail to reject the null hypothesis with a 95%
confidence level (=0.05) as the p-value of 0.9747 is much
higher than alpha.
The t statistic is calculated by the general formula:
t=
Figure 4: T Statistic
^ 0
SE( ^ )