0% found this document useful (0 votes)
103 views

Families of Random Variables: Homework 7

Uploaded by

Zihan Zhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Families of Random Variables: Homework 7

Uploaded by

Zihan Zhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Families of Random Variables

Homework 7

Problems
1. Let X ∼ N egbin(4, 1/3).

(a) Find P {X > 12}


∞ 12
X
x 1 1 X 1 1
P {X > 12} = Cx+4−1 ( )4 (1 − )x = 1 − x
Cx+4−1 ( )4 (1 − )x = 0.8341 (1)
x=13
3 3 x=0
3 3

(b) Find the smallest value for x so that P {X > x} = 0.05, 0.01, 0.001
∞ x
X
i 1 1 X 1 1
P {X > x} = Ci+4−1 ( )4 (1 − )i = 1 − i
Ci+4−1 ( )4 (1 − )i (2)
i=x+1
3 3 i=0
3 3

So minimal x such that P {X > x} = .05 is 17, minimal x such that P {X > x} = .05 is 23,

x 17 23 29 30 40
P {X > x} 0.9538 0.9918 0.9987 0.9991 1.0000

minimal x such that P {X > x} = .05 is 30.


(c) Simulate 10,000 independent observations of N egbin(4, 1/3) random variable and check your an-
swers to (a) and (b) from the simulation.
X¡-rnbinom(10000,4,1/3)
X¡-sort(X)
X[10000*(1-.05)]
X[10000*(1-.01)]
X[10000*(1-.001)]
S ¡- X¿12
table(S)
From table(S) we know P {X > 12} = 0.8303, and the three quantiles are 17, 23 and 30. They
are quite similar to answers in last two parts.

2. For some natural numbered-valued random variables, the case {X = 0} cannot be observed. Thus, we
can define and second random variable Y so that

P {Y = y} = P {X = y|X 6= 0}.

1
(a) Find the mass function for Y .
P (X = y, y 6= 0) P (X = y, y 6= 0)
P {Y = y, y 6= 0} = P {X = y|X 6= 0} = = (3)
P (X 6= 0) 1 − P (X = 0)

P {Y = 0} = P {X = 0|X 6= 0} = 0 (4)

(b) Give this mass function for X ∼ Bin(n, p)

P {X = 0} = Cn0 p0 (1 − p)n = (1 − p)n (5)

P (X = y, y 6= 0) C y py (1 − p)( n − y)
P {Y = y, y 6= 0} = = n (6)
1 − P (X = 0) 1 − (1 − p)n

(c) Give this mass function for X ∼ Geom(p)

P {X = 0} = p(1 − p)0 = p (7)

P (X = y, y 6= 0) p(1 − p)y
P {Y = y, y 6= 0} = = = p(1 − p)y−1 (8)
1 − P (X = 0) 1−p

(d) Find the mean for these random variables,


P
X yP (X = y, y 6= 0) EX
EY = yP {Y = y, y 6= 0} = = (9)
1 − P (X = 0) 1 − P (X = 0)
EX np
EYBin = = (10)
1 − P (X = 0) 1 − (1 − p)n
p
EX 1−p p
EYGeom = = = (11)
1 − P (X = 0) 1−p (1 − p)2

3. On the other hand, the mass function for a zero inflated random variable Y is a mixture of a degenerate
random variable taking only the value 0. Thus, the mass function

fY (y) = αI0 (y) + (1 − α)fX (y)


2
for some natural numbered-valued random variable X (mean µX and variance σX ) and some α ∈ (0, 1)
(a) Verify that fY is a mass function.
Note I0 (y) ≥ 0 and fX (y) ≥ 0, so fY (y) ≥ 0
X X X
fY (y) = (αI0 (y)) + ((1 − α)fX (y))
X X
=α I0 (y) + (1 − α) fX (y) (12)
= α + (1 − α) = 1

So fY (y) is mass function.

2
2
(b) Find the mean of Y in terms of µX and σX .
X X X
EY = yfY (y) = αyI0 (y) + (1 − α)yfX (y)
(13)
= αy + (1 − α)EX

2
(c) Find the variance of Y in terms of µX and σX .
X X X
EY 2 = y 2 fY (y) = αy 2 I0 (y) + (1 − α)y 2 fX (y)
(14)
= αy 2 + (1 − α)µ2X

V ar(Y ) = EY 2 − (EY )2 = αy 2 + (1 − α)EX 2 − [αy + (1 − α)EX]2


= (1 − α)(µ2X + σX
2
) − 2α(1 − α)yµX − (1 − α)2 µ2X (15)
= α(1 − α)µ2X + (1 − 2
α)σX − 2α(1 − α)yµX

Challenging Problems
1. Let X ∼ Beta(α, β)

(a) Write the density of X as an exponential family with natural parameters η1 , η2 .

Γ(α + β) α−1
f (x) = x (1 − x)β−1
Γ(α)Γ(β)
Γ(α + β)
= exp[(α − 1)lnx + (β − 1)ln(1 − x)]
Γ(α)Γ(β)
= exp{(α − 1)lnx + (β − 1)ln(1 − x) − [ln(Γ(η1 + 1)) + ln(Γ(η2 + 1)) − ln(Γ(η1 + η2 + 2))]}
(16)
η1 = α − 1, η2 = β − 1 (17)

(b) Find E ln X
A(η1 , η2 ) = ln(Γ(η1 + 1)) + ln(Γ(η2 + 1)) − ln(Γ(η1 + η2 + 2)) (18)
∂A(η1 , η2 ) Γ0 (η1 + 1) Γ0 (η1 + η2 + 2)
ElnX = = − (19)
∂η1 Γ(η1 + 1) Γ(η1 + η2 + 2)
Z ∞
Γ0 (η1 + 1) = η1 tη1 −1 e−t dt = η1 Γ(η1 ) (20)
0
Z ∞
Γ0 (η1 + η2 + 2) = η1 tη1 −1 e−t dt = (η1 + η2 + 2)Γ(η1 + η2 + 1) (21)
0

η1 Γ(η1 ) (η1 + η2 + 1)Γ(η1 + η2 + 1)


ElnX = − =0 (22)
Γ(η1 + 1) Γ(η1 + η2 + 2)

(c) Find EX ln X

3
(d) What does these values tell you in the case of X ∼ Beta(0, 0) = U nif (0, 1)?
2. Let X1 , . . . , Xn be independent and identically distributed with kurtosis α4 .
(a) Find the kurtosis α4,n of X̄n , the average of X1 , . . . , Xn .
For i = 1, . . . , n,
Xi − µX 4 E{Xi − µX }4
E{( ) } − 3 = α4 = −3 (23)
σX σX
n Pn
4 1X 4 E{ i=1 (Xi − µX )}4
E{X̄ − µX } = E{ (Xi − µX )} = (24)
n i=1 n4
Consider
E{(Xi1 − µX )(Xi2 − µX )(Xi3 − µX )(Xi4 − µX )} = 8µ4X − 8µ4X = 0 (25)
E{(Xi1 − µX )2 (Xi2 − µX )(Xi3 − µX )} (26)
n
X̄ − µX 4 1 X Xi − µ 4
α4,n = E{( ) }−3= 4 E{ } −3
σX n i=1 α
(27)
n(α4 + 3)
= −3
n4

(b) Find
lim α4,n .
n→∞

n(α4 + 3)
lim α4,n = lim − 3 = −3 (28)
n→∞ n→∞ n4

You might also like