Вы находитесь на странице: 1из 17

EC355 (Econometrics)

Instructor: Jean Eid


Assignment # 2

Question-1 Suppose we have the following model


cr imei = o + 1 f emalei + ui
where,

(
cr imei =

1 if person i commits a crime


0 otherwise

(
f emalei =

1 if person i is female
0 otherwise

(a) Explain in words what this model says


solution
This model is a linear probability model and it stipulates that the likelihood of committing a crime is
different for males and females.
(b) What are the OLS estimators for 1 , o
solution
The OLS estimators are again the same as before.
n

X
f emalei f emale cr imei

1 =

i =1
n
2
X
f emalei f emale
i =1

o = cr ime 1 f emale
(c) Suppose we have the following output from stata

Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------------female |
2725
.3001835
.4584217
0
1
------------------------------------------------------------------------Number of females in the sample= 818
Number of female criminals in the sample= 55
Number of criminals in the sample= 196
Total number of observations= 2725
i. Calculate 1 and o
solution
First to calculate 1 , note that the denominator can be calculated in two different ways.

PAGE

A. When stata gives the standard deviation of f emalei it actually computes the bottom of 1 and
divides by N 1. The Std. Dev. it gives is nothing but the square root of that. So all we have to
do is square the Std. Dev. and multiply by N 1 = 2725 1 = 2724 we get
n

2
X
f emalei f emale2 = N 1 Std .Dev .
i =1

= 2724 .45842172
= 572.45
B. The second way we could do this is by looking at the denominator and try to simplify what it is.
n
n
2 X
X
2
f emalei f emale =
f emalei2 N f emale
i =1

i =1
n
X

f emalei N

i =1

Nf 2

where, Nf is the number of females in the sample. Also denote the number of males in the
sample by Nm .
N2
= Nf f
N

N Nf

= Nf
N
Nf Nm
=
N

818 2725 818


=
2725
= 572.45
Now to calculate the numerator,
n
n
n

X
X
X
f emalei f emale cr imei =
f emalei cr imei f emale
cr imei
i =1

i =1

i =1

You should convince your self that the first element on the LHS is nothing but the number of female
criminals. This is because the variable f emalei cr imei is either 0 or 1 and takes the value 1 when
the person in the sample is a female and a criminal. Denote this number by Nf c . denote the number
of criminals by Nc

= Nf c

Nf
Nc
N

= 55 818/2725 196
= 3.84
Therefore,

3.84
b1 =
572.45
= 0.0067

EC355Fall 2015-2016 (Assignment # 2)

Page 2 of 17

PAGE

and,

o = cr ime 1 f emale

196
818
=
0.0067
2725
2725
= 0.0739
ii. Calculate
2
solution
First we need to get the SSR. To do this, let ci denote cr imei (less messy), and note that

(
ci2 + o2 2 o ci
ci o
if male

u i =
u i2 =
ci2 + o + 1 2 o + 1 ci
ci o 1 if female

ci + o2 2 o ci

u i2 =
ci + o + 1 2 o + 1 ci

if male
if female

if male
if female

Nmc + Nm o2 2Nmc o
if male
2

u i =
Nf c + Nf o + 1 2Nf c o + 1 if female
i =1
n
X

Where, Nmc , Nf c are the number of male and female criminals respectively.

141 + 1907 0.07392 2141 0.0739


for males

u i2 =

55 + 818 0.0739 + 0.0067


2 55 0.0739 + 0.0067
for females
i =1
(
n
X
130.5747 for males

u i2 =
51.302
for females
i =1
n
X

Finally

n
X

u i2 = 181.8767, and
2 = 0.0668

i =1

iii. test if females and males have the same tendencies for criminal activities by conducting a t-test.
solution
The test is a t-test and we need
q the t-stat which means we need the standard error. This is

2
0.0668
=
n
572.45 = 0.0108 and its t-value is -0.62. So we cannot reject
2
X
f emalei f emale

i =1

the null that males and females likelihood of committing a crime are different from each other
iv. test if females and males have the same tendencies for criminal activities by conducting a F-test The
easiest way to do this is to square the t-test and get F(1,2723) = 0.386. This simply because the f-tets
is the square of the t-test when we only have one independent variable.
Question-2 Show that the F-stat
SSRr SSRu/q
SSRu/N k 1

Ru2 Rr2/q

1Ru2/N k 1

solution
First note that the T SS =

n
2
X
yi y does not change no matter how we estimate the model. Therefore
i =1

EC355Fall 2015-2016 (Assignment # 2)

Page 3 of 17

PAGE

we first divide to and bottom by T SS

SSRr/T SS SSRu/T SS
/q

SSRu/T SS
/ N k 1

T SS ESSr /T SS T SS ESSu /T SS

/q

T SS ESSu

/T SS/N k 1

1 ESSr/T SS 1 + ESSu/T SS
1ESSu/T SS/N k 1
2
Ru Rr2/q
=
1Ru2/N k 1
=

Question-3 Suppose we have a random variable yi and we estimate the variance of y as


n
2
X
yi y

y2 =

i =1

n
n1

n
2
X
yi y
i =1

(a) What is the expectation of


y
solution
This is a bit different than the one we have done in class.

2
X

yi y

X
2

i
=1
2

+
E y = E
y

n
n

i
=1

n
2
X

yi y

2
X
i =1

yi y

+ E
= E
E

n
n

i =1

n
2
X

yi y

i
=1

=
See your lecture notes for E

n
and, E n1
=

n1 2

n
n1

n
2
X

yi y

n
2

i
=1

and, E
y

y
=
n

E
=n

i =1

=
=
=

n1 2

= n 1 2 , therefore

n1 2
n

+ n 1 2
n
n1

n + 1 n 1
n

n
n1

n2 1 2
n

n
n1

EC355Fall 2015-2016 (Assignment # 2)

Page 4 of 17

PAGE

(b) Is
y2 biased
solution

Since E
y2 6= y2
y2 is a biased estimator

(c) If the answer above was yes, how would you correct for this bias
solution
n
We first need to subtract n1
and multiply the left over with n2n1
n

n
2

+
y
n2 1
n1
n

2
X

yi y

X
2

n
n
n
i =1

+
y

y
+
= 2

n 1
n
n1
n 1

i =1

n
2
X

yi y

X
2

n
i
=1
yi y

+
= 2

n 1
n

i =1

y2 =

n + 1 X
yi y
n2 1
i =1

Maximum Likelihood

Question-4 Suppose that X1 , X2 , Xn are independent Poisson distributed random variables with mean > 0.i.e

P (X = x ) =

x e
x!

(a) is this a discrete or continuous distribution


solution
You should know it is because the equality sign. If this is a continuous distribution the P (X = x ) should
be zero for all x
(b) Get the maximum likelihood estimator for
solution
First get the likelihood function which is the product of the probabilities

L=

n
Y
xi e

xi !

i =1

Pn
x
i =1 i

Qn

en

i =1

xi !

Now get the log likelihood

log L =

n
X
i =1

EC355Fall 2015-2016 (Assignment # 2)

xi log n

n
X

log xi !

i =1

Page 5 of 17

PAGE

Get the derivative and set it equal to zero


n
X

xi

log L = i =1

= x

n =0

Question-5 Suppose we have the model


yi = o + ui
where ui N (0, 2 ) i.e. f (ui ) =

1 e
2

2
1 ui
2 2

(a) Get the maximum likelihood estimator of o , and 2


solution
First get the likelihood function where ui = yi o

L=

n
Y
i =1
n
Y

f (ui )

i =1
n
Y

2
1 ui
1
e 2 2
2
2

1 yi o
1
2
e 2
2
i =1

2
1 Pn
yi o
1

2
i =1

2
=
e
2

get the log likelihood


n
2
n
n
1 X
yi o
log L = log 2 log 2 2
2
2
2
i =1

differentiate with respect to o and 2


n

n
1 X
log L
yi o = 0
=

+
2
2
4

2
2

(1)

log L
2 X
yi o = 0
=
o
2 2

(2)

i =1

i =1

(2) o = y,and this with (1)


=

n
X
yi y
n
i =1

The following questions are from the book

Chapter-7 2, 4, 6, 8; C2, C4

EC355Fall 2015-2016 (Assignment # 2)

Page 6 of 17

PAGE

solution

EC355Fall 2015-2016 (Assignment # 2)

Page 7 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

Page 8 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

Page 9 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

10

Page 10 of 17

PAGE

11

Chapter-8 2, 4, C6, C8

EC355Fall 2015-2016 (Assignment # 2)

Page 11 of 17

PAGE

12

solution

EC355Fall 2015-2016 (Assignment # 2)

Page 12 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

13

Page 13 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

14

Page 14 of 17

PAGE

15

Chapter-17 1,2,C2
solution

EC355Fall 2015-2016 (Assignment # 2)

Page 15 of 17

PAGE

EC355Fall 2015-2016 (Assignment # 2)

16

Page 16 of 17

PAGE

End of Assignment # 2
Total pages: 17

17

Вам также может понравиться