# Math Help - posterior

1. ## posterior

For this question,
for $Y_i|\mu,\sigma^2$ ~ $N(\mu,\sigma^2)$
use $p(\sigma^2) \propto \frac{1}{\sigma^2}$ and $p(\mu|\sigma^2) = \frac{1}{\sqrt{2\pi}\sqrt{c}\sigma} exp[-\frac{1}{2} \frac {\mu^2}{c \sigma^2}]$ i.e. $\mu|\sigma^2 ~ N (0,c\sigma^2)$
and show $p(\mu,\sigma^2|y) \propto (\sigma^2)^{-(\frac{n+1}{2})-1} exp [-\frac{1}{\sigma^2}(\frac{s+n(\mu - \overline{y})^2 + \frac{\mu^2}{c}}{2})]$

can you please check that Im on the right track:
$p(\mu, \sigma^2|y) \propto p(y|\mu, \sigma^2)p(\mu|\sigma^2)p(\sigma^2)$
$\propto \frac{1}{\sqrt{2\pi}\sqrt{c}\sigma} exp[-\frac{1}{2} \frac {\mu^2}{c \sigma^2}] \times \frac{1}{\sigma^2} \times \prod(\sigma^2)^{-1/2} exp [-1/2 \frac{(Y_i - \mu)^2}{\sigma^2}]$

any help would be very appreciated coz i have a STRONG feeling im somehow very off track even though im still at the start of the question.. thanks

2. Originally Posted by bubbling
For this question,
for $Y_i|\mu,\sigma^2$ ~ $N(\mu,\sigma^2)$
use $p(\sigma^2) \propto \frac{1}{\sigma^2}$ and $p(\mu|\sigma^2) = \frac{1}{\sqrt{2\pi}\sqrt{c}\sigma} exp[-\frac{1}{2} \frac {\mu^2}{c \sigma^2}]$ i.e. $\mu|\sigma^2 ~ N (0,c\sigma^2)$
and show $p(\mu,\sigma^2|y) \propto (\sigma^2)^{-(\frac{n+1}{2})-1} exp [-\frac{1}{\sigma^2}(\frac{s+n(\mu - \overline{y})^2 + \frac{\mu^2}{c}}{2})]$

can you please check that Im on the right track:
$p(\mu, \sigma^2|y) \propto p(y|\mu, \sigma^2)p(\mu|\sigma^2)p(\sigma^2)$
$\propto \frac{1}{\sqrt{2\pi}\sqrt{c}\sigma} exp[-\frac{1}{2} \frac {\mu^2}{c \sigma^2}] \times \frac{1}{\sigma^2} \times \prod(\sigma^2)^{-1/2} exp [-1/2 \frac{(Y_i - \mu)^2}{\sigma^2}]$

any help would be very appreciated coz i have a STRONG feeling im somehow very off track even though im still at the start of the question.. thanks
You have omitted that the $Y_i$ s are independent. You can also lost some more costant multiplers, but on the whole that looks OK (Oh.. in your last expression the $Y_i$ 's should be $y_i$ s)

CB

3. Thanks for the help, I've finished that question now . But can you please help me start this question because i have no idea how to start (it's similar to the first i think):

for $Y_i|\mu,\sigma^2$ ~ $N(\mu,\sigma^2)$

use $p(\sigma^2) \propto \frac{1}{\sigma^2}$ and $p(\mu|\sigma^2) = \frac{1}{\sqrt{2\pi}\sqrt{c}\sigma} exp[-\frac{1}{2} \frac {\mu^2}{c \sigma^2}]$ i.e. $\mu|\sigma^2 ~ N (0,c\sigma^2)$

show that

$

p(t|y) \propto (1 + \frac{t^2}{n})^{-(\frac{n+1}{2})}$

where

$

t = \frac{\sqrt{n + 1/c}}{\sqrt{\frac{s}{n} + \frac{\overline{y^2}(1/c)}{(n+1/c)}}} (\mu - \frac{n \overline{y}}{n + 1/c})

$