pymc.ZeroInflatedBinomial#

class pymc.ZeroInflatedBinomial(name, psi, n, p, **kwargs)[source]#

Zero-inflated Binomial log-likelihood.

The pmf of this distribution is

\[\begin{split}f(x \mid \psi, n, p) = \left\{ \begin{array}{l} (1-\psi) + \psi (1-p)^{n}, \text{if } x = 0 \\ \psi {n \choose x} p^x (1-p)^{n-x}, \text{if } x=1,2,3,\ldots,n \end{array} \right.\end{split}\]

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

../../../_images/pymc-ZeroInflatedBinomial-1.png

Support

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

Mean

\(\psi n p\)

Variance

\((1-\psi) n p [1 - p(1 - \psi n)].\)

Parameters
psi: float

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

n: int

Number of Bernoulli trials (n >= 0).

p: float

Probability of success in each trial (0 < p < 1).

Methods

ZeroInflatedBinomial.__init__(*args, **kwargs)

ZeroInflatedBinomial.dist(psi, n, p, **kwargs)