Summary: This module shows how to derive the variance of a Bernoulli random variable.
The variance of the Bernoulli distribution can be easily derived using the variance formula:
Var[X]=E[X^2]-E[X]^2
If you denote by p the probability of success, i.e. the probability that X equals 1, then
E[X]=p*1+(1-p)*0=p
E[X^2]=p*1^2+(1-p)*0^2=p
Therefore:
Var[X]=E[X^2]-E[X]^2=p-p^2=p*(1-p)