Suppose that $\beta$ has the following prior

$$ \beta|\zeta \sim f(\beta,\zeta) $$

Then I know that the marginal prior distribution of $\beta$ is given by

$$ \int f(\beta,\zeta) d\zeta $$

However, suppose that we have the following hierarchical prior model

$$ \beta|\zeta \sim f(\beta,\zeta) $$ $$ \zeta|\eta \sim g(\zeta,\eta) $$ $$ \eta \sim h(\eta) $$

Then what is the marginal prior distribution of $\beta$?

  • $\begingroup$ $\int \int f(\beta, \zeta, \eta) d\eta d\zeta$? $\endgroup$
    – Ben
    Jun 29, 2022 at 21:56
  • $\begingroup$ @Ben, but what is $f(\beta,\zeta,\eta)$ here? do you mean $ \int f(\beta,\zeta)g(\zeta,\eta)h(\eta) d\eta d\zeta $? $\endgroup$
    – gbd
    Jun 29, 2022 at 22:13
  • 1
    $\begingroup$ Yes, you have to integrate over the joint distribution $\endgroup$
    – Ben
    Jun 29, 2022 at 22:28
  • $\begingroup$ @Ben, but the priors here are not independent of each other, so why do we just multiply the priors? $\endgroup$
    – gbd
    Jun 29, 2022 at 22:35
  • $\begingroup$ If you write$$\int f(\beta,\zeta) \text d\zeta$$as the marginal of $\beta$ it means that implicitly you assume a constant prior on $\zeta$. Otherwise the first sentence of the question is wrong. $\endgroup$
    – Xi'an
    Jun 30, 2022 at 7:51

1 Answer 1


If we further assume that $\beta \ \bot \ \eta | \zeta$ you have the conditional density $p(\beta|\zeta,\eta) = p(\beta|\zeta) = f(\beta,\zeta)$, which then lets you expand the joint density as:

$$\begin{align} p(\beta,\zeta,\eta) &= p(\beta|\zeta,\eta) \ p(\zeta|\eta) \ p(\eta) \\[6pt] &= f(\beta,\zeta) \ g(\zeta,\eta) \ h(\eta). \\[6pt] \end{align}$$

You can then write the marginal density of $\beta$ as:

$$p(\beta) = \int \int f(\beta,\zeta) \ g(\zeta,\eta) \ h(\eta) \ d\zeta \ d\eta.$$

Note that when practitioners write out hierarchical models like this, the conditional independence conditions for this kind of expansion are usually taken to be implicit, so as to give full specification of a joint density. So here we would take the condition $\beta \ \bot \ \eta | \zeta$ to be implicit in the specification of the model, unless there were some compelling reason to think it is not intended (in which case the joint density is not fully specified).

  • $\begingroup$ What does the condition $\beta \ \bot \ \eta | \zeta$ mean? $\endgroup$
    – gbd
    Jun 29, 2022 at 22:52
  • $\begingroup$ It means that $\beta$ is conditionally independent of $\eta$ when you condition on $\zeta$. $\endgroup$
    – Ben
    Jun 30, 2022 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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