Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the full problem:

Let $X_1,...,X_n$ be a random sample from a $N(\mu,\sigma^2)$ distribution. Let $\tau = \sigma^{-2}$, so we can write the distribution as $N(\mu,\tau^{-1})$.

Suppose the prior for $(\mu,\tau)$ has density $f(\mu,\tau) \propto 1$, $-\infty < \mu < \infty$, $0 < \tau < \infty$. Note that this is an improper prior density.

Show that the posterior density of $(\mu,\tau)$ is equal to:

$$f(\mu, \tau|x_1,...,x_n) = f(\mu|\tau,x_1,...,x_n) f(\tau|x_1,...,x_n)\;.$$


$$f(\mu|\tau,x_1,...,x_n) \sim N(\bar{x},(\tau \ n)^{-1})\;$$


$$f(\tau|x_1,...,x_n) \sim \text{Gamma}(\frac{n-1}{2},(\frac{\sum_{i=1}^n(x_i-\bar{x})^2}{2})^{-1})$$

I have tried to break down the problem using the standard Bayesian method, but I am having trouble figuring out how we can "split" the density up. Thanks in advance.

share|cite|improve this question

Here are some pointers:

  1. Use $f(y,z|-) = f(y|z,-) f(z,|-)$

  2. To find out the full conditional posterior distributions $f(\mu|-)$ and $f(\tau|-)$ you should do the following:

    For $f(\mu|-)$: Write out the full posterior and then work with the terms that involve $\mu$ and re-write those terms such that the following expression emerges:

    $$f(\mu|-) \propto \text{exp}( -\frac{(\mu-\bar{x})^2}{2 (\tau \ n)^{-1}})$$

    You will need to use some algebra to re-work the terms from the full posterior to reach the above expression. Once you reach here you immediately recognize that the normalizing constant has to be such that the resulting full conditional must be a normal density with the required mean and variance as given in the problem.

    Repeat the above process for $f(\tau|-)$ to get to the gamma density.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.