pymc.dims.Gamma#
- class pymc.dims.Gamma(name, *dist_params, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, model=None, **kwargs)[source]#
Gamma distribution.
Represents the sum of alpha exponentially distributed random variables, each of which has rate beta.
The pdf of this distribution is
\[f(x \mid \alpha, \beta) = \frac{\beta^{\alpha}x^{\alpha-1}e^{-\beta x}}{\Gamma(\alpha)}\]Here, the gamma distribution is parameterized by shape (alpha) and rate (beta).
(
Source code,png,hires.png,pdf)
Support
\(x \in (0, \infty)\)
Mean
\(\dfrac{\alpha}{\beta}\)
Variance
\(\dfrac{\alpha}{\beta^2}\)
Gamma distribution can be parameterized either in terms of alpha and beta or mean and standard deviation. The link between the two parametrizations is given by
\[\begin{split}\alpha &= \frac{\mu^2}{\sigma^2} \\ \beta &= \frac{\mu}{\sigma^2}\end{split}\]- Parameters:
Methods
Gamma.dist([alpha, beta, mu, sigma])