The Gamma distribution is defined on $\left[0, \infty\right[$. There are two usual parameterisation:
where $\Gamma$ is the Gamma function[wiki], $\psi$ is the digamma function[wiki] and $\psi_1$ is the trigamma function[wiki].
The distribution has a mode only if $\alpha \geqslant 1$:
Let $\mathbf{x} = (x_n)$ a set of observed realisations from a Gamma distribution.
$\hat{\beta} \mid \mathbf{x}, \alpha$ | $= \frac{\alpha}{\overline{x}}$ |
$\hat{\alpha} \mid \mathbf{x}$ | solution of: $\ln \hat{\alpha} - \psi(\hat{\alpha}) = \ln \overline{x} - \overline{\ln x}$ |
$\hat{\beta} \mid \mathbf{x}$ | $= \hat{\beta} \mid \mathbf{x}, \hat{\alpha} = \frac{\hat{\alpha}}{\overline{x}}$ |
There is no closed form solution for $\hat{\alpha}$, but an approximate solution can be found by numerical optimisation.
We list here the distributions that can be used as conjugate prior for the parameters of an univariate Normal distribution:
$\beta \mid \alpha$ | Gamma | $\mathcal{G}_\alpha$ |
Update equations can be found in the Conjugate prior article.
The KL-divergence can be written as
where $H$ is the cross-entropy. We have
Consequently
Specialisation | ||
Exponential | $\mathrm{Exp}(\lambda) = \mathcal{G}(1, \lambda)$ | |
Chi-squared | $\chi^2(\nu) = \mathcal{G}_\mathcal{N}(1, \nu) = \mathcal{G}\left(\frac{\nu}{2}, \frac{1}{2}\right)$ | |
Generalisation | ||
Generalised Gamma | $\mathcal{G}(\alpha, \beta) = \mathcal{G}^{(1)}(\alpha, \beta)$ | q = 1 |
Wishart | $\mathcal{G}_\mathcal{N}(\lambda, n) = \mathcal{W}_1(\lambda, n)$ | K = 1 |
Generalised Integer Gamma | ||
Generalised Inverse-Gaussian | ||
Power | ||
Inverse-Gamma | $x \sim \mathcal{G}(\alpha, \beta) \Rightarrow \frac{1}{x} \sim \mathrm{Inv-}\mathcal{G}\left(\alpha, \frac{1}{\beta}\right)$ | |
Generalised Gamma | $x \sim \mathcal{G}(\alpha, \beta) \Rightarrow x^q \sim \mathcal{G}^{\left(1/q\right)}\left(\frac{\alpha}{q}, \beta^q\right)$ | q > 0 |
When the Gamma distribution is used as a conjugate prior for the precision parameter of a univariate Normal distribution, it is easier to parameterise it in terms of its expected value, $\lambda_0$, and degrees of freedom, $n_0$:
The distribution has a mode only if $n_0 \geqslant 2$:
$\alpha$ | $\frac{n}{2}$ |
$\beta$ | $\frac{n}{2\lambda}$ |
$n$ | $2\alpha$ |
$\lambda$ | $\frac{\alpha}{\beta}$ |
When the Gamma distribution is used as a conjugate prior for the scale of the precision matrix of a multivariate Normal distribution, it is easier to parameterise it in terms of its expected value, $\lambda_0$, and degrees of freedom, $n_0$:
Note that the “Univariate Normal precision conjugate” is a spacial case of this distribution with $K = 1$.
The distribution has a mode only if $n_0 \geqslant \frac{2}{K}$:
$\alpha$ | $\frac{nK}{2}$ |
$\beta$ | $\frac{nK}{2\lambda}$ |
$n$ | $\frac{2\alpha}{K}$ |
$\lambda$ | $\frac{\alpha}{\beta}$ |
When the Gamma distribution is used as a conjugate prior for the rate parameter of another Gamma distribution, it is easier to parameterise it in terms of its expected value, $\beta_0$, and degrees of freedom, $n_0$:
The distribution has a mode only if $n_0 \geqslant \frac{1}{\alpha}$:
$\alpha$ | $n_0\hat{\alpha}$ |
$\beta$ | $\frac{n_0\hat{\alpha}}{\beta_0}$ |
$n_0$ | $\frac{\alpha}{\hat{\alpha}}$ |
$\beta_0$ | $\frac{\alpha}{\beta}$ |
Created by Yaël Balbastre on 9 April 2018. Last edited on 10 April 2018.