# Derive the conditional pdf of data on prior parameters

In Bayesian statistics I see this derivation often.

Given the likelihood function $f(X|\theta)$ and the prior $f( \theta |a, b)$, the author will derive $f(X|a,b)$. The steps in between are considered trivial but I cannot derive $f(X|a,b)$ myself.

Can anyone please provide some hints, perhaps how to "introduce" $\theta$ into $f(X|a,b)$?

If $\theta$ is discrete, then $$f(X|a,b) = \sum_{\theta\in\Theta} f(X|\theta)f(\theta|a,b)$$ and if $\theta$ is continuous (the usual case) then $$f(X|a,b) = \int_\Theta f(X|\theta) f(\theta|a,b) d\theta$$ where $\Theta$ is the support of $\theta$. The quantity $f(X|a,b)$ is usually called the prior predictive distribution.

• I see. And what you wrote is true because $f(X|\theta) = f(X|\theta, a, b)$, right? – Heisenberg Mar 31 '14 at 1:53
• Yes. That is correct. – jaradniemi Mar 31 '14 at 18:39