Inverse Gamma distribution
Story
If \(Y\) is Gamma distributed, then \(1/Y\) is Inverse Gamma distributed.
Parameters
The number of arrivals, \(\alpha\), and the rate of arrivals, \(\beta\).
Support
The Inverse Gamma distribution is supported on the set of positive real numbers.
Probability density function
where \(\Gamma(\alpha)\) is the gamma function.
Cumulative distribution function
Moments
Mean: \(\displaystyle{\frac{\beta}{\alpha - 1}}\) for \(\alpha > 1\); for \(\alpha \le 1\), the mean is undefined.
Variance: \(\displaystyle{\frac{\beta^2}{(\alpha-1)^2(\alpha-2)}}\) for \(\alpha > 2\); for \(\alpha \le 2\), the variance is undefined.
Usage
Package |
Syntax |
---|---|
NumPy |
|
SciPy |
|
Distributions.jl |
|
Stan |
|
Notes
The Inverse Gamma distribution is useful as a prior for positive parameters. It imparts a quite heavy tail and keeps probability further from zero than the Gamma distribution.
NumPy module does not have a function to sample directly from the Inverse Gamma distribution, but it can be achieved by sampling out of a Gamma distribution and then taking the inverser, as shown in the NumPy usage above.