The Bernoulli Distribution

Introduces the Bernoulli distribution, its probability mass function, expected value, and variance, with applications including recovering the parameter pp from a given variance.

Step 1 of 157%

Tutorial

The Bernoulli Distribution

A Bernoulli trial is a random experiment with exactly two possible outcomes, conventionally labeled success and failure. We let pp denote the probability of success, so the probability of failure is 1p.1-p.

A random variable XX follows a Bernoulli distribution with parameter p,p, written XBernoulli(p),X \sim \text{Bernoulli}(p), if

P(X=1)=p,P(X=0)=1p.P(X=1) = p, \qquad P(X=0) = 1-p.

Here X=1X=1 records a success and X=0X=0 records a failure. The two cases can be combined into a single probability mass function (PMF):

P(X=x)=px(1p)1x,x{0,1}.P(X=x) = p^x(1-p)^{1-x}, \qquad x \in \{0,\, 1\}.

For example, flipping a fair coin and setting X=1X=1 for heads and X=0X=0 for tails gives XBernoulli(0.5),X \sim \text{Bernoulli}(0.5), with

P(X=1)=0.5,P(X=0)=0.5.P(X=1) = 0.5, \qquad P(X=0) = 0.5.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle