# 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}$
 Support $$x \in \{0, 1, \ldots, n\}$$ Mean $$n p$$ Variance $$n p (1 - p)$$
Parameters
nint

Number of Bernoulli trials (n >= 0).

pfloat

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

logit_pfloat

Alternative log odds for the probability of success.

Methods

 Binomial.__init__(*args, **kwargs) Binomial.dist(n[, p, logit_p]) Creates a tensor variable corresponding to the cls distribution. Compute the log of the cumulative distribution function for Binomial distribution at the specified value. Binomial.logp(n, p) Calculate log-probability of Binomial distribution at specified value. Binomial.moment(size, n, p)

Attributes

 rv_class rv_op