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
)Support
\(x \in \mathbb{N}_0\)
Mean
\(\psi n p\)
Variance
\((1-\psi) n p [1 - p(1 - \psi n)].\)
- Parameters:
- psitensor_like of
float
Expected proportion of Binomial draws (0 < psi < 1)
- ntensor_like of
int
Number of Bernoulli trials (n >= 0).
- ptensor_like of
float
Probability of success in each trial (0 < p < 1).
- psitensor_like of
Methods
ZeroInflatedBinomial.dist
(psi, n, p, **kwargs)