Analytic approach

The interest is in inference about ${\mbox{\boldmath$\theta$}} = (\mu)$ given $\sigma = 0.01$.

With prior $\mu \sim N(3.5, 1)$

p(\mu) = \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}(\mu-3.5)^2}
\end{displaymath} (24)

$\bar x$, the sample mean, is a sufficient statistic for $\mu $, as the likelihood, $l(\mu \vert {\mbox{\boldmath$x$}})$, depends only on ${\mbox{\boldmath$x$}}$ and $\sigma$ (fixed), through the sampling distribution of $\bar x$ which is $N(\mu, \frac{\sigma^2}{n})$

$\displaystyle l(\mu \vert {\mbox{\boldmath$x$}})$ $\textstyle \propto$ $\displaystyle p(\bar x \vert \mu , \sigma^2)$ (25)
  $\textstyle \propto$ $\displaystyle \exp\left(\frac{-n}{2\sigma^2}(\mu-\bar x)^2\right)$ (26)

so the posterior for $\mu $ is

$\displaystyle p(\mu \vert {\mbox{\boldmath$x$}})$ $\textstyle \propto$ $\displaystyle p(\mu) l(\mu \vert {\mbox{\boldmath$x$}})$ (27)
  $\textstyle \propto$ $\displaystyle p(\mu ) p(\bar x \vert \mu, \sigma^2).$ (28)

So, by inspection

p(\mu \vert {\mbox{\boldmath$x$}}) = \left(\frac{n}{2\pi\si...
...{-n}{2\sigma^2}(\mu-\bar x)^2\right)      -\infty<\mu<\infty
\end{displaymath} (29)

${\mbox{\boldmath$x$}}$ is a random sample of size $n$ from $N(\mu, \sigma^2)$ where $\sigma$ is known and the prior for $\mu $ is $N(\mu_0, \sigma_0^2)$. The posterior is $\mu \sim N(\mu_n, \sigma_n^2)$ where

\mu_n = \frac{n\bar x/\sigma^2+\mu_0/\sigma_0^2}{n/\sigma^2+1/\sigma_0^2}
\end{displaymath} (30)


\end{displaymath} (31)

The prior for $\mu $ is $N(3.5, 1)$$\sigma = 0.01$ and $\bar x = 3.508$ so posterior belief about $\mu $ is as if $\mu $ had a $N(3.508, 0.00316^2)$ distribution.

danny 2009-07-23