Exercise Bayesian
Exercise Bayesian
iid
Exercise. Let X1 , . . . , Xn |σ ∼ f ( · |σ), where
r
1 σ n σ o
f (x|σ) = exp − (log(x))2 , x>0
x 2π 2
and σ is a positive quantity, whose prior distribution over R+ is a gamma with shape–rate
parameters (1, 2), i.e. p(σ) = 2e−2σ for σ > 0.
(b) Determine the Bayes estimator σ̂p of σ under a squared loss function.
iid
(c) Assuming σ fixed, i.e., X1 , . . . , Xn ∼ f ( · |σ), determine the MLE σ̂ of σ and show
that σ̂p /σ̂ → 1 in probability as n → +∞.
1
Solution
(a) Recall that the likelihood function of the data is
n
( )
1 n/2 σX
f (x1 , . . . , xn |σ) = Qn (σ/(2π)) exp − log(xi )2 .
i=1 xi 2
i=1
therefore
n
!
1X 2
σ̃|X1 = x1 , . . . , Xn = xn ∼ Gamma n/2 + 1, log(xi ) + 2 .
2
i=1
(b) The Bayes estimator of σ under a squared loss function is the posterior mean:
Z ∞
n+2
σ̂p = σp(σ|x1 , . . . , xn )dσ = Pn
0 4 + i=1 log(xi )2
where we used the fact that the mean of a gamma with parameters (a, b) equals a/b.
(c) Now we have to maximize the likelihood function:
n
( )
1 n/2 σX
L(σ) = f (x1 , . . . , xn |σ) = Qn (σ/(2π)) exp − log(xi )2 .
i=1 xi 2
i=1