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.__init__(*args, **kwargs)

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

Creates a tensor variable corresponding to the cls distribution.

InverseGamma.logcdf(alpha, beta)

Compute the log of the cumulative distribution function for Inverse Gamma distribution at the specified value.

InverseGamma.moment(size, alpha, beta)

Attributes

rv_op