What it the posterior distribution $\mu| \sigma^2,x $

301 Views Asked by At

I have found that

$f(\mu| \sigma^2,\boldsymbol{x}) \propto e^{\sum_{i=1}^{10} \frac{(\mu-x_i)^2}{2\cdot\sigma^2 \cdot z_i}}$

The density is proportional to the product of 10 independent ($N(x_i,\sigma^2z_i)$) gaussian random variables . but what is the distribution of $\mu|\sigma^2,\boldsymbol{x}$? The point is that I want to generate a random draw from $\mu|\sigma^2,\boldsymbol{x}$. But I don't know from which distribution?

Is it possible to deduce from the expression what distribution $\mu|\sigma^2,\boldsymbol{x}$ has

1

There are 1 best solutions below

0
On BEST ANSWER

With some rearranging you can show that this is itself Normally distributed.

We have

\begin{align*} f\left(\mu \, | \sigma^2, \underline x\right) & \propto \exp \left( - \frac1{2\sigma^2} \sum_{i=1}^n \frac{(x_i - \mu)^2}{z_i} \right) \\ & \propto \exp \left( - \frac1{2\sigma^2} \left\{\mu^2 \sum_{i=1}^n \frac{1}{z_i} - 2\mu \sum_{i=1}^n \frac{x_i}{z_i} \right\} \right) \end{align*} where we `absorbed' the term in $x_i$ only into the proportionate to sign. Writing $A = \sum_{i=1}^n 1/z_i, \, B = 2\sum_{i=1}^n x_i/z_i$, we note that we can complete the square

$$(\mu^2A - \mu B) = A\left(\mu^2 - \mu\frac{B}{A} \right) = A \left(\mu - \frac{B}{2A}\right)^2 + C,$$

where the specific formula for $C$ does not matter, as again this will be asorbed into the proportional to sign. So we have

\begin{align*} f(\mu\, |\, \sigma^2, \underline x) \propto \exp \left( -\frac{A}{2\sigma^2} \left( \mu - \frac{B}{2A}\right)^2 \right). \end{align*}

That is, $\left(\mu \, | \sigma^2, \underline x\right)$ has a Normal distribution with mean

$$\theta = \frac{B}{2A} = \frac{2\sum_{i=1}^n x_i/z_i }{2\sum_{i=1}^n 1/z_i} = \frac{\sum_{i=1}^n x_i/z_i }{\sum_{i=1}^n 1/z_i},$$

and variance

$$\tau^2 = \frac{\sigma^2}{A} = \frac{ \sigma^2 }{\sum_{i=1}^n 1/z_i}.$$