pymc.InverseGamma#

class pymc.InverseGamma(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, **kwargs)[source]#

Inverse gamma log-likelihood, the reciprocal of the gamma distribution.

The pdf of this distribution is

\[f(x \mid \alpha, \beta) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} x^{-\alpha - 1} \exp\left(\frac{-\beta}{x}\right)\]

(Source code, png, hires.png, pdf)

../../../_images/pymc-InverseGamma-1.png

Support

\(x \in (0, \infty)\)

Mean

\(\dfrac{\beta}{\alpha-1}\) for \(\alpha > 1\)

Variance

\(\dfrac{\beta^2}{(\alpha-1)^2(\alpha - 2)}\) for \(\alpha > 2\)

Parameters:
alphatensor_like of float, optional

Shape parameter (alpha > 0).

betatensor_like of float, optional

Scale parameter (beta > 0).

mutensor_like of float, optional

Alternative shape parameter (mu > 0).

sigmatensor_like of float, optional

Alternative scale parameter (sigma > 0).

Methods

InverseGamma.dist([alpha, beta, mu, sigma])

Creates a tensor variable corresponding to the cls distribution.