= Bernoulli distribution
{c}
{title2=$\operatorname{Bernoulli}(p)$}
{wiki}
= Bernoulli random variable
{c}
{synonym}
= Bernoulli
{c}
{synonym}
A <Bernoulli random variable> records one success as $1$ and one failure as $0$. For $0\leq p\leq1$, its <probability mass function> is
$$
\mathbb P(B=1)=p,\qquad \mathbb P(B=0)=1-p,
$$
with zero mass elsewhere. The terms success and failure merely name outcomes; success need not be desirable. Any event $A$ produces such a variable through its <indicator random variable> $B=\mathbf1_A$, with $p=\mathbb P(A)$. A single <Bernoulli distribution> requires no <independence> assumption; <independence> becomes relevant when several trials are combined.
Because $B^2=B$, the <expected value> and <variance> follow immediately:
$$
\mathbb E B=0(1-p)+1p=p,\qquad
\operatorname{Var}(B)=\mathbb E[B^2]-(\mathbb E B)^2=p-p^2=p(1-p).
$$
For a constructed trial with $p=0.3$, these are $0.3$ and $0.21$. The <variance> is greatest at $p=1/2$, where it equals $1/4$, since $p(1-p)=1/4-(p-1/2)^2$. At $p=0$ or $p=1$, the outcome is certain and the <variance> vanishes.
The beauty of an <indicator random variable> is that counting becomes addition: summing such indicators counts successes, and the <linearity of expectation> gives the expected count even when the indicators are dependent. With <independence> and a shared $p$, the full count law is the <binomial distribution>. These models are summarized in https://online.stat.psu.edu/stat504/Lesson01[Penn State STAT 504, discrete distributions].
A historical anchor is Bernoulli's posthumous \i[Ars conjectandi]: its original title page identifies the author and records publication at Basel in 1713. This documents the book's publication, rather than establishing priority for the modern name <Bernoulli distribution>. See https://www.e-rara.ch/download/pdf/2645768.pdf[Ars conjectandi, original title page, ETH Library].
Back to article page