If \((x,y)\) has a Normal-Gamma distribution with parameters \(\mu\), \(\kappa\),
\(\alpha\), and \(\beta\), then the marginal distribution of \(y\) has a Gamma
distribution with parameters \(\alpha\) and \(\beta\), and conditionally on \(y\),
\(x\) has a normal distribution with expectation \(\mu\) and logged standard deviation
\(\kappa - log(y)/2\). The probability density is proportional to
$$
f(x,y)=y^{\alpha-0.5}\exp(-y(\beta + e^{-2\kappa}(x-\mu)^2/2))
$$