You are on page 1of 16

ECO341A: Econometric Methods Homework I

Submitted By: Akhil Garg


17 August 2016
1. Distribution, Moments and MGFs: Write down the pdf s and derive the mean,
variance(through integration) and MGFs of the following distributions.
(a) Logistic Distribution
The pdf of Logistic distribution is given as:


exp xa
1
b
fX (x) = 

 2 ,
b 1 + exp xa

< x, a < ; b > 0

Calculation of mean:
Z
E[X] =

xfX (x) dx
Z



exp xa
x
b


 2 dx
b 1 + exp xa
b

Consider the change of variable


 

xa
t = exp
b
 

xa
dx
dt = exp
and x = a b log t
b
b
Z
Z
Z
a b log t
a
b log t
E[X] =
dt =
dt
dt = a
2
2
(1
+
t)
(1
+
t)
(1
+ t)2
0
0
0

Calculation of variance:
E[X 2 ] =

Z
Z

x2 fX (x) dx



exp xa
x2
b


 2 dx
b 1 + exp xa
b


Again using the change of variable t = exp
E[X 2 ] =

(a b log t)2
dt
(1 + t)2

a2
dt + b2
(1 + t)2

Z
=
0

xa
b

log t
1+t

Hence
V [X] = E[X 2 ] E[X]2 = a2 +

2

dt = a2 +

b2 2
3

b2 2
b2 2
a2 =
3
3

Calculation of m.g.f.:
Z
MX (t) =
Z

etx fX (x) dx



exp xa
etx
b


 2 dx
b 1 + exp xa
b

Consider the change of variable


1

 , then
1 + exp xa
b




exp xa
1u
1
b
,
x
=
a

b
log
du = 

 2
b 1 + exp xa
u
b
bt
Z 1
Z 1
1
MX (t) = eat
1
du = eat
ubt (1 u)bt du
u
0
0
u=

= eat B(1 + bt, 1 bt)


= eat (1 bt)(1 + bt)

for |t| < 1/b

(b) Chi-square Distribution


The pdf of Chi-square distribution is given as:
fX (x) =

) e( x
2 )

v
2( 2 ) v2

x(

v2
2

0 x < ; p = 1, 2, ...

Calculation of mean:
Z
E[X] =

xfX (x) dx

Z ( v2 ) ( x
) e( x
2 )
x e 2 )
x
dx
=
=

 dx
v
v
0
0
2( 2 ) v2
2( 2 ) v2
x

Z
v
x( 2 ) e( 2 )
v+2
= 2

 dx
v+2
2
0
2( 2 ) v v+2
x(

v2
2

=v
0

v2
x
x( 2 ) e( 2 )
 dx
v
2( 2 ) v2

= v

Calculation of variance:
Z
E[X 2 ] = x2 fX (x) dx
x
Z ( v+2
) e( x
2 )
x 2 ) e( 2 )
x
=
=
 dx
 dx
v
v
0
0
2( 2 ) v2
2( 2 ) v2
x

Z
v
v+4
x( 2 ) e( 2 )
= 4

 dx
v+4
2
0
2( 2 ) v2 v+4
2
x
 v   v + 2  Z x( v2
2 ) e( 2 )
=4
= v(v + 2)
 dx
v
2
2
0
2( 2 ) v2

x(

v2
2

Hence V [X] = E[X 2 ] E[X] = v(v + 2) v 2 = 2v


Calculation of m.g.f.:
Z
MX (t) = etx fX (x) dx
Z
=

e
0

tx

) e( x
2 )
 dx
v
2( 2 ) v2

x(

v2
2

Z
=
0

x(

) e( x(12t)
)
2
dx

v
2( 2 ) v2

v2
2

Consider the change of variable u = x(1 2t), then du = (1 2t)dx. Also, u = 0 for x =
0 and u = for x = (when t < 1/2)
v2
u
v2
Z
v
(1 2t)( 2 ) u( 2 ) e( 2 )
1
MX (t) =
= (1 2t) 2 ,
for t <
 du
v
v
(
)
1 2t
2
0
2 2 2

(c) Laplace Distribution


The pdf of laplace distribution is given as:


1
|x |
fX (x) =
exp
2

< x, < ; > 0

Calculation of mean:
Z
E[X] = xfX (x) dx


Z
x
|x |
=
exp
dx

2




Z
Z
x
x
x
(x )
=
exp
dx +
exp
dx


= + + =
(using integration by parts)
2
2
2
2
Calculation of variance:
Z
2
E[X ] = x2 fX (x) dx


Z 2
x
|x |
=
exp
dx

2




Z 2
Z 2
x
x
x
(x )
=
exp
dx +
exp
dx





Z
Z
x
2
(x )
2

x exp
dx +
+
x exp
dx
(using integration by parts)
=
2

2
2
+ 2 +
+ + 2 = 2 + 2 2
2
2

Hence
V [X] = E[X 2 ] E[X]2 = 2 + 2 2 2 = 2 2
Calculation of m.g.f.:
Z
MX (t) = etx fX (x) dx


Z
|x |
tx 1
=
e
exp
dx
2

Z
 Z



1
x
x
+
=
exp tx
exp tx
2

Z
 Z



1
x(t + 1)
x(t 1) +
=
+
exp
exp
2



1

=
exp t
exp t
(for |t| < 1/)
2 t + 1
t 1
et
=
,
for |t| < 1/
1 (t)2

(d) Student-t Distribution with degrees of freedom


The pdf of student-t distribution is given as:
fX (x) =

( +1
2 ) 1

( 2 )

1
1+

x2

 +1
2

< x < ; v = 1, 2, ...

Calculation of mean:
Z
E[X] =

xfX (x) dx

Z
=

( +1
2 ) 1

( 2 )

x
0

dx
 +1
2

x2

1+

Since it is an odd integral, E[X] = 0


Calculation of variance:
Z

x2 fX (x) dx

E[X ] =

x2

=
0

=2
0

Consider the change of variable t =


= 2 3/2

( +1
2 ) 1

( 2 )

( +1
2 ) 1

( 2 )

x2
,

( +1
2 ) 1

( 2 )

then dt =

1
1+

x2

x2

1+

dx
 +1
2

dx
 +1
2

2x
dx

2 1 (1 + t) 2 ( 2 1) dx
3

( +1
2 ) 1
B
= 2 3/2

( 2 )


3
, 1
2 2


23 2 1
( +1
2 ) 1


= 2 3/2
( 2 )

+1
2

=
2

Calculation of m.g.f: Consider the kth moment:


Z
E[X k ] = xk fX (x) dx
Z +1
( 2 ) 1

=
( 2 )

0
With the same change of variable t =
E[X k ] =

xk
1+

x2

dx
 +1
2

x2
,

(k+1)
( +1
2 ) 1 1

( 2 )
2

(k+1)
1
2

(1 + )

(k+1)
( +1
2 ) 1 1

=
2 B
( 2 )
2


k
1 k k+1
2
2


= 2
2
2 21

k+1 k
,
2
2

(k+1)
(k)
2
2

dt

Since the k-th moment exist only for > k, m.g.f. does not exist.

(e) Gamma Distribution


The pdf of gamma distribution is given as:


1
x
1
fX (x) =
x
exp

()

0 x < ; , > 0

Calculation of mean:
Z
E[X] =

xfX (x) dx



x
x
1
x
exp

dx
()

0


Z
1
x
( + 1)

x
exp

=
dx
()
( + 1) +1

0
Z

Calculation of variance:
Z
E[X] = x2 fX (x) dx


Z
x
x2
1
=
x
exp
dx
()

0


Z
1
x
2 ( + 2)
+1
=
x
exp
dx
()
( + 2) +2

0
= ( + 1) 2
Hence V [X] = E[X 2 ] E[X]2 = ( + 1) 2 2 2 = 2
Calculation of m.g.f.:
Z
MX (t) = etx fX (x) dx


Z
etx
x
1
=
x
exp
dx
()

0


Z
1
x(1 t)
1
=
x
exp
dx
()

0
Consider the change in variable u = x(1 t), then du = (1 t)dx


Z
1
1
u
1
dx
MX (t) =
u
exp

(1 t)(1 t)1 0 ()

1
= (1 t) ,
for t <

(f) Beta Distribution


The pdf of beta distribution is given as:
fX (x) =

1
x(1) (1 x)(1)
B(, )

0 x 1 ; , > 0

Calculation of mean:
Z
E[X] =

xfX (x) dx
Z

1
x(1) (1 x)(1) dx
B(, )
0
Z 1
1
x((+1)1) (1 x)(1) dx
=
B(, ) 0
B( + 1, )
( + )( + 1)()
=
=
B(, )
()()( + + 1)

=
+
=

Calculation of variance:
E[X 2 ] =

Z
Z

x2 fX (x) dx
1

1
x(1) (1 x)(1) dx
B(, )
0
Z 1
1
=
x((+2)1) (1 x)(1) dx
B(, ) 0
( + )( + 2)()
B( + 2, )
=
=
B(, )
()()( + + 2)
( + 1)
=
( + )( + + 1)
=

x2

Hence
V [X] = E[X 2 ] E[X]2
( + 1)
=

( + )( + + 1)
()
=
( + )2 ( + + 1)

Calculation of m.g.f.:

2

etx fX (x) dx

MX (t) =
Z

1
x(1) (1 x)(1) dx
B(,
)
0
!
Z 1 X

(tx)k
1
x(1) (1 x)(1) dx
=
B(, ) 0
k!
k=0
k Z 1
X
1
t
=
x(+k)1 (1 x)(1) dx
B(, )
k! 0
etx

1
B(, )

k=0
k
X
k=0

t
B( + k, )
k!

k
X
t B( + k, )
=1+
k! B(, )
k=1

=1+

k k1
X
t Y
k=1

+n
,
k! n=0 + + n

< t <

(g) F (1 , 2 ) distribution. Does the the MGF exist?


The pdf of F distribution is given as:
  1 /2
1 2
2
1 +
1
x 2
2


fX (x) =
2
i( 1 +
h
)
2
21 22
2
1
1 + 2 x

0 x < ; 1 , 2 = 1, 2, ...

Calculation of mean:
Z
E[X] =

xfX (x) dx
  1 /2 Z
1
2
1 +
1
x2
2


dx
=
2
h
i( 1 +
)
2
21 22
2
0
1
1 + 2 x

Consider the change of variable t =


E[X] =

1
2

1 +2
2


2
2




1
2

1
2 x,

then dt =

2
t
1

1 /2 Z

1 /2

1
2 dx

(1 + t)

(1 +2 )
2

2
1


dt

 1 +1 Z
1
2
2 ( 2 ) ( 21 +1)1

t
(1 + t)( 2 +1)( 2 1) dt
=
1
2
1
2 2
0
   
1 +2


2
1
2
2

=
B
+ 1,
1
1
2
2
21 22
  
2
1 +
2 ( 21 + 1)( 22 1)
2
2



=
=
1
2
2
1

2 2
1 +
22
2

1 +2
2

1
2

1 /2 

Calculation of variance:
2

x2 fX (x) dx
  1 /2 Z
2
1 +
1
2


=
h
2
21 22
0

E[X ] =

x
1+

1 +2
2

1
2 x

dx
2
i( 1 +
)
2

With the same change of variable t = 12 x,


  1 /2+1 Z 
 
1 /2
2
(1 +2 )
1 +
2
1
2
2

2
2


E[X ] =
t
(1 + t)
dt
1
2
2
1
1
2 2
0
  1 /2  ( 1 +1) Z
2
2
1
1
2
1 +
1
2
2


t( 2 +2)1 (1 + t)( 2 +2)( 2 2) dt
=
1
2
2
1
2 2
0
   
1 +2


2
1
2
2

=
+ 2,
2
B
1
2
2
21 22
  
2
1 +
2 ( 21 + 2)( 22 2)
2
2



=
=
2
1
1 +2

2 2

1
22
2
Calculation of m.g.f: Consider the k-th moment
Z
k
E[X ] = xk fX (x) dx
=

1
2

1 +2
2


2
2




1
2

1 /2 Z

Again with the same change of variable t =

x
h

1+

1 +2(k1)
2

1
2 x

dx
2
i( 1 +
)
2

1
2 x,

 1 +k Z
1
2
2 ( 2 ) ( 21 +k)1
t
(1 + t)( 2 +k)( 2 k) dt
1
1
2 2
0
   
1 +2


2
2
1
2


=
B
+
k,

k
1
2
2
21 22
 k
2
(1 /2 + k)(2 /2 k)
=
1
(1 /2)(2 /2)

E[X k ] =

1 +2
2


2

1
2

1 /2 

Hence the k-th moment exist only for k < 2 /2, and hence m.g.f. does not exist.

(h) log-normal distribution. Does the MGF exist?


The pdf of log-normal distribution is given as:


1 1
1
2
fX (x) =
exp 2 (log x )
2
2 x
9

< x, < ; > 0

Calculation of mean:
E[X] = E[elog X ]

= E[eY ]

where Y = log X N (, 2 ). Substituting t = 1 in the m.g.f. of normal distribution,




2
E[X] = exp +
2
Calculation of variance:
h
i
2
E[X 2 ] = E elog X

= E[e2Y ]

where Y = log X N (, 2 ). Substituting t = 2 in the m.g.f. of normal distribution,



E[X 2 ] = exp 2 + 2 2
Hence
V [X] = E[X 2 ] E[X]2


= exp (2 + 2 ) exp 2 + 2
Calculation of m.g.f.:
Z

etx fX (x) dx


Z tx
1
1
e
2
=
exp 2 (log x ) dx
x
2
2 0


Z
1
(log x )2
=
exp tx
log x dx
2 2
2 0

MX (t) =

Note that, t > 0


lim tx

(log x )2
log x =
2 2

Hence the m.g.f does not exist.

10

2. Suppose X

N (0, 2 ), then answer the following,

(a) Find the distribution of Y = |X|


Given,
(
Y =

X
X

X0
X<0

For X 0:
Y = X, X 0 = Y 0 and

dx
=1
dy


dx
fY (y) = fX (x)
dy


1
x2
=
exp 2
2
2 2
For X < 0:
Y = X, X < 0 = Y 0 and

dx
= 1
dy


dx
fY (y) = fX (x)
dy


1
x2
=
exp 2
2
2 2
Hence, the distribution of Y is




1
x2
1
x2
fY (y) =
exp 2 +
exp 2
2
2
2 2
2 2



2
x2
= exp 2 ,
y>0
2

(b) Find the mean and variance of Y


Calculation of mean:
Z
E[X] = xfX (x) dx


Z
x 2
x2
exp 2 dx
=
2

0
Consider the change of variable y =

x2
2 2 ,

then dy =

xdx
2

2
2
E[X] =
exp (t) dt =
0

11

Calculation of variance:
Z
E[X 2 ] = x2 fX (x) dx


Z 2
x 2
x2
exp 2 dx
=
2

0


Z
2
x
x2
exp 2
=
=
2
2

(variance of normal distribution)

Hence



2
2
2
V [X] = E[X ] E[X] = = 1

12

3. Near the end of the nineteenth century Karl Pearson developed the Pearson family
of distributions in which the p.d.f. f (y) satisfies the differential equation
1 d[f (y)]
a+y
=
f (y) dy
b + cy + dy 2
subject to the constraints that f (y) 0 and f (y) integrates to unity. If a formal
solution to the differential equation does not satisfy f (y) 0, then the range of
values of y is restricted to those for which f (y) > 0, and f (y) = 0 is assigned when
y is outside this range. For appropriate choices of a,b,c, and d, show that each of
the following distributions is a member of the Pearson family
(a) Normal distribution
The normal distribution is given as:
(
2 )

1
1 y
f (y) =
exp
2
2
2 2

< y, < ; > 0

Differentiating with respect to y, we get


(
 
  

2 )
y
1
1 y

exp
2
2
2
2
(
)

2  

1 y
d[f (y)]
1
y
exp
=

dy
2
2
4
2 2


+ y
1 d[f (y)]
=
f (y) dy
4
1
d[f (y)]
=
dy
2 2

Hence normal distribution belongs to the Pearson Family with


a = , b = 4 and c = d = 0
(b) Beta distribution
The beta distribution is given as:
f (y) =

1
y 1 (1 y)1
B(, )

, > 0 ; 0 x 1

Differentiating with respect to y, we get




1
d[f (y)]
=
( 1)y 2 (1 y)1 ( 1)(1 y)2 y 1
dy
B(, )


d[f (y)]
1
1 1
=
y 1 (1 y)1

dy
B(, )
y
1y


1 d[f (y)]
( 1) + y(2 )
=
f (y) dy
y2 y
Hence beta distribution belongs to the Pearson Family with
1
1
a = 2
, b = 0 , c = d = 2

13

(c) Gamma distribution


The gamma distribution is given as:
f (y) =



1
y
1
y
exp

()

Differentiating with respect to y, we get







d[f (y)]
1
y
1 1
y
2
(

1)y
=
exp

y
exp

dy
()




d[f (y)]
y
1

1
1
y 1 exp
=

dy
()



1 d[f (y)]
(1 ) + y
=
f (y) dy
y
Hence gamma distribution belongs to the Pearson Family with
a = (1 ), b = d = 0 and c =
(d) Student t-distribution
The student t-distribution is given as:

v+1
1
2

f (y) =
v
v
2

1+

1
( v+1
2 )
2

y
v

Differentiating with respect to y, we get



  
 
v+1
2y
d[f (y)]
1
v+1
2

v
dy
2
v 
v
2

v+1
d[f (y)]
1
2

=
dy
v
v2
1 d[f (y)]
=
f (y) dy

1+

y(1 + v)
v + y2

1
( v+1
2 )
2

y
v

1
( v+3
2 )
2

1 + yv
 2y  !)
v+1
2

1+

Hence gamma distribution belongs to the Pearson Family with


v
1
a = 0, b = 1+v
, c = 0 and d = 1+v

14

v
y2
v

4. Let (X , Y ) be random variable with the following pdf,


"
(
)#
2 
2
1
y y
(x x )(y y )
1
x x
p
f(X,Y ) (x, y) =
exp
+
2
2(1 2 )
x
y
x y
2x y (1 2 )
on R2 , x2 , y2 > 0, || 1. Suppose, x = y = 0, x = y = 1 then show the following,
(a) fX (x) =

1
2

 2
exp x2

The marginal distribution of X is given as


Z
fX (x) = f(X,Y ) (x, y) dy


Z

1
1
2
2
p
=
exp
x
+
y

2xy
dy
2
2(1 2 )
2 (1 )


Z


1
x2
1
2
p
=
exp
exp
y 2xy dy
2(1 2 )
2(1 2 )
2 (1 2 )

!2



Z

2 x2
x2
y x
1
p
p
dy
exp
exp

exp

2(1 2 )
2(1 2 )
2 (1 2 )
2(1 2 )

 2

1
x p
p
=
exp
2(1 2
2
2
2 (1 )
 2
1
x
fX (x) = exp
2
2
(b) fY |X (y|x) =

1
2(12 )

h
i
2
exp 12 (yx)
(12 )

The required conditional distribution is given as


fY |X (y|x) =

f(X,Y ) (x, y)
fX (x)

n
o
1
2
2
exp 2(1
2 ) x + y 2xy
2
=
2
1 exp x
2
2



1
1
2
2
2
2
=p
exp
x + y 2xy x (1 )
2(1 2 )
2(1 2 )


1
1 (y x)2
exp
fY |X (y|x) = p
2 (1 2 )
2(1 2 )
1

(12 )

(c) Cov(X, Y ) =
Covariance is defined as E[XY ] E[X]E[Y ]

15




xy
1
2
2
p
exp
x
+
y

2xy
dy dx
2
2(1 2 )
2 (1 )


Z
 !
Z

1
x
x2
p
y exp
exp
y 2 2xy dy dx
=
2(1 2 )
2(1 2 )
2 (1 2 )

!2
 2Z
Z

x
x
y

x
p
=
exp
y exp p
dy dx

2
2 (1 2 )
2(1 2 )

E[XY ] =

Consider the change of variable t = yx 2 .


2(1 )
p
Then y = x + t 2(1 2 ) and dt = dy 2

2(1 )

 2Z


p
x
x
2
2
exp
E[XY ] =
(x + t 2(1 ) exp (t ) dt dx
2
2

 2 
Z  2
x
x
exp
dx
=
2
2

 2
Z

x
dx
=
x2 exp
2
2
Z

E[XY ] =
Since E[X] = E[Y ] = 0, Cov(X, Y ) =

16

You might also like