# How to find the marginal prior distribution?

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$$?

• $\int \int f(\beta, \zeta, \eta) d\eta d\zeta$?
– Ben
Jun 29, 2022 at 21:56
• @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$?
– gbd
Jun 29, 2022 at 22:13
• Yes, you have to integrate over the joint distribution
– Ben
Jun 29, 2022 at 22:28
• @Ben, but the priors here are not independent of each other, so why do we just multiply the priors?
– gbd
Jun 29, 2022 at 22:35
• 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. Jun 30, 2022 at 7:51

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).

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