# Normal-gamma distribution

Parameters Probability density function Cumulative distribution function $\mu \,$ location (real)$\lambda >0\,$ (real)$\alpha \geq 1\,$ (real)$\beta \geq 0\,$ (real) $x\in (-\infty ,\infty )\,\!,\;\tau \in (0,\infty )$ $\mu \,\!$ $\mu \,$ $\left({\frac {\lambda +1}{\lambda }}\right){\frac {\beta }{\alpha -1}}\,\!$ In probability theory and statistics, the normal-gamma distribution is a four-parameter family of continuous probability distributions. It is the conjugate prior of a normal distribution with unknown mean and variance.

## Definition

Suppose

$x|\tau ,\mu ,\lambda \sim N(\mu ,\lambda /\tau )\,\!$ has a normal distribution with mean $\mu$ and variance $\lambda /\tau$ , where

$\tau |\alpha ,\beta \sim \mathrm {Gamma} (\alpha ,\beta )\!$ has a gamma distribution. Then $(x,\tau )$ has a normal-gamma distribution, denoted as

$(x,\tau )\sim \mathrm {NormalGamma} (\mu ,\lambda ,\alpha ,\beta )\!.$ ## Characterization

### Probability density function

$f(x,\tau |\mu ,\lambda ,\alpha ,\beta )={\frac {\beta ^{\alpha }}{\Gamma (\alpha ){\sqrt {2\pi \lambda }}}}\,\tau ^{\alpha -{\frac {1}{2}}}\,e^{-\beta \tau }\,e^{-{\frac {\tau (x-\mu )^{2}}{2\lambda }}}$ ## Properties

### Scaling

For any t > 0, tX is distributed ${\rm {NormalGamma}}(t\mu ,\lambda ,\alpha ,t^{2}\beta )$ ## Generating normal-gamma random variates 