Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Stats

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

S&DS 242 Midterm Exam Solutions Spring 2023

1. (20 points) For each of the following statements, circle whether it is true or false. You need
not justify your answers.
(a) True or False : The sum of two independent gamma distributions has a gamma distri-
bution.
(b) True or False : If X1 ∼ Gamma(α1 , λ) and X2 ∼ Gamma(α2 , λ), then X1 + X2 ∼
Gamma(α1 + α2 , λ).
X X
(c) True or False: If X and Y are independent N (0, 1) random variables then Y and |Y |
have the same distribution.
(d) True or False: The finite population correction factor gets applied when sampling a
finite population without replacement.
iid
(e) True or False: If X1 , . . . , Xn ∼ N (µ, σ 2 ), then S 2 is an unbiased estimator of σ 2 , but
Var(σ̂ 2 ) < Var(S 2 ).
(f) True or False: Suppose θb is an estimator of θ with E(θb2 ) < ∞ and T is a sufficient
b ) ̸= θ,
statistic for θ. If θ̃ = E(θ|T b then MSE(θ̃) < MSE(θ). b
(g) True or False : The variance of an estimator of θ cannot be less than the CRLBθ .
(h) True or False: The variance of an unbiased estimator of θ cannot be less than the
CRLBθ .
(i) True or False : The probability that the null hypothesis is falsely rejected is equal to
the power of the test.
(j) True or False: In comparing two simple hypotheses, H0 and Ha , with significance level
α, no other test will have more power than the likelihood ratio test.

Solution:

(a) The distributions should also have the same rate parameter λ.

(b) The random variables should also be independent.

(c) One approach: Show X/Y and X/|Y | have the same the cdf by conditioning on the
sign of Y . The fourth equals sign is justified because X and −X have the same
distribution.

P (X/Y ≤ z) = P (X/Y ≤ z|Y > 0)P (Y > 0) + P (X/Y ≤ z|Y < 0)P (Y < 0)
= P (X ≤ zY |Y > 0) · 1/2 + P (X ≥ zY |Y < 0) · 1/2
= P (X ≤ zY |Y > 0) · 1/2 + P (−X ≤ −zY |Y < 0) · 1/2
= P (X ≤ zY |Y > 0) · 1/2 + P (X ≤ −zY |Y < 0) · 1/2
= P (X ≤ z|Y |) · 1/2 + P (X ≤ z|Y |) · 1/2
= P (X ≤ z|Y |)
= P (X/|Y | ≤ z).

This is the Cauchy distribution (which is also a t distribution with 1 degree of free-
dom).
S&DS 242 Midterm Exam Solutions

(d) Of course!

(e)
   2
2 n−1 2 n−1
Var(σ̂ ) = Var S = Var(S 2 ) < Var(S 2 )
n n

b ) ̸= θ,
(f) If θ̃ = E(θ|T b the inequality in the Rao-Blackwell Theorem is strict.

(g) This is true for unbiased estimators, see (h).

(h) This is the Cramér-Rao Inequality

(i) False, that is the significance level, α of the test.

(j) This is the Neynam-Pearson Lemma.

Page 2 of 8
S&DS 242 Midterm Exam Solutions

2. (16 points) Let X1 , . . . , Xn be iid random variables with pdf



1 + (2x − 1)θ, if 0 ≤ x ≤ 1,
f (x) =
0 otherwise,

where 0 < θ < 1.


(a) Find the method of moments estimator for θ.

Solution:
Z 1
µ1 = E(X) = x(1 + (2x − 1)θdx
0
Z 1
= (2θx2 + (1 − θ)x)dx
0
2θ 1 − θ θ+3
= + = .
3 2 6

Solving for θ, replacing µ1 with X, and “putting a hat on” gives

θb = 6X − 3.

(b) Find the mean squared error of the estimator in part (a).

Solution: We first compute the second moment of the distribution to get the variance.
Z 1
2
E(X ) = x2 (1 + (2x − 1)θdx
0
Z 1
= (2θx3 + (1 − θ)x2 )dx
0
θ 1−θ θ+2
= + = .
2 3 6
And so

θ+3 2
 
2 θ+2 2
Var(X) = E(X ) − (EX) = −
6 6
2
θ + 2 θ + 6θ + 9 3−θ 2
= − = .
6 36 36
The MSE is

MSE(θ̂) = Var(θ̂) + (Bias(θ̂))2 = Var(6X − 3) + (E(6X − 3 − θ))2


3 − θ2
= 36Var(X) + (θ + 3 − 3 + θ) = 36 ·
36n
3 − θ2
= .
n

Page 3 of 8
S&DS 242 Midterm Exam Solutions

3. (24 points) Let X1 , . . . , Xn be iid random variables with pdf

f (x) = (θ + 1)xθ · I[0,1] (x),

where θ > −1.


(a) Find the method of moments estimate of θ.

Solution: Z 1
θ+1
µ1 = E(X) = x(θ + 1)xθ dx = .
0 θ+2
Solving for θ,

µ1 (θ + 2) = θ + 1
µ1 θ − θ = 1 − 2µ1
1 − 2µ1
θ= .
µ1 − 1

Replacing µ1 with X, and “putting a hat on” gives

1 − 2X
θb = .
X −1

(b) Show that this distribution is in the exponential family. Use this to give a sufficient
statistic for θ.

Solution: Since

f (x) = (θ + 1)xθ = exp [log(θ + 1) + θ log x] ,

we see that this distribution is in the exponential family with c(θ) = θ, T (x) = log x,
d(θ) = log(θ + 1) and S(x) = 0, with A = [0, 1].
Therefore
Xn n
X
T (Xi ) = log Xi
i=1 i=1

is sufficient for θ.

Page 4 of 8
S&DS 242 Midterm Exam Solutions

(Question 3 continued) Here is a restatement of the question:


Let X1 , . . . , Xn be iid random variables with pdf

f (x) = (θ + 1)xθ · I[0,1] (x),

where θ > −1.


(c) Find the mle of θ.

Solution:
n
!
∂ ∂ X
log f (x1 , . . . , xn |θ) = n log(θ + 1) + θ log xi
∂θ ∂θ
i=1
n
(θ + 1) ni=1 log xi + n
P
n X
= + log xi = = 0.
θ+1 θ+1
i=1

Solving for θ gives the mle,


n
θb = − Pn − 1.
i=1 log Xi
n
Since the second derivative is − (θ+1)2 < 0 for all θ, this corresponds to a maximum.

(d) Find the asymptotic variance of the mle.

Solution: We compute the Fisher information, I(θ),


 2   2 
∂ ∂
−E log f (X|θ) = −E log(θ + 1) + θ log X
∂θ2 ∂θ2
 
1 1
= −E − 2
= .
(θ + 1) (θ + 1)2

1 (θ+1)2
And so the asymptotic variance is nI(θ) = n .

Page 5 of 8
S&DS 242 Midterm Exam Solutions

4. (24 points) Let X1 , . . . , Xn be iid random variables with pdf

1 −3 2 −x/β

f (x) = 2β x e , if x > 0,
0, if x ≤ 0.
1
Note that this a gamma distribution with α = 3 and λ = β. You may use the following facts
about this distribution:
(i) E(X) = 3β (ii) Var(X) = 3β 2 (iii) the mgf is MX (t) = (1 − βt)−3
(a) Find the mle of β.

Solution:
n n
!
∂ ∂ X 1X
log f (x1 , . . . , xn |θ) = −n log 2 − 3n log β + 2n log xi − xi
∂θ ∂θ β
i=1 i=1
n Pn
3n 1 i=1 xi − 3nβ
X
=− + 2 xi = = 0.
β β β2
i=1

Solving for β gives the mle,


X
βb = .
3
Pn
The second derivative is 3n
β2
− 2
β3 i=1 Xi . Evaluating at β = X
3 gives 27n
2 − 54n
2 < 0.
X X
So βb is indeed an argmax.

(b) Show that the mle is consistent for β.

Solution: Since
b = 1 E(X) = 1 · 3β = β,
E(β)
3 3
βb is unbiased. Also,
2 2
b = 1 Var(X) = 3β = β → 0 as n → ∞.
Var(β)
9 9n 3n

Therefore βb is consistent for β.

Page 6 of 8
S&DS 242 Midterm Exam Solutions

(Question 4 continued) Here is a restatement of the question:


Let X1 , . . . , Xn be iid random variables with pdf

1 −3 2 −x/β

f (x) = 2β x e , if x > 0,
0, if x ≤ 0.

Note that this a gamma distribution with α = 3 and λ = β1 . You may use the following
facts about this distribution:
(i) E(X) = 3β (ii) Var(X) = 3β 2 (iii) the mgf is MX (t) = (1 − βt)−3
(c) Show that W = β2 ni=1 Xi has a chi-squared distribution with 6n degrees of freedom.
P
Hint: Use moment generating functions.
Pn
Solution: For notation simplicity, Sn denote i=1 Xi . We have Sn ∼ Gamma(α =
3n, λ = 1/β). The mgf of W is
 
Wt
 2
S t
β n
 
Sn β2 t
 2t
MW (t) = E(e )=E e =E e = MSn
β
 3n  6n/2
1/β 1
= = = (1 − 2t)−6n/2 ,
1β − 2t/β 1 − 2t

which is the mgf of a χ26n distribution.

(d) Use your answer from (c) to derive a two-sided 90% confidence interval for β.
Note: Your answer should in terms of χ2n (α) numbers, where χ2n (α) is the value where the
right tail has probability α. For example, if W ∼ χ2n (where n is the degrees of freedom),
then P (W > χ2n (α)) = α.

Solution: We have that


n
!
2X
P χ26n (0.95) ≤ Xi ≤ χ26n (0.05) = 0.9.
β
i=1

Getting the β by itself gives a 90% confidence interval,

2 ni=1 Xi 2 ni=1 Xi
P P
≤ β ≤ .
χ26n (0.05) χ26n (0.95)

This can also be written in terms of the sample mean,

2nX 2nX
≤β≤ .
χ26n (0.05) χ26n (0.95)

Page 7 of 8
S&DS 242 Midterm Exam Solutions

5. (16 points) Under H0 , a random variable has pdf f (x) = 2x for 0 ≤ x ≤ 1. Under Ha , it has
pdf f (x) = 3x2 for 0 ≤ x ≤ 1.
(a) Find the best test (in terms of power) of H0 versus Ha that has significance level α = 0.19.
What is the power of this test?

Solution: By the Neyman-Pearson Lemma, the powerful test is the likelihood ratio
2x 2
test. The likelihood ratio is 3x 2 = 3x , which rejects H0 for large x. Let x0 denote the
boundary of the rejection region, so that we reject H0 if x ∈ [x0 , 1] and fail to reject
if x ∈ [0, x0 ).
To achieve a significance level of α = 0.19, we must have
Z 1 1
2x dx = x = 1 − x20 .
2

0.19 =
x0 x0

This is satisfied when x0 = 0.9.


The power of this test is
Z 0.9
0.9
2 3

1−β =1− 3x dx = 1 − x = 1 − 0.729 = 0.271.
0 0

(b) Assume the two hypotheses have equal prior probability. What is the rejection region?
What is the significance level? What is the power of the test?

2
Solution: In this case  reject when the likelihood ratio 3x ≤ 1. Solving for x gives
 2 we
the rejection region 3 , 1 .
The significance level is
Z 1 1
2
4 5
α= 2x dx = x = 1 − = .
2/3 2/3 9 9

The power of this test is


Z 2/3
2/3
2 3
8 19
1−β =1− 3x dx = 1 − x = 1 − = .
0 0 27 27

Page 8 of 8

You might also like