I am using hierarchical distributions, of the following form:
$\theta\sim N(\mu,\sigma)$
$\mu\sim N(a,b)$
I can calculate the mean, and variance using Mathematica, and find:
$\mathrm{E}(\theta)=a$
$var(\theta)=b^2 + \sigma^2$
However, I would like to know how I could go about doing this with pen and paper. Is there a simpler way than working out the pdf for $\theta$?
Another example, that is similar in nature, that Mathematica is struggling with is:
$\theta\sim N(\mu,\sigma)$
$\mu\sim t-student(\nu,a,b)$
Similarly, does anyone have a methodology for dealing with these type 'distribution of distribution' settings? Additionally could someone tell me the name of this type of probability theory?
Best,
Ben