Let us say we have a stochastic variable $X$ that is distributed according to some PDF $F$ that has parameters: $X\sim F(\alpha,\beta,...)$. How do one go about finding the PDF for $X$ if e.g. $\alpha \sim G(a,b,...)$ is also a stochastic variable?
For example, what is the pdf of $X\sim\mathcal{N}(\mu,\sigma^2)$ if $\sigma^2 \sim \chi^2(k)$?
(In the notation here $\mathcal{N}$ is the normal distribution and its PDF is then $N(x,\mu,\sigma^2)$, and $\chi^2$ is the chi-squared distribution and $F(x,k)$ is its PDF)
My first idea is to use conditional probability
$$ h(x|y) = \frac{f(x,y)}{f_y(y)} $$
where $f_y(y) = \int f(x,y) \mathrm{d}x$. First, using the example, we know that $h(x|\sigma^2) = N(x,\mu,\sigma^2)$ because when we fix $\sigma^2$ we will have just a normal PDF. Re-arranging the conditional probability
$$ h(x|\sigma^2) = \frac{f(x,\sigma^2)}{f_\sigma^2(\sigma^2)} \Leftrightarrow f_\sigma^2(\sigma^2)h(x|\sigma^2) = f(x,\sigma^2) $$
Because surly $X$ must be distributed according to the marginal of $f_x(x) = \int f(x,\sigma^2) \mathrm{d}\sigma^2$?
I am unsure of both this statement and if the following statement is correct: $f_\sigma^2(\sigma^2) = F(\sigma^2,k)$.
If these two statements are true, then the PDF of $X$ is
$$f_x(x) = \int F(\sigma^2,k) N(x,\mu,\sigma^2) \mathrm{d}\sigma^2$$