# pymc.Bernoulli#

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

Bernoulli log-likelihood

The Bernoulli distribution describes the probability of successes (x=1) and failures (x=0). The pmf of this distribution is

$f(x \mid p) = p^{x} (1-p)^{1-x}$
 Support $$x \in \{0, 1\}$$ Mean $$p$$ Variance $$p (1 - p)$$

The bernoulli distribution can be parametrized either in terms of p or logit_p. The link between the parametrizations is given by

$logit(p) = ln(\frac{p}{1-p})$
Parameters
p

Probability of success (0 < p < 1).

logit_p

Alternative log odds for the probability of success.

Methods

 Bernoulli.__init__(*args, **kwargs) Bernoulli.dist([p, logit_p]) Creates a tensor variable corresponding to the cls distribution. Bernoulli.moment(size, p)

Attributes

 rv_op