Inverse-gamma distribution explained

In probability theory and statistics, the inverse gamma distribution is a two-parameter family of continuous probability distributions on the positive real line, which is the distribution of the reciprocal of a variable distributed according to the gamma distribution.

Perhaps the chief use of the inverse gamma distribution is in Bayesian statistics, where the distribution arises as the marginal posterior distribution for the unknown variance of a normal distribution, if an uninformative prior is used, and as an analytically tractable conjugate prior, if an informative prior is required. It is common among some Bayesians to consider an alternative parametrization of the normal distribution in terms of the precision, defined as the reciprocal of the variance, which allows the gamma distribution to be used directly as a conjugate prior. Other Bayesians prefer to parametrize the inverse gamma distribution differently, as a scaled inverse chi-squared distribution.

Characterization

Probability density function

x>0

f(x;\alpha,\beta) =

\beta\alpha
\Gamma(\alpha)

(1/x)\alpha\exp\left(-\beta/x\right)

\alpha

and scale parameter

\beta

.[1] Here

\Gamma()

denotes the gamma function.

Unlike the Gamma distribution, which contains a somewhat similar exponential term,

\beta

is a scale parameter as the density function satisfies:

f(x;\alpha,\beta)=

f(x/\beta;\alpha,1)
\beta

Cumulative distribution function

The cumulative distribution function is the regularized gamma function

F(x;\alpha,\beta)=

\Gamma\left(\alpha,\beta\right)
x
\Gamma(\alpha)

=Q\left(\alpha,

\beta
x

\right)

where the numerator is the upper incomplete gamma function and the denominator is the gamma function. Many math packages allow direct computation of

Q

, the regularized gamma function.

Moments

Provided that

\alpha>n

, the

n

-th moment of the inverse gamma distribution is given by[2]

E[Xn]=\betan

\Gamma(\alpha-n)
\Gamma(\alpha)

=

\betan
(\alpha-1)(\alpha-n)

.

Characteristic function

The inverse gamma distribution has characteristic function \fracK_\left(\sqrt\right) where

K\alpha

is the modified Bessel function of the 2nd kind.

Properties

For

\alpha>0

and

\beta>0

,

E[ln(X)]=ln(\beta)-\psi(\alpha)

and

E[X-1]=

\alpha
\beta

,

The information entropy is

\begin{align} \operatorname{H}(X)&=\operatorname{E}[-ln(p(X))]\\ &=\operatorname{E}\left[-\alphaln(\beta)+ln(\Gamma(\alpha))+(\alpha+1)ln(X)+

\beta
X

\right]\\ &=-\alphaln(\beta)+ln(\Gamma(\alpha))+(\alpha+1)ln(\beta)-(\alpha+1)\psi(\alpha)+\alpha\\ &=\alpha+ln(\beta\Gamma(\alpha))-(\alpha+1)\psi(\alpha). \end{align}

where

\psi(\alpha)

is the digamma function.

The Kullback-Leibler divergence of Inverse-Gamma(αp, βp) from Inverse-Gamma(αq, βq) is the same as the KL-divergence of Gamma(αp, βp) from Gamma(αq, βq):

DKL(\alphap,\betap;\alphaq,\betaq)=E\left[log

\rho(X)
\pi(X)

\right]=E\left[log

\rho(1/Y)
\pi(1/Y)

\right]=E\left[log

\rhoG(Y)
\piG(Y)

\right],

where

\rho,\pi

are the pdfs of the Inverse-Gamma distributions and

\rhoG,\piG

are the pdfs of the Gamma distributions,

Y

is Gamma(αp, βp) distributed.

\begin{align} DKL(\alphap,\betap;\alphaq,\betaq)={}&(\alphap-\alphaq)\psi(\alphap)-log\Gamma(\alphap)+log\Gamma(\alphaq)+\alphaq(log\betap-log\betaq)+

\alpha
p\betaq-\betap
\betap

. \end{align}

Related distributions

X\simInv-Gamma(\alpha,\beta)

then

kX\simInv-Gamma(\alpha,k\beta)

, for

k>0

X\simInv-Gamma(\alpha,\tfrac{1}{2})

then

X\simInv-\chi2(2\alpha)

(inverse-chi-squared distribution)

X\simInv-Gamma(\tfrac{\alpha}{2},\tfrac{1}{2})

then

X\simScaledInv-\chi2(\alpha,\tfrac{1}{\alpha})

(scaled-inverse-chi-squared distribution)

X\simrm{Inv-Gamma}(\tfrac{1}{2},\tfrac{c}{2})

then

X\simrm{Levy}(0,c)

(Lévy distribution)

X\simrm{Inv-Gamma}(1,c)

then

\tfrac{1}{X}\simrm{Exp}(c)

(Exponential distribution)

X\simGamma(\alpha,\beta)

(Gamma distribution with rate parameter

\beta

) then

\tfrac{1}{X}\simInv-Gamma(\alpha,\beta)

(see derivation in the next paragraph for details)

X\simGamma(k,\theta)

(Gamma distribution with scale parameter

\theta

) then

1/X\simInv-Gamma(k,1/\theta)

Derivation from Gamma distribution

Let

X\simGamma(\alpha,\beta)

, and recall that the pdf of the gamma distribution is

fX(x)=

\beta\alpha
\Gamma(\alpha)

x\alpha-1e-\beta

,

x>0

.

Note that

\beta

is the rate parameter from the perspective of the gamma distribution.

Define the transformation

Y=g(X)=\tfrac{1}{X}

. Then, the pdf of

Y

is

\begin{align} fY(y)&=fX\left(g-1(y)\right)\left|

d
dy

g-1(y)\right|\\[6pt] &=

\beta\alpha
\Gamma(\alpha)

\left(

1
y

\right)\alpha-1\exp\left(

-\beta
y

\right)

1
y2

\\[6pt] &=

\beta\alpha
\Gamma(\alpha)

\left(

1
y

\right)\alpha+1\exp\left(

-\beta
y

\right)\\[6pt] &=

\beta\alpha
\Gamma(\alpha)

\left(y\right)-\alpha-1\exp\left(

-\beta
y

\right)\\[6pt] \end{align}

Note that

\beta

is the scale parameter from the perspective of the inverse gamma distribution. This can be straightforwardly demonstrated by seeing that

\beta

satisfies the conditions for being a scale parameter.
\begin{align} f\beta(y/\beta)
\beta

&=

1
\beta
\beta\alpha
\Gamma(\alpha)

\left(

y
\beta

\right)-\alpha-1\exp(-y)\\[6pt] &=

1
\Gamma(\alpha)

\left(y\right)-\alpha-1\exp(-y)\\[6pt] &=f\beta=1(y) \end{align}

Occurrence

\alpha=0.5

.[3]

See also

References

Notes and References

  1. Web site: InverseGammaDistribution—Wolfram Language Documentation. reference.wolfram.com. 9 April 2018.
  2. Web site: InverseGammaDistribution. John D. Cook. Oct 3, 2008. 3 Dec 2018.
  3. Web site: Ludkovski. Mike. 2007. Math 526: Brownian Motion Notes. UC Santa Barbara. 5–6.