The Bernoulli distribution allows us to calculate the probabilities for a random variable that takes only two values – 0 and 1.

**What is a Bernoulli trial?**

An experiment in which there are only two possible outcomes – success and failure. An example of a Bernoulli trial is the tossing of a coin since there are only two possible outcomes in this case – heads or tails. We denote either one of the outcomes, say heads as success, and the other outcome is called failure.

The Bernoulli random variable is defined so that it takes the value 1 when success occurs and 0 when a failure occurs.

**Bernoulli Distribution PDF Formula:**

Let ‘p’ denote the probability of success. Hence, the probability of failure is equal to ‘1-p’.

The probability distribution of the Bernoulli random variable is given as,

The CDF (cumulative distribution function) F(x) for the Bernoulli Distribution is given as,

**Properties:**

- The expected value/mean of the Bernoulli distribution is given as, E(X) = p.
- The variance of the Bernoulli distribution is given as, V(X) = p(1-p).
- The moment generating function (mgf) of the Bernoulli distribution is given as, MX(t) = (1-p)+pe^t.
- The sum of ‘n’ independent Bernoulli random variables, follows the binomial distribution with parameters ‘n’ and ‘p’.