pymc.Binomial#

class pymc.Binomial(name, *args, **kwargs)[source]#

Binomial log-likelihood.

The discrete probability distribution of the number of successes in a sequence of n independent yes/no experiments, each of which yields success with probability p. The pmf of this distribution is

\[f(x \mid n, p) = \binom{n}{x} p^x (1-p)^{n-x}\]

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

../../../_images/pymc-Binomial-1.png

Support

\(x \in \{0, 1, \ldots, n\}\)

Mean

\(n p\)

Variance

\(n p (1 - p)\)

Parameters:
ntensor_like of int

Number of Bernoulli trials (n >= 0).

ptensor_like of float

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

logit_ptensor_like of float

Alternative log odds for the probability of success.

Methods

Binomial.dist(n[, p, logit_p])

Creates a tensor variable corresponding to the cls distribution.