[Math] Posterior: normal likelihood, uniform prior

bayesianprobabilityprobability theorystatistics

Assuming that given a mean $\mu$, the data are normally distributed with variance $10$ and assuming a uniformly distributed prior density on the interval $(90, 110)$, we are asked to show that the posterior density on (90, 110) looks something like:
$$p(\mu|x) = \frac{1}{\sqrt{\pi}}\frac{1}{\Phi(\frac{110 – \bar{x}}{1/\sqrt{2}}) – \Phi(\frac{90 – \bar{x}}{1/\sqrt{2}})}\exp\left( – (\bar{x}- \mu)^2 \right)$$
I tried to calculate $p(x) = \int p(x|\mu)p(\mu)d\mu$, but so far my results look little promising. So far I have been trying to rexpress the exponent in $p(x)$ so I could integrate over a normal density of $\mu$, but this doesn't help much. Any input would be greatly appreciated. 🙂

Best Answer

The integral in the question is $$f_X(x)=\int f_{X|M}(x|\mu)f_M(\mu)d\mu=\frac{1}{20}\int_{90}^{110}\frac{1}{2\sqrt{\pi\cdot 10}}\exp\left(-\frac{(\mu-x)^2}{2\cdot 10}\right)d\mu$$

The integral in RHS is the probability that normal random variable $M\sim N(x, 10)$ takes value in $[90,110]$, and you can find the probability by 'standartizing' the normal, that is using $$Y=\frac{\mu-x}{\sqrt{10}} \sim N(0,1)$$

We are interested in $P(90<M<110)$ which is the same as $$P\left(\frac{90-x}{\sqrt{10}}<Y<\frac{110-x}{\sqrt{10}}\right)=\Phi\left(\frac{110-x}{\sqrt{10}}\right)-\Phi\left(\frac{90-x}{\sqrt{10}}\right)$$ and from here your final formula does not look correct to me.

Related Question