Exercise 4.13 - Gaussian posterior credible interval

Answers

Assume the prior distribution for an 1d normal distribution:

p ( μ ) = 𝒩 ( μ | μ 0 , σ 0 2 = 9 ) .

And the likelihood is:

p ( x ) = 𝒩 ( x | μ , σ 2 = 4 ) .

Having observed n variables, we want that the probability measure of μ ’s posterior distribution is no less than 0.95 within an interval no longer than 1. The posterior for μ is:

p ( μ | D ) p ( μ ) p ( D | μ ) = 𝒩 ( μ | μ 0 , σ 0 2 ) i = 1 n 𝒩 ( x n | μ , σ 2 ) exp { 1 2 σ 0 2 ( μ μ 0 ) 2 } i = 1 n exp { 1 2 σ 2 ( x i μ ) 2 } = exp { ( 1 2 σ 0 2 n 2 σ 2 ) μ 2 + . . . } ,

where we have dropped the terms inrevelent with μ . The posterior variance of μ is determined by the coefficient of μ 2 in the exponential of the posterior distribution:

σ post 2 = σ 0 2 σ 2 σ 2 + n σ 0 2 .

Since 0.95 of the probability mass for a normal distribution lies within 1.96 σ and 1.96 σ , we have:

n 611 .

User profile picture
2021-03-24 13:42
Comments