Deriving the joint posterior pdf as a decomposition in terms of...

161 Views Asked by At

Really struggling with how to approach this question. The lecturer, as per usual, has provided us with the bare minimum in terms of hints on how to approach this. I know how to do it when we want in terms of the conditional pdf for $\mu$ given $\sigma$ and the data and the marginal pdf for $\sigma$ given the data, by expressing and expanding the exponent in the normal pdf via the inclusion of $\bar{y}$, but I have no idea how to manipulate this to get it the way she wants. Anyway, any help or advice you could offer would be greatly appreciated.

$y_i$ are distributed i.i.d normal($\mu, \sigma^2$)

Assuming a non-informative prior

p($\mu,\sigma)=1/\sigma$,

and given

p($\mu,\sigma$|y)$\propto$L($\mu,\sigma$|y) p($\mu,\sigma$),

re-specify the joint pdf, p($\mu,\sigma$|y) as the following decomposition:

p($\mu,\sigma$|y)= p($\sigma|\mu$, y) p($\mu$|y),

providing the complete forms of p($\sigma|\mu$, y) and p($\mu$|y) in the answer.

Thanks guys

1

There are 1 best solutions below

2
On

We have

$$p(\mu,\sigma)=\frac1\sigma\;,$$

$$L(\mu,\sigma\mid\mathbf y)=\prod_i\frac{\mathrm e^{-\frac{(y_i-\mu)^2}{2\sigma^2}}}{\sigma\sqrt{2\pi}}=\frac{\mathrm e^{-\frac{\Sigma_i(y_i-\mu)^2}{2\sigma^2}}}{\sigma^n(2\pi)^{\frac n2}}$$

and thus

$$p(\mu,\sigma\mid\mathbf y)=\frac1\sigma\prod_i\frac{\mathrm e^{-\frac{(y_i-\mu)^2}{2\sigma^2}}}{\sigma\sqrt{2\pi}}=\frac{\mathrm e^{-\frac{\Sigma_i(y_i-\mu)^2}{2\sigma^2}}}{\sigma^{n+1}(2\pi)^{\frac n2}}\;. $$

The marginal distribution $p(\mu\mid\mathbf y)$ is obtained by integrating over $\sigma$. With

$$ \int_0^\infty\frac{\mathrm e^{-a/\sigma^2}}{\sigma^{n+1}}\mathrm d\sigma=\frac12\int_0^\infty\mathrm e^{-ax}x^{\frac n2-1}\mathrm dx=\frac12a^{-\frac n2}\Gamma\left(\frac n2\right)\;, $$

the result is

$$ p(\mu\mid\mathbf y)=\frac{\Gamma\left(\frac n2\right)}{2\left(\pi\Sigma_i(y_i-\mu)^2\right)^{\frac n2}}\;. $$

Then $p(\sigma\mid\mu,\mathbf y)$ follows from

$$ p(\mu,\sigma\mid\mathbf y)=p(\sigma\mid\mu,\mathbf y)p(\mu\mid\mathbf y)\;. $$