Bernoulli Distribution#
Univariate, Discrete, Bounded, Non-Negative
The Bernoulli distribution is a discrete probability distribution. It can be thought of as a model for the set of possible outcomes of any single experiment that asks a yes–no question. More formally, it is a random variable which takes the value 1 with probability \(p\) and the value 0 with probability \(q = 1 − p\).
Key properties and parameters#
Support |
\(x \in \{0, 1\}\) |
Mean |
\(p\) |
Variance |
\(p (1 - p)\) |
Parameters:
\(p\) : (float) Probability of success, \(0 \leq p \leq 1\).
\(\text{logit}(p)\) : (float) Alternative log odds for the probability success, \(-\infty < \text{logit}(p) < \infty\).
Alternative parametrization
The Bernoulli distribution has 2 alternative parametrizations. In terms of \(p\) or \(\text{logit}(p)\).
The link between the 2 alternatives is given by
Probability Mass Function (PMF)#
Cumulative Distribution Function (CDF)#
See also
Related Distributions:
Binomial - The Bernoulli distribution is a special case of the Binomial distribution with \(N=1\).
Categorical - A generalization of the Bernoulli distribution to more than two outcomes.