Mathematical Statistics ⋅ Spring 2023 ⋅
Midterm 2
Name:
Rules (READ THESE FIRST):
1. Tables of standard normal and χ2 probabilities are included on the last pages of the exam.
2. No other resources (human or otherwise) are allowed.
3. You may cite lemmas, theorems, or corollaries from the text and lectures without proof (unless
the question is asking you to prove the result).
4. You may not cite results from examples or exercises.
5. Clearly mark your final answers for full credit.
6. Work must be shown for full credit (unless otherwise indicated).
7. Do not discuss the exam with anyone (in this class or any other class) until solutions are
posted.
1
3
Total
2
1. Let X1 , . . . , Xn be IID random variables drawn from the density
⎧
⎪
⎪ 1 exp (− σx ) x ≥ 0
,
fσ (x) = ⎨ σ
⎪
otherwise
⎪
⎩0
where σ ∈ (0, ∞) is an unknown parameter.
(a) [5pts] Find the maximum likelihood estimator for σ. (You may assume that any critical
point you find is a global maximum, without checking second derivatives.)
Solution:
The log-likelihood is
n
Xi
ℓ(σ) = −n log σ − ∑
.
i=1 σ
Its first derivative is
ℓ′ (σ) = −
The MLE is the critical point
σ̂ =
2
n n Xi
+∑
.
σ i=1 σ 2
1 n
∑ Xi .
n i=1
(b) [5pts] Find the Fisher information.
Solution:
The second derivative of the log-likelihood corresponding to a single sample is
ℓ′′ (σ) =
1 2X
−
.
σ2 σ3
The Fisher Information is
I(θ) = −E [ℓ′′ (σ)] =
Since
E[X] =
we obtain
2E[X] 1
− 2.
σ3
σ
∞
∞
1
−x/σ
−u
xe
dx
=
σ
∫
∫ ue du = σ ,
σ 0
0
I(θ) = σ −2 .
3
(c) [5pts] Find an approximate 95% confidence interval for σ.
√
d
Solution: The MLE satisfies nI(σ̂)(σ̂ − σ) → N (0, 1). Therefore
σ̂
σ̂
Cn = (σ̂ − 1.96 √ , σ̂ + 1.96 √ )
n
n
is an approximate 95% confidence interval for σ.
4
2. [10pts] Suppose that θ is an Exponential(1) random variable. I then observe Y ∼ Exponential(θ).
The observation Y takes the value y. What is the posterior distribution of θ given Y = y?
Solution: The posterior satisfies
fθ∣y (θ ∣ y) ∝ fy∣θ (y ∣ θ)π(θ),
where fy∣θ (y ∣ θ) = θe−θy is the likelihood and π(θ) = e−θ is the prior.
The posterior is therefore proportional to θe−(y+1)θ , which is a Gamma distribution with
parameters α = 2 and λ = y + 1.
5
3. Suppose X1 , . . . , Xn are i.i.d. samples from Poisson(λ) for some λ. Consider testing H0 ∶ λ =
λ0 versus H1 ∶ λ ≠ λ0 .
(a) [5 pts] What is the likelihood ratio test statistic LR for this problem?
Solution:
The MLE is λ̂ = X̄n = n1 ∑nj=1 Xj . The likelihood ratio test statistic is therefore given by
LR =
L(λ0 )
L(λ̂)
∑n
=
e−nλ0 λ0 j=1
Xj
e−nλ̂ λ̂∑j=1 Xj
n
6
= en(X̄n −λ0 ) (
λ0 nX̄n
)
X̄n
(b) [5 pts] Use a Taylor expansion to argue that, when n is large, under the null −2 log LR
is close to
n(X̄n − λ0 )2
.
λ0
You may use the fact that for y ≈ z,
y log(y/z) ≈ (y − z) +
(y − z)2
.
2z
Solution:
−2 log LR = 2nX̄n log
X̄n
− 2n(X̄n − λ0 ) .
λ0
Using the suggested Taylor expansion, we have that the first term is approximately
2n(X̄n − λ0 ) +
so
−2 log LR ≈ 2n(X̄n − λ0 ) +
n(X̄n − λ0 )2
,
λ0
n(X̄n − λ0 )2
n(X̄n − λ0 )2
− 2n(X̄n − λ0 ) =
.
λ0
λ0
7
(c) [5 pts] Use the result of part (b) to find the rejection region of a test with asymptotic
significance level α = 0.05.
Solution:
n(X̄n −λ0 )2
Under H0 , the random variable
is approximately χ21 . Therefore
λ0
P[
So the rejection region is {
n(X̄n − λ0 )2
> 3.84] ≈ 0.05 .
λ0
n(X̄n −λ0 )2
> 3.84}.
λ0
8