Given the compound probability density $Y\sim\mathcal N(\mu,\sigma^2)$ with $\mu\sim F_\mu$ and $\sigma^2\sim F_{\sigma^2}$ how do we evaluate $\mathsf E(Y)$ and $\mathsf{Var}(Y)$ in terms of $\mathsf E(\mu)$, $\mathsf E(\sigma^2)$, $\mathsf{Var}(\mu)$, and $\mathsf{Var}(\sigma^2)$?
If we had only one random parameter this would be a direct application of the law of total expectation/variance. For example, suppose $\mu$ is fixed and only $\sigma^2$ is random. Then $$ \mathsf E(Y)=\mathsf E(\mathsf E(Y|\sigma^2))=\mathsf E(\mu)=\mu $$ and $$ \mathsf{Var}(Y)=\mathsf E(\mathsf{Var}(Y|\sigma^2))+\mathsf{Var}(\mathsf E(Y|\sigma^2))=\mathsf E(\sigma^2)+\mathsf{Var}(\mu)=\mathsf E(\sigma^2). $$ I am not clear on how to generalize these results to multiple random parameters ($\mu$ and $\sigma^2$ both random and possibly dependent). Can someone please explain?
I think another name for "compound distribution" is "hierarchical model." The hierarchical model is:
$$\begin{split}Y|\mu, \sigma^2 &\sim N(\mu, \sigma^2)\\ \mu &\sim F_\mu\\ \sigma^2 &\sim F_{\sigma^2}\end{split}$$
If we assume that $\mu$ and $\sigma^2$ are independent, we can use the basic rules to get the marginal distribution of Y:
$$f(y)=\int _{-\infty}^\infty f(y|\mu,\sigma^2)f(\mu)f(\sigma^2)d\mu d\sigma^2$$
or, if they are not independent, assume WLOG that we know $f(\mu|\sigma)$ and $f(\sigma)$, then
$$\begin{split}Y|\mu, \sigma^2 &\sim N(\mu, \sigma^2)\\ \mu|\sigma &\sim F_{\mu|\sigma}\\ \sigma^2 &\sim F_{\sigma^2}\end{split}$$
$$f(y)=\int _{-\infty}^\infty f(y|\mu,\sigma^2)f(\mu|\sigma^2)f(\sigma^2)d\mu d\sigma^2$$
And proceed to calculate the mean and variance as usual. Alternatively, we can use the rules of conditional probability to directly obtain:
$$\begin{split}E(Y)&= \int y f(y) dy\\ &= \int y \int \int f(y|\mu, \sigma^2) f(\mu|\sigma^2) f(\sigma^2) d\mu d\sigma^2 dy\\ &= \int \int \int y f(y|\mu, \sigma^2) dy f(\mu|\sigma^2) f(\sigma^2) d\mu d\sigma^2\\ &= \int \int E(Y|\mu, \sigma^2) f(\mu|\sigma^2) f(\sigma^2) d\mu d\sigma^2\\ &= \int E(E(Y|\mu, \sigma^2)|\sigma^2) f(\sigma^2) d\sigma^2\\ &=E(E(E(Y|\mu, \sigma^2)|\sigma^2))\\ &=E(E(\mu|\sigma^2))\end{split}$$
If $\mu$ and $\sigma^2$ are independent, this leads to $E(E(\mu|\sigma^2))=E(E(\mu))=E(\mu)$, the mean of $F_\mu$. In terms of the variance, the wikipedia page for Law of total variance has the formula:
$$\begin{split}Var(Y)&=E(Var(Y|\mu, \sigma^2)) + E(Var(E(Y|\mu, \sigma^2)|\mu)) + Var(E(Y|\mu))\\ &= E(\sigma^2) + E(Var(\mu|\mu))+Var(\mu)\\ &=E(\sigma^2)+Var(\mu)\end{split} $$