InverseGammaDistribution
✖
InverseGammaDistribution
represents an inverse gamma distribution with shape parameter α and scale parameter β.
represents a generalized inverse gamma distribution with shape parameters α and γ, scale parameter β, and location parameter μ.
Details

- InverseGammaDistribution[α,β] is also known as the inverted gamma distribution.
- The inverse gamma distribution InverseGammaDistribution[α,β] is the distribution followed by the inverse of a GammaDistribution[α,1/β] distributed random variable. »
- InverseGammaDistribution[α,β] is equivalent to TransformedDistribution[1/x,xGammaDistribution[α,1/β]].
- InverseGammaDistribution[α,β,γ,μ] is equivalent to TransformedDistribution[1/x,xGammaDistribution[α,1/β,γ,μ]].
- InverseGammaDistribution allows α, β, and γ to be any positive real numbers and μ to be any real number.
- InverseGammaDistribution allows β and μ to be any quantities of the same unit dimensions, and α, γ to be dimensionless quantities. »
- InverseGammaDistribution can be used with such functions as Mean, CDF, and RandomVariate.
Background & Context
- InverseGammaDistribution[α,β,γ,μ] represents a continuous statistical distribution defined over the interval
and parametrized by a real number μ (called a "location parameter"), two positive real numbers α and γ (called "shape parameters"), and a positive real number β (called a "scale parameter"). Overall, the probability density function (PDF) of an inverse gamma distribution is unimodal with a single "peak" (i.e. a global maximum), with the parameter μ determining the horizontal location of the PDF and the parameters α, β, and γ determining its overall shape (its height, its spread, and its concentration near the
axis). In addition, the tails of the PDF are "thin" in the sense that the PDF decreases exponentially rather than decreasing algebraically for large values of
. (This behavior can be made quantitatively precise by analyzing the SurvivalFunction of the distribution.) The four-parameter version is sometimes referred to as the generalized inverse gamma distribution, while the two-parameter form InverseGammaDistribution[α,β] (which is equivalent to InverseGammaDistribution[α,β,1,0]) is often referred to as "the" inverse gamma distribution.
- InverseGammaDistribution[α,β,γ,μ] is the distribution followed by the reciprocal of a generalized gamma-distributed random variable. In other words, if
is a random variable and XGammaDistribution[α,β,γ,μ] (where
denotes "is distributed as"), then 1/XInverseGammaDistribution[α,β,γ,μ]. In Bayesian probability, the inverse gamma distribution is used as a marginal posterior or as a conjugate prior distribution in inferencing of normally-distributed data whose variance is unknown if an uninformative prior or if an informative prior is used, respectively. The inverse gamma distribution and its generalization are also used in other miscellaneous Bayesian applications in addition to being used as tools of study in various areas including reliability theory, manufacturing systems, machine learning, and survival analysis.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from an inverse gamma distribution. Distributed[x,InverseGammaDistribution[α,β,γ,μ]], written more concisely as xInverseGammaDistribution[α,β,γ,μ], can be used to assert that a random variable x is distributed according to an inverse gamma distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions for inverse gamma distributions may be given using PDF[InverseGammaDistribution[α,β,γ,μ],x] and CDF[InverseGammaDistribution[α,β,γ,μ],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
- DistributionFitTest can be used to test if a given dataset is consistent with an inverse gamma distribution, EstimatedDistribution to estimate an inverse gamma parametric distribution from given data, and FindDistributionParameters to fit data to an inverse gamma distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic inverse gamma distribution, and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic inverse gamma distribution.
- TransformedDistribution can be used to represent a transformed inverse gamma distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain an inverse gamma distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving inverse gamma distributions.
- InverseGammaDistribution is closely related to a number of other distributions. For example, InverseGammaDistribution is related to InverseChiSquareDistribution (and hence to ChiSquareDistribution) in that the PDF of InverseGammaDistribution[ν/2,1/2] is precisely the same as InverseChiSquareDistribution[ν,1/ν]. InverseGammaDistribution is generalized by PearsonDistribution, generalizes LevyDistribution, and is closely related to a number of other distributions including MoyalDistribution, LogGammaDistribution, ErlangDistribution, BetaDistribution, ExpGammaDistribution, RayleighDistribution, ChiDistribution, WeibullDistribution, and StudentTDistribution.
Examples
open allclose allBasic Examples (8)Summary of the most common use cases

https://wolfram.com/xid/0e5ax7116x0eqi-kyintk


https://wolfram.com/xid/0e5ax7116x0eqi-vmro4u


https://wolfram.com/xid/0e5ax7116x0eqi-b5oiw2

Cumulative distribution function:

https://wolfram.com/xid/0e5ax7116x0eqi-ke60nq


https://wolfram.com/xid/0e5ax7116x0eqi-lkk1qs


https://wolfram.com/xid/0e5ax7116x0eqi-chkcda


https://wolfram.com/xid/0e5ax7116x0eqi-wko5m


https://wolfram.com/xid/0e5ax7116x0eqi-ikj8xg


https://wolfram.com/xid/0e5ax7116x0eqi-rh9pfj

Probability density function for the generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-q6wfq


https://wolfram.com/xid/0e5ax7116x0eqi-pvs5md


https://wolfram.com/xid/0e5ax7116x0eqi-qcgvko

Cumulative distribution function for the generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-lrrzbj


https://wolfram.com/xid/0e5ax7116x0eqi-3jbb5a


https://wolfram.com/xid/0e5ax7116x0eqi-b3vaeq

Mean and variance of the generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-dp7z47


https://wolfram.com/xid/0e5ax7116x0eqi-43b89c


https://wolfram.com/xid/0e5ax7116x0eqi-b3ezv6

Scope (10)Survey of the scope of standard use cases
Generate a sample of pseudorandom numbers from an inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-qhtk5j
Compare its histogram to the PDF:

https://wolfram.com/xid/0e5ax7116x0eqi-03mwaz

Generate a set of pseudorandom numbers that have generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-j7vis
Compare its histogram to the PDF:

https://wolfram.com/xid/0e5ax7116x0eqi-3054ke

Distribution parameters estimation:

https://wolfram.com/xid/0e5ax7116x0eqi-45b7g2
Estimate the distribution parameters from sample data:

https://wolfram.com/xid/0e5ax7116x0eqi-epi747

Compare the density histogram of the sample with the PDF of the estimated distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-f8ui5o

Skewness depends only on shape parameter α:

https://wolfram.com/xid/0e5ax7116x0eqi-0vh7dm


https://wolfram.com/xid/0e5ax7116x0eqi-smp

As α gets larger, the distribution becomes more symmetric:

https://wolfram.com/xid/0e5ax7116x0eqi-bn11lo

The generalized case depends on both α and γ:

https://wolfram.com/xid/0e5ax7116x0eqi-l88qv6


https://wolfram.com/xid/0e5ax7116x0eqi-s5m7me

Kurtosis depends only on shape parameter α:

https://wolfram.com/xid/0e5ax7116x0eqi-gmfy2m


https://wolfram.com/xid/0e5ax7116x0eqi-qke

The kurtosis approaches the kurtosis of NormalDistribution[] as α approaches :

https://wolfram.com/xid/0e5ax7116x0eqi-e30fok

The generalized case depends on both α and γ:

https://wolfram.com/xid/0e5ax7116x0eqi-ylrdc0


https://wolfram.com/xid/0e5ax7116x0eqi-hv55ok

Different moments with closed forms as functions of parameters:

https://wolfram.com/xid/0e5ax7116x0eqi-js043h

https://wolfram.com/xid/0e5ax7116x0eqi-rx074o


https://wolfram.com/xid/0e5ax7116x0eqi-pknsqa


https://wolfram.com/xid/0e5ax7116x0eqi-zg9ct4


https://wolfram.com/xid/0e5ax7116x0eqi-9gzmth

Different moments of generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-c77crz

https://wolfram.com/xid/0e5ax7116x0eqi-4kmovf


https://wolfram.com/xid/0e5ax7116x0eqi-3gj1w5


https://wolfram.com/xid/0e5ax7116x0eqi-9dfwj0


https://wolfram.com/xid/0e5ax7116x0eqi-hebrtm


https://wolfram.com/xid/0e5ax7116x0eqi-bdk9lp


https://wolfram.com/xid/0e5ax7116x0eqi-evtj1n


https://wolfram.com/xid/0e5ax7116x0eqi-4ofbxp

Hazard function of generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-kpwv1r


https://wolfram.com/xid/0e5ax7116x0eqi-zy0dw5


https://wolfram.com/xid/0e5ax7116x0eqi-10c13r


https://wolfram.com/xid/0e5ax7116x0eqi-b8p0kl


https://wolfram.com/xid/0e5ax7116x0eqi-kztu2d

Generalized inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-jbdwfs


https://wolfram.com/xid/0e5ax7116x0eqi-12mo7l

Consistent use of Quantity in parameters yields QuantityDistribution:

https://wolfram.com/xid/0e5ax7116x0eqi-de2jsq


https://wolfram.com/xid/0e5ax7116x0eqi-cg0pqk

Applications (1)Sample problems that can be solved with this function
The present value of one-dollar stochastic perpetuity when the rate obeys a Wiener process with shift and volatility
follows InverseGaussianDistribution:

https://wolfram.com/xid/0e5ax7116x0eqi-cmqspc
Find the expected present value:

https://wolfram.com/xid/0e5ax7116x0eqi-dof12u

Compute the no‐volatility limit:

https://wolfram.com/xid/0e5ax7116x0eqi-ehd3vv

Compare with the built-in result:

https://wolfram.com/xid/0e5ax7116x0eqi-h53p96

Find the probability that the present value is smaller than the no‐volatility limit:

https://wolfram.com/xid/0e5ax7116x0eqi-fdrd18

Compute the probability when r0.06 and σ0.01:

https://wolfram.com/xid/0e5ax7116x0eqi-bulzy9

Properties & Relations (8)Properties of the function, and connections to other functions
Inverse gamma distribution is closed under scaling by a positive factor:

https://wolfram.com/xid/0e5ax7116x0eqi-ho2od1

Generalized inverse gamma distribution is closed under translation and scaling by a positive factor:

https://wolfram.com/xid/0e5ax7116x0eqi-ftdkt5

Relationships to other distributions:

InverseChiSquareDistribution is a special case of inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-vtj


https://wolfram.com/xid/0e5ax7116x0eqi-n5r


https://wolfram.com/xid/0e5ax7116x0eqi-wx0s82

Generalized InverseChiSquareDistribution is a special case of inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-quu160


https://wolfram.com/xid/0e5ax7116x0eqi-seqztm


https://wolfram.com/xid/0e5ax7116x0eqi-ogd8hd

Inverse gamma distribution and GammaDistribution have an inverse relationship:

https://wolfram.com/xid/0e5ax7116x0eqi-h9yioq

https://wolfram.com/xid/0e5ax7116x0eqi-i14w7i


https://wolfram.com/xid/0e5ax7116x0eqi-kgxbp5


https://wolfram.com/xid/0e5ax7116x0eqi-bn4lg5

LevyDistribution[0,σ] is a special case of inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-cs8wcv


https://wolfram.com/xid/0e5ax7116x0eqi-fn8ci7


https://wolfram.com/xid/0e5ax7116x0eqi-wjw48r

Inverse gamma distribution is a special case of type 5 PearsonDistribution:

https://wolfram.com/xid/0e5ax7116x0eqi-9hzd6o


https://wolfram.com/xid/0e5ax7116x0eqi-84oc9z


https://wolfram.com/xid/0e5ax7116x0eqi-tw3352

Generalized inverse gamma distribution simplifies to inverse gamma distribution:

https://wolfram.com/xid/0e5ax7116x0eqi-q1gbn


https://wolfram.com/xid/0e5ax7116x0eqi-u889ij


https://wolfram.com/xid/0e5ax7116x0eqi-51ndsp

Possible Issues (2)Common pitfalls and unexpected behavior
InverseGammaDistribution is not defined when either α or β is not a positive real number:

https://wolfram.com/xid/0e5ax7116x0eqi-ebk


Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:

https://wolfram.com/xid/0e5ax7116x0eqi-t70

Wolfram Research (2008), InverseGammaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/InverseGammaDistribution.html (updated 2016).
Text
Wolfram Research (2008), InverseGammaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/InverseGammaDistribution.html (updated 2016).
Wolfram Research (2008), InverseGammaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/InverseGammaDistribution.html (updated 2016).
CMS
Wolfram Language. 2008. "InverseGammaDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/InverseGammaDistribution.html.
Wolfram Language. 2008. "InverseGammaDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/InverseGammaDistribution.html.
APA
Wolfram Language. (2008). InverseGammaDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InverseGammaDistribution.html
Wolfram Language. (2008). InverseGammaDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InverseGammaDistribution.html
BibTeX
@misc{reference.wolfram_2025_inversegammadistribution, author="Wolfram Research", title="{InverseGammaDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/InverseGammaDistribution.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_inversegammadistribution, organization={Wolfram Research}, title={InverseGammaDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/InverseGammaDistribution.html}, note=[Accessed: 16-April-2025
]}