# Inverse-chi-squared distribution

In probability and statistics, the inverse-chi-squared distribution (or inverted-chi-square distribution[1]) is a continuous probability distribution of a positive-valued random variable. It is closely related to the chi-squared distribution and its specific importance is that it arises in the application of Bayesian inference to the normal distribution, where it can be used as the prior and posterior distribution for an unknown variance.

Parameters Probability density function Cumulative distribution function ${\displaystyle \nu >0\!}$ ${\displaystyle x\in (0,\infty )\!}$ ${\displaystyle {\frac {2^{-\nu /2}}{\Gamma (\nu /2)}}\,x^{-\nu /2-1}e^{-1/(2x)}\!}$ ${\displaystyle \Gamma \!\left({\frac {\nu }{2}},{\frac {1}{2x}}\right){\bigg /}\,\Gamma \!\left({\frac {\nu }{2}}\right)\!}$ ${\displaystyle {\frac {1}{\nu -2}}\!}$ for ${\displaystyle \nu >2\!}$ ${\displaystyle \approx {\dfrac {1}{\nu {\bigg (}1-{\dfrac {2}{9\nu }}{\bigg )}^{3}}}}$ ${\displaystyle {\frac {1}{\nu +2}}\!}$ ${\displaystyle {\frac {2}{(\nu -2)^{2}(\nu -4)}}\!}$ for ${\displaystyle \nu >4\!}$ ${\displaystyle {\frac {4}{\nu -6}}{\sqrt {2(\nu -4)}}\!}$ for ${\displaystyle \nu >6\!}$ ${\displaystyle {\frac {12(5\nu -22)}{(\nu -6)(\nu -8)}}\!}$ for ${\displaystyle \nu >8\!}$ ${\displaystyle {\frac {\nu }{2}}\!+\!\ln \!\left({\frac {\nu }{2}}\Gamma \!\left({\frac {\nu }{2}}\right)\right)}$ ${\displaystyle \!-\!\left(1\!+\!{\frac {\nu }{2}}\right)\psi \!\left({\frac {\nu }{2}}\right)}$ ${\displaystyle {\frac {2}{\Gamma ({\frac {\nu }{2}})}}\left({\frac {-t}{2i}}\right)^{\!\!{\frac {\nu }{4}}}K_{\frac {\nu }{2}}\!\left({\sqrt {-2t}}\right)}$; does not exist as real valued function ${\displaystyle {\frac {2}{\Gamma ({\frac {\nu }{2}})}}\left({\frac {-it}{2}}\right)^{\!\!{\frac {\nu }{4}}}K_{\frac {\nu }{2}}\!\left({\sqrt {-2it}}\right)}$

## Definition

The inverse-chi-squared distribution (or inverted-chi-square distribution[1] ) is the probability distribution of a random variable whose multiplicative inverse (reciprocal) has a chi-squared distribution. It is also often defined as the distribution of a random variable whose reciprocal divided by its degrees of freedom is a chi-squared distribution. That is, if ${\displaystyle X}$ has the chi-squared distribution with ${\displaystyle \nu }$ degrees of freedom, then according to the first definition, ${\displaystyle 1/X}$ has the inverse-chi-squared distribution with ${\displaystyle \nu }$ degrees of freedom; while according to the second definition, ${\displaystyle \nu /X}$ has the inverse-chi-squared distribution with ${\displaystyle \nu }$ degrees of freedom. Information associated with the first definition is depicted on the right side of the page.

The first definition yields a probability density function given by

${\displaystyle f_{1}(x;\nu )={\frac {2^{-\nu /2}}{\Gamma (\nu /2)}}\,x^{-\nu /2-1}e^{-1/(2x)},}$

while the second definition yields the density function

${\displaystyle f_{2}(x;\nu )={\frac {(\nu /2)^{\nu /2}}{\Gamma (\nu /2)}}x^{-\nu /2-1}e^{-\nu /(2x)}.}$

In both cases, ${\displaystyle x>0}$ and ${\displaystyle \nu }$ is the degrees of freedom parameter. Further, ${\displaystyle \Gamma }$ is the gamma function. Both definitions are special cases of the scaled-inverse-chi-squared distribution. For the first definition the variance of the distribution is ${\displaystyle \sigma ^{2}=1/\nu ,}$ while for the second definition ${\displaystyle \sigma ^{2}=1}$.

• chi-squared: If ${\displaystyle X\thicksim \chi ^{2}(\nu )}$ and ${\displaystyle Y={\frac {1}{X}}}$, then ${\displaystyle Y\thicksim {\text{Inv-}}\chi ^{2}(\nu )}$
• scaled-inverse chi-squared: If ${\displaystyle X\thicksim {\text{Scale-inv-}}\chi ^{2}(\nu ,1/\nu )\,}$, then ${\displaystyle X\thicksim {\text{inv-}}\chi ^{2}(\nu )}$
• Inverse gamma with ${\displaystyle \alpha ={\frac {\nu }{2}}}$ and ${\displaystyle \beta ={\frac {1}{2}}}$