X is a normal random variable with unknown mean & known variance σ2=9. The prior distribution for μ is normal with μ0=4 and σ02=1. A random sample of n=25 is taken & the sample mean is . a) Find the Bayes estimate for μ. b) Compare the Bayes estimate to the maximum likelihood estimate
@TuringTest
I haven't had too much practice with Bayes estimation, but I'll give it my best shot:
Let \(\pi(\mu)\) be the prior distribution, and \(L(\mu)\) be the conditional pdf of \(X|\mu\), and the posterior \(\pi(\mu|x)\) \[L(\mu)=(2\pi)^{-n/2}(9)^{-n/2}\exp\left\{-\frac{1}{2\cdot 9}\sum_{i=1}^{n}(x_i-\mu)^2 \right\}\\ \pi(\mu)=\frac{1}{\sqrt{2\pi}\cdot1}\exp\left\{ -\frac{1}{2\cdot 1}(\mu-4)^2\right\}\\ \\ \, \\\pi(\mu|x)\propto L(\mu)\pi(\mu)\\ \pi(\mu|x)=(2\pi)^{-n/2}\frac{1}{\sqrt{2\pi}}(9)^{-n/2}\exp\left\{{-\frac{1}{18}\sum_{i=1}^n(x_i-\mu)^2}-\frac{1}{2}(\mu-4)^2\right\}\\ \\ \, \\ \propto\exp\left\{{-\frac{1}{18}\sum_{i=1}^n(x_i-\mu)^2}-\frac{1}{2}(\mu-4)^2\right\}\\ =\exp\left\{\frac{-\sum_{i=1}^nx_i^2+2\mu\sum_{i=1}^nx_i-n\mu^2}{18}+\frac{-\mu^2+8\mu-16}{2}\right\}\\ \\ \propto \exp\left\{\frac{2\mu n\bar{x}-n\mu^2}{18}+\frac{-\mu^2+8\mu}{2}\right\}\\ =\exp\left\{\frac{-n\mu^2+2\mu n\bar{x}-9\mu^2+72\mu}{18}\right\}\\ =\exp\left\{ \frac{\mu^2(-n-9)+\mu(2n\bar{x}+72)}{18}\right\}\\ = \exp\left\{ -\frac{(n+9)}{2\cdot 9}\mu^2+\frac{\mu(2n\bar{x}+72)}{18} \right\}\\ =\exp\left\{ -\frac{(n+9)}{2\cdot 9}\left(\mu^2-\frac{2\mu(n\bar{x}+36)}{(n+9)} \right)\right\} \\ \propto\exp\left\{ -\frac{1}{2\left(\frac{9}{n+9} \right)}\left( \mu-\frac{n\bar{x}+36}{n+9}\right)^2\right\},\text{kernel of a normal distribribution}\\ \, \\ \text{Hence, }\mu|X\sim\text{N}\left( \frac{n\bar{x}+36}{n+9},\frac{9}{n+9}\right)\] So Bayes estimate is just the mean of the posterior, so the estimate is simply \[\frac{n\bar{x}+36}{n+9}\] ans just substitute the values n=25 and the value given for \(\bar{x}\).
For b): \[L(\mu)=(2\pi)^{-n/2}(9)^{-n/2}\exp\left\{-\frac{1}{18}\sum_{i=1}^{n}(x_i-\mu)^2 \right\}\\ l(\mu)=-\frac{n}{2}\log(2 \pi)-\frac{n}{2}\log9-\frac{1}{18}\sum_{i=1}^n(x_i-\mu)^2\\ S(\mu)=\frac{\partial}{\partial \mu}l(\mu)=-(-1)\frac{2}{18}\sum_{i=1}^n(x_i-\mu)\] Solve \(S(\mu)=0\): \[\frac{2}{18}\sum_{i=1}^n(x_i-\hat{\mu})=\frac{2}{18}\left(n\bar{x}-n\hat{\mu}\right)=0\\\, \\ \implies \hat{\mu}=\bar{x}\] Verify that this is a maximum by showing: \[I(\hat{\mu})=-\left.\frac{\partial^2}{\partial \mu^2}l(\mu)\right|_{\mu=\hat{\mu}}>0\]
I hope someone can confirm this @Jami1102
Maybe you know something about this @SithsAndGiggles ?
I'm afraid not. I haven't covered Bayes estimates, and only just scratched the surface of max likelihood estimates.
Join our real-time social learning platform and learn together with your friends!