To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Inverse-gamma distribution

Parameters Probability density function Cumulative distribution function ${\displaystyle \alpha >0}$ shape (real)${\displaystyle \beta >0}$ scale (real) ${\displaystyle x\in (0,\infty )\!}$ ${\displaystyle {\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}x^{-\alpha -1}\exp \left(-{\frac {\beta }{x}}\right)}$ ${\displaystyle {\frac {\Gamma (\alpha ,\beta /x)}{\Gamma (\alpha )}}\!}$ ${\displaystyle {\frac {\beta }{\alpha -1}}\!}$ for ${\displaystyle \alpha >1}$ ${\displaystyle {\frac {\beta }{\alpha +1}}\!}$ ${\displaystyle {\frac {\beta ^{2}}{(\alpha -1)^{2}(\alpha -2)}}\!}$ for ${\displaystyle \alpha >2}$ ${\displaystyle {\frac {4{\sqrt {\alpha -2}}}{\alpha -3}}\!}$ for ${\displaystyle \alpha >3}$ ${\displaystyle {\frac {6(5\,\alpha -11)}{(\alpha -3)(\alpha -4)}}\!}$ for ${\displaystyle \alpha >4}$ ${\displaystyle \alpha \!+\!\ln(\beta \Gamma (\alpha ))\!-\!(1\!+\!\alpha )\psi (\alpha )}$ (see digamma function) Does not exist. ${\displaystyle {\frac {2\left(-i\beta t\right)^{\!\!{\frac {\alpha }{2}}}}{\Gamma (\alpha )}}K_{\alpha }\left({\sqrt {-4i\beta t}}\right)}$

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.(Hoff, 2009:74)

However, it is common among 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.

• 1/3
Views:
4 129
1 552
754
• ✪ Conjugate Prior for Variance of Normal Distribution with known mean
• ✪ Estimation of the posterior distribution in a Bayesian framework
• ✪ Categorical Reparameterization with Gumbel-Softmax & The Concrete Distribution, NIPS 2016

Characterization

Probability density function

The inverse gamma distribution's probability density function is defined over the support ${\displaystyle x>0}$

${\displaystyle f(x;\alpha ,\beta )={\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}(1/x)^{\alpha +1}\exp \left(-\beta /x\right)}$

with shape parameter ${\displaystyle \alpha }$ and scale parameter ${\displaystyle \beta }$.[1] Here ${\displaystyle \Gamma (\cdot )}$ denotes the gamma function.

Unlike the Gamma distribution, which contains a somewhat similar exponential term, ${\displaystyle \beta }$ is a scale parameter as the distribution function satisfies:

${\displaystyle f(x;\alpha ,\beta )={\frac {f(x/\beta ;\alpha ,1)}{\beta }}}$

Cumulative distribution function

${\displaystyle F(x;\alpha ,\beta )={\frac {\Gamma \left(\alpha ,{\frac {\beta }{x}}\right)}{\Gamma (\alpha )}}=Q\left(\alpha ,{\frac {\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 ${\displaystyle Q}$, the regularized gamma function.

Moments

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

${\displaystyle \mathrm {E} [X^{n}]={\frac {\beta ^{n}}{(\alpha -1)\cdots (\alpha -n)}}.}$

Characteristic function

${\displaystyle K_{\alpha }(\cdot )}$ in the expression of the characteristic function is the modified Bessel function of the 2nd kind.

Properties

For ${\displaystyle \alpha >0}$ and ${\displaystyle \beta >0}$,

${\displaystyle \mathbb {E} [\ln(X)]=\ln(\beta )-\psi (\alpha )\,}$

and

${\displaystyle \mathbb {E} [X^{-1}]={\frac {\alpha }{\beta }},\,}$

The information entropy is

{\displaystyle {\begin{aligned}\operatorname {H} (X)&=\operatorname {E} [-\ln(p(X))]\\&=\operatorname {E} \left[-\alpha \ln(\beta )+\ln(\Gamma (\alpha ))+(\alpha +1)\ln(X)+{\frac {\beta }{X}}\right]\\&=-\alpha \ln(\beta )+\ln(\Gamma (\alpha ))+(\alpha +1)\ln(\beta )-(\alpha +1)\psi (\alpha )+\alpha \\&=\alpha +\ln(\beta \Gamma (\alpha ))-(\alpha +1)\psi (\alpha ).\end{aligned}}}

where ${\displaystyle \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):

${\displaystyle D_{\mathrm {KL} }(\alpha _{p},\beta _{p};\alpha _{q},\beta _{q})=\mathbb {E} \left[\log {\frac {\rho (X)}{\pi (X)}}\right]=\mathbb {E} \left[\log {\frac {\rho (1/Y)}{\pi (1/Y)}}\right]=\mathbb {E} \left[\log {\frac {\rho _{G}(Y)}{\pi _{G}(Y)}}\right],}$

where ${\displaystyle \rho ,\pi }$ are the pdfs of the Inverse-Gamma distributions and ${\displaystyle \rho _{G},\pi _{G}}$ are the pdfs of the Gamma distributions, ${\displaystyle Y}$ is Gamma(αp, βp) distributed.

{\displaystyle {\begin{aligned}D_{\mathrm {KL} }(\alpha _{p},\beta _{p};\alpha _{q},\beta _{q})={}&(\alpha _{p}-\alpha _{q})\psi (\alpha _{p})-\log \Gamma (\alpha _{p})+\log \Gamma (\alpha _{q})+\alpha _{q}(\log \beta _{p}-\log \beta _{q})+\alpha _{p}{\frac {\beta _{q}-\beta _{p}}{\beta _{p}}}.\end{aligned}}}

Related distributions

• If ${\displaystyle X\sim {\mbox{Inv-Gamma}}(\alpha ,\beta )}$ then ${\displaystyle kX\sim {\mbox{Inv-Gamma}}(\alpha ,k\beta )\,}$
• If ${\displaystyle X\sim {\mbox{Inv-Gamma}}(\alpha ,{\tfrac {1}{2}})}$ then ${\displaystyle X\sim {\mbox{Inv-}}\chi ^{2}(2\alpha )\,}$ (inverse-chi-squared distribution)
• If ${\displaystyle X\sim {\mbox{Inv-Gamma}}({\tfrac {\alpha }{2}},{\tfrac {1}{2}})}$ then ${\displaystyle X\sim {\mbox{Scaled Inv-}}\chi ^{2}(\alpha ,{\tfrac {1}{\alpha }})\,}$ (scaled-inverse-chi-squared distribution)
• If ${\displaystyle X\sim {\textrm {Inv-Gamma}}({\tfrac {1}{2}},{\tfrac {c}{2}})}$ then ${\displaystyle X\sim {\textrm {Levy}}(0,c)\,}$ (Lévy distribution)
• If ${\displaystyle X\sim {\mbox{Gamma}}(\alpha ,\beta )\,}$ (Gamma distribution with rate parameter ${\displaystyle \beta }$) then ${\displaystyle {\tfrac {1}{X}}\sim {\mbox{Inv-Gamma}}(\alpha ,\beta )\,}$ (see derivation in the next paragraph for details)
• Inverse gamma distribution is a special case of type 5 Pearson distribution
• A multivariate generalization of the inverse-gamma distribution is the inverse-Wishart distribution.
• For the distribution of a sum of independent inverted Gamma variables see Witkovsky (2001)

Derivation from Gamma distribution

Let ${\displaystyle X\sim {\mbox{Gamma}}(\alpha ,\beta )}$, and recall that the pdf of the gamma distribution is

${\displaystyle f_{X}(x)={\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}x^{\alpha -1}e^{-\beta x}}$, ${\displaystyle x>0}$.

Note that ${\displaystyle \beta }$ is the rate parameter from the perspective of the gamma distribution.

Define the transformation ${\displaystyle Y=g(X)={\tfrac {1}{X}}}$. Then, the pdf of ${\displaystyle Y}$ is

{\displaystyle {\begin{aligned}f_{Y}(y)&=f_{X}\left(g^{-1}(y)\right)\left|{\frac {d}{dy}}g^{-1}(y)\right|\\[6pt]&={\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\left({\frac {1}{y}}\right)^{\alpha -1}\exp \left({\frac {-\beta }{y}}\right){\frac {1}{y^{2}}}\\[6pt]&={\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\left({\frac {1}{y}}\right)^{\alpha +1}\exp \left({\frac {-\beta }{y}}\right)\\[6pt]&={\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\left(y\right)^{-\alpha -1}\exp \left({\frac {-\beta }{y}}\right)\\[6pt]\end{aligned}}}

Note that ${\displaystyle \beta }$ is the scale parameter from the perspective of the inverse gamma distribution.