# Bernoulli distribution

Parameters Probability mass function Cumulative distribution function ${\displaystyle p>0\,}$ (real) ${\displaystyle k=\{0,1\}\,}$ ${\displaystyle {\begin{matrix}q&{\mbox{for }}k=0\\p~~&{\mbox{for }}k=1\end{matrix}}}$ ${\displaystyle {\begin{matrix}0&{\mbox{for }}k<0\\q&{\mbox{for }}0\leq k<1\\1&{\mbox{for }}k\geq 1\end{matrix}}}$ ${\displaystyle p\,}$ N/A ${\displaystyle {\begin{matrix}0&{\mbox{if }}q>p\\0,1&{\mbox{if }}q=p\\1&{\mbox{if }}q ${\displaystyle pq\,}$ ${\displaystyle {\frac {q-p}{\sqrt {pq}}}}$ ${\displaystyle {\frac {6p^{2}-6p+1}{p(1-p)}}}$ ${\displaystyle -q\ln(q)-p\ln(p)\,}$ ${\displaystyle q+pe^{t}\,}$ ${\displaystyle q+pe^{it}\,}$

In probability theory and statistics, the Bernoulli distribution, named after Swiss scientist Jakob Bernoulli, is a discrete probability distribution, which takes value 1 with success probability ${\displaystyle p}$ and value 0 with failure probability ${\displaystyle q=1-p}$. So if X is a random variable with this distribution, we have:

${\displaystyle \Pr(X=1)=1-\Pr(X=0)=1-q=p.\!}$

The probability mass function f of this distribution is

${\displaystyle f(k;p)=\left\{{\begin{matrix}p&{\mbox{if }}k=1,\\1-p&{\mbox{if }}k=0,\\0&{\mbox{otherwise.}}\end{matrix}}\right.}$

The expected value of a Bernoulli random variable X is ${\displaystyle E\left(X\right)=p}$, and its variance is

${\displaystyle {\textrm {var}}\left(X\right)=p\left(1-p\right).\,}$

The kurtosis goes to infinity for high and low values of p, but for ${\displaystyle p=1/2}$ the Bernoulli distribution has a lower kurtosis than any other probability distribution, namely -2.

The Bernoulli distribution is a member of the exponential family.

## Related distributions

• If ${\displaystyle X_{1},\dots ,X_{n}}$ are independent, identically distributed random variables, all Bernoulli distributed with success probability p, then ${\displaystyle Y=\sum _{k=1}^{n}X_{k}\sim \mathrm {Binomial} (n,p)}$ (binomial distribution).
• The Categorical distribution is the generalization of the Bernoulli distribution for variables with any constant number of discrete values.
• The Beta distribution is the conjugate prior of the Bernoulli distribution.