Skip to main content
5 of 5
deleted 47 characters in body
Zen
  • 25.1k
  • 4
  • 86
  • 125

The given conditionals allow you to find the joint density of the three random variables using the product rule $$ p(y,\theta,\alpha)=p(y\mid\theta,\alpha) \, p(\theta\mid\alpha) \, p(\alpha) \, . $$

(Of course this is a sloppy notation, since the $p$'s are not the same function.)

You know the three densities on the rhs of the former equation, and your answers should be given in terms of those three densities. Now you can get any conditional density that you need using the definition and integrating to get the marginals.

For example, we have $$ p(\theta\mid y,\alpha) = \frac{p(y,\theta,\alpha)}{p(y,\alpha)} \quad , $$ where the marginal in the denominator is $$ p(y,\alpha) = \int p(y,\theta,\alpha) \,d\theta = p(\alpha) \int p(y\mid\theta,\alpha) p(\theta\mid\alpha)\, d\theta \, . $$ Therefore, we have $$ p(\theta\mid y,\alpha)=\frac{p(y\mid\theta,\alpha) \, p(\theta\mid\alpha)}{\int p(y\mid\theta,\alpha) p(\theta\mid\alpha)\, d\theta} \quad\qquad . $$ And so on.

This is a general boring way to do it, but of course, in many cases, you have shortcuts using Bayes's rule directly, etc.

As an example, the lazy way to compute $p(\alpha\mid y,\theta)$ is to notice that by Bayes's rule it is proportional to $p(y,\theta\mid \alpha)\,p(\alpha)$, which is equal, by the product rule, to $p(y\mid\theta,\alpha)\,p(\theta\mid\alpha)\,p(\alpha)$. Hence, we normalize (integrate in $\alpha$) and find $$ p(\alpha\mid y,\theta) = \frac{p(y\mid\theta,\alpha)\,p(\theta\mid\alpha)\,p(\alpha)}{\int p(y\mid\theta,\alpha)\,p(\theta\mid\alpha)\,p(\alpha)\,d\alpha} \quad\qquad . $$

Zen
  • 25.1k
  • 4
  • 86
  • 125