# Bernoulli distribution ¶

Go back

Bernoulli is used when a random variable is either 0 or 1 (like flipping a coin, also called a binary variable).

This distribution $B(p)$ represents the probability of $k$ successes with a probability of $p$.

• The mass function is $\mathbb{P}(X=k) = p^k * (1-p)^{1-k}$
• $\mathbb{E}(X) = \ p$
• $\mathbb{V}(X) = \ p * (1-p)$

A binomial distribution is a repetition of Bernoulli distributions, so you should check binomial distribution to understand Bernoulli better.