Definition – Bernoulli distribution

Contents
1. Definitions
2. Use of the Bernoulli distribution
3. Mean.
4. Variance.

1. Definition

A random variable X is said to follow a Bernoulli distribution if it takes values 0 and 1, and

p(X=x) = p^x (1-p)^{1-x}

We write that X \sim Ber(p).

2. Use of the Bernoulli distribution

We use the Bernoulli distribution to determine the probability of some event A occurring (or not). For example, the probability of rolling a 1 on a fair 6 sided dice, is \frac{1}{6}, and so let X be the outcome of whether we roll a 1 or not. This follows a Bernoulli distribution with p=\frac{1}{6}.

The probability of an event occurring is given by p(X=1), and the probability of an event not occurring is given by p(X=0).

3. Mean & Variance

  • E(X) = p
  • Var(X) = p(1-p)

Proof

For the mean, we have E(X) = \sum_{i=0}^1 p^x (1-p)^{1-x} = 0 + p = p. For the variance, consider the identity Var(X) = E(X^2) -E(X)^2. As 0^2 = 0 and 1^2 = 1, we have that E(X^2) = E(X) = p, and so

Var(X) = p-p^2 = p(1-p)\quad\square