STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to...

4
STA 4321/5325 Solution to Homework 6 March 17, 2017 1. Let X Gamma(α, β ) with density f (x)= 1 β α Γ(α) x α-1 e -x/β , x 0. (a) Prove that X has MGF M X (t)=1/(1 - βt) α provided t< 1 β . Solution. By definition, the MGF is given by: M X (t)= E(e tX )= Z -∞ e tx f (x) dx = Z 0 e tx 1 β α Γ(α) e -x/β x α-1 dx = 1 β α Γ(α) Z 0 e -x 1 β -t x α-1 dx = 1 β α Γ(α) Z 0 e -x 1 β -t x α-1 dx = 1 β α Γ(α) Z 0 e -x . β 1-βt x α-1 dx = 1 β α Γ(α) β 1 - βt α Γ(α) Z 0 1 β 1-βt α Γ(α) e -x . β 1-βt x α-1 | {z } PDF of Gamma α, β 1-βt dx = 1 (1 - βt) α , provided 1 β - t> 0 ⇐⇒ t< 1 β . (b) Using the above MGF, find E(X ) and E(X 2 ). Then find V (X ). Solution. We have M X (t)=1/(1 - βt) α = (1 - βt) -α . Therefore, M 0 X (t)= d dt M X (t)= -α(1 - βt) -α-1 (-β )= αβ (1 - βt) -(1+α) M 00 X (t)= d 2 dt 2 M X (t)= d dt M 0 X (t)= αβ {-(1 + α)}(1 - βt) -(1+α)-1 (-β ) = α(1 + α)β 2 (1 - βt) -(2+α) . Therefore, E(X )= M 0 X (t)| t=0 = αβ and E(X 2 )= M 00 X (t)| t=0 = α(1 + α)β 2 . Hence V (X )= E(X 2 ) - E 2 (X )= α(1 + α)β 2 - α 2 β 2 = αβ 2 . 2. Let X χ 2 ν (chi-squared distribution with ν degrees of freedom). (a) Write down the density of X , using the definition of chi-squared distribution as a Gamma distribution with appropriately chosen parameters α and β . Solution. Recall that χ 2 ν Gamma(α = ν/2= 2). Therefore, the PDF of X is given by: f (x)= 1 2 ν/2 Γ(ν/2) e -x/2 x ν 2 -1 ; x 0. 1

Transcript of STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to...

Page 1: STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to Homework 6 March 17, 2017 1. Let X˘Gamma( ; ) with density f(x) = 1 ( ) x 1e x= ; x 0: (a)

STA 4321/5325 Solution to Homework 6 March 17, 2017

1. Let X ∼ Gamma(α, β) with density

f(x) =1

βα Γ(α)xα−1e−x/β, x ≥ 0.

(a) Prove that X has MGF MX(t) = 1/(1− βt)α provided t < 1β .

Solution. By definition, the MGF is given by:

MX(t) = E(etX) =

∫ ∞−∞

etxf(x) dx

=

∫ ∞0

etx1

βαΓ(α)e−x/βxα−1 dx

=1

βαΓ(α)

∫ ∞0

e−x(

1β−t)xα−1 dx

=1

βαΓ(α)

∫ ∞0

e−x(

1β−t)xα−1 dx

=1

βαΓ(α)

∫ ∞0

e−x/(

β1−βt

)xα−1 dx

=1

βαΓ(α)

1− βt

)αΓ(α)

∫ ∞0

1(β

1−βt

)αΓ(α)

e−x/(

β1−βt

)xα−1

︸ ︷︷ ︸PDF of Gamma

(α, β

1−βt

)dx =

1

(1− βt)α,

provided 1β − t > 0 ⇐⇒ t < 1

β .

(b) Using the above MGF, find E(X) and E(X2). Then find V (X).

Solution. We have MX(t) = 1/(1− βt)α = (1− βt)−α. Therefore,

M ′X(t) =d

dtMX(t) = −α(1− βt)−α−1(−β) = αβ(1− βt)−(1+α)

M ′′X(t) =d2

dt2MX(t) =

d

dtM ′X(t) = αβ {−(1 + α)}(1− βt)−(1+α)−1(−β)

= α(1 + α)β2(1− βt)−(2+α).

Therefore, E(X) = M ′X(t)|t=0 = αβ and E(X2) = M ′′X(t)|t=0 = α(1 + α)β2. Hence

V (X) = E(X2)− E2(X) = α(1 + α)β2 − α2β2 = αβ2.

2. Let X ∼ χ2ν (chi-squared distribution with ν degrees of freedom).

(a) Write down the density of X, using the definition of chi-squared distribution as a Gammadistribution with appropriately chosen parameters α and β.

Solution. Recall that χ2ν ≡ Gamma(α = ν/2, β = 2). Therefore, the PDF of X is given by:

f(x) =1

2ν/2Γ(ν/2)e−x/2 x

ν2−1; x ≥ 0.

1

Page 2: STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to Homework 6 March 17, 2017 1. Let X˘Gamma( ; ) with density f(x) = 1 ( ) x 1e x= ; x 0: (a)

(b) Find E(X) and V (X).

Solution. Using the formulas, E(X) = αβ = ν2 · 2 = ν and V (X) = αβ2 = ν

2 · 22 = 2ν.

3. Let X be a gamma random variable with mean If E(X) = 20 and V (X) = 100.

(a) Find α and β, the two parameters in a Gamma distribution.

Solution. Let X ∼ Gamma(α, β). Then E(X) = αβ = 20 and V (X) = αβ2 = 100.Therefore,

V (X)

E(X)=

100

20=⇒ αβ2

αβ= β = 5.

Which meansE(X) = αβ = α× 5 = 20 =⇒ α = 4.

(b) Using Chebyshev’s theorem, provide an interval such that the probability that X lies inthis interval is atleast 99%.

Solution. Let µX and σ2X respectively denote the mean and the variance of X. Then byChebyshev’s theorem,

P (µX − kσX < X < µX + kσX) = P (|X − µX | < kσX) ≥ 1− 1

k2.

We need k such that 1− k−2 = 0.99 =⇒ k−2 = 0.01 =⇒ k = 1/0.1 = 10. Therefore

0.99 ≤ P (20− 10√

100 < X < 20 + 10√

100) = P (−80 < X < 120) = P (0 < X < 120),

since X is non-negative. Therefore, required interval is (0, 120).

4. Let Z follow the standard normal distribution with PDF f(z) = 1√2πe−

z2

2 for −∞ < z < ∞.

Verify that f(z) is indeed a PDF. Observe that f(z) > 0 for any z ∈ R is automatic. So all you

have to prove is∫∞−∞ f(z) dz = 1. [Hint: Note that

∫∞0 e−

z2

2 dz =∫∞0 z−1e−

z2

2 z dz. Now use

the substitution t = z2/2 and modify the proof for E(Z2) = 1.]

Solution. Note that∫ ∞−∞

f(z) dz =

∫ ∞−∞

1√2πe−

z2

2︸ ︷︷ ︸even function

dz

= 2

∫ ∞0

1√2πe−

z2

2 dz

= 21√2π

∫ ∞0

z−1e−z2

2 z dz

=2√2π

∫ ∞0

(√2t)−1

e−t dt (substitute t = −z2/2)

=2√2π· 1√

2

∫ ∞0

t−12 e−t dt

=1√π

∫ ∞0

t12−1e−t dt =

1√π

Γ(1/2) =1√π

√π = 1.

2

Page 3: STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to Homework 6 March 17, 2017 1. Let X˘Gamma( ; ) with density f(x) = 1 ( ) x 1e x= ; x 0: (a)

5. The mode of a continuous RV X is defined to be the point where fX , the density of X, ismaximum. Let X ∼ N(µ, σ2). Show that X has mode µ. Also find the density at the mode.

Solution. The density of X is:

fX(x) =1

(√

2π) σe−

12(x−µσ )

2

, x ∈ R

There are two ways to solve this problem: using algebra, and using calculus.

Method 1 (using algebra). Note that, for all x ∈ R(x− µσ

)2

≥ 0 =

(µ− µσ

)2

=⇒ −1

2

(x− µσ

)2

≤ −1

2

(µ− µσ

)2

=⇒ e−12(x−µσ )

2

≤ e−12(µ−µσ )

2

(ex is increasing in x)

=⇒ fX(x) =1

(√

2π) σe−

12(x−µσ )

2

≤ 1

(√

2π) σe−

12(µ−µσ )

2

= fX(µ)

Thus fX(x) ≤ fX(µ) for all x ∈ R, which means fX(x) is maximum when x = µ. Hence µ is themode of X.

Method 2 (using calculus). We need to maximize fX(x) with respect to x. Note that

f ′X(x) =d

dxfX(x) =

1

(√

2π) σe−

12(x−µσ )

2(− 1

2σ22(x− µ)(−1)

)=

1

(√

2π) σe−

12(x−µσ )

2(x− µσ2

).

Therefore,

f ′X(x) = 0 =⇒ 1

(√

2π) σe−

12(x−µσ )

2︸ ︷︷ ︸>0 for all x∈R

(x− µσ2

)= 0 =⇒ x = µ.

Again,

f ′′X(x) =d

dxf ′X(x) =

1

(√

2π) σe−

12(x−µσ )

2

[(x− µσ2

)2

− 1

σ2

]which means

f ′′X(x)∣∣x=µ

= − 1

(√

2π) σ3< 0.

This proves that fX(x) is maximum when x = µ. Therefore, the mode of X is µ.

The density at the mode is

fX(µ) =1

(√

2π) σ

6. (WMS, Problem 4.73.) The width of bolts of fabric is normally distributed with mean 950 mm(millimeters) and standard deviation 10 mm. For the following two problems, leave the finalanswers in terms of the standard normal CDF Φ.

3

Page 4: STA 4321/5325 Solution to Homework 6 March 17, 2017 · PDF fileSTA 4321/5325 Solution to Homework 6 March 17, 2017 1. Let X˘Gamma( ; ) with density f(x) = 1 ( ) x 1e x= ; x 0: (a)

(a) What is the probability that a randomly chosen bolt has a width between 947 and 958 mm?

Solution. Let X denote the width of a randomly selected bolt. Then, by assumption,X ∼ N(µ = 950, σ2 = 102). Therefore, required probability

P (947 ≤ X ≤ 958) = P

(947− 950

10≤ X − 950

10≤ 958− 950

10

)= P (−0.3 ≤ Z ≤ 0.8) where Z ∼ N(0, 1)

= Φ(0.8)− Φ(−0.3)

(b) What is the appropriate value for C such that a randomly chosen bolt has a width less thanC with probability 0.8531?

Solution. We need C such that P (X ≤ C) = 0.8531. Now,

P (X ≤ C) = P

(X − 950

10≤ C − 950

10

)= Φ

(C − 950

10

)since Z = X−950

10 ∼ N(0, 1). Therefore,

Φ

(C − 950

10

)= 0.8531 =⇒ C − 950

10= Φ−1(0.8531) =⇒ C = 950 + 10 Φ−1(0.8531).

7. Let X ∼ N(µ, σ2). Using the values Φ(1) = 0.841,Φ(2) = 0.977 and Φ(3) = 0.998, calculate theprobabilities P (|X − µ| ≤ σ), P (|X − µ| ≤ 2σ) and P (|X − µ| ≤ 3σ). [Note: This is almost likethe empirical law, except for the fact that here the population quantities µ and σ2 (which aretypically unknown in a practical problem) instead of their sample analogues are used.]

Solution. Note that

P (|X − µ| ≤ σ) = P

(∣∣∣∣X − µσ

∣∣∣∣ ≤ 1

)= P (|Z| ≤ 1) where Z ∼ N(0, 1)

= P (−1 ≤ Z ≤ 1)

= Φ(1)− Φ(−1)

= Φ(1)− (1− Φ(1)) = 2Φ(1)− 1 = 0.682

Similarly, P (|X − µ| ≤ 2σ) = 2Φ(2)− 1 = 0.954 and P (|X − µ| ≤ 3σ) = 2Φ(3)− 1 = 0.996.

8. (WMS, Problem 4.80) Assume that Y is normally distributed with mean µ and standard de-viation σ. After observing a value of Y , a mathematician constructs a rectangle with lengthL = |Y | and width W = 3|Y |. Let A denote the area of the resulting rectangle. What is E(A)?

Solution. We have A = L×W (area = length × width). Therefore,

E(A) = E(|Y | × 3|Y |) = E(3Y 2) = 3E(Y 2) = 3[V (Y ) + E2(Y )] = 3(σ2 + µ2).

4