pymc.ZeroInflatedPoisson#

class pymc.ZeroInflatedPoisson(name, psi, mu, **kwargs)[source]#

Zero-inflated Poisson log-likelihood.

Often used to model the number of events occurring in a fixed period of time when the times at which events occur are independent. The pmf of this distribution is

\[\begin{split}f(x \mid \psi, \mu) = \left\{ \begin{array}{l} (1-\psi) + \psi e^{-\mu}, \text{if } x = 0 \\ \psi \frac{e^{-\theta}\theta^x}{x!}, \text{if } x=1,2,3,\ldots \end{array} \right.\end{split}\]

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

../../../_images/pymc-ZeroInflatedPoisson-1.png

Support

\(x \in \mathbb{N}_0\)

Mean

\(\psi\mu\)

Variance

\(\mu + \frac{1-\psi}{\psi}\mu^2\)

Parameters
psi: float

Expected proportion of Poisson variates (0 < psi < 1)

mu: float

Expected number of occurrences during the given interval (mu >= 0).

Methods

ZeroInflatedPoisson.__init__(*args, **kwargs)

ZeroInflatedPoisson.dist(psi, mu, **kwargs)