Bernoulli Distribution

## Bernoulli's Distribution

A random experiment having two outcomes, viz., success or failure with respective probabilities $p$ and $q$ is called Bernoulli trial or Bernoulli experiment.

The probability distribution of the random variable $X$ representing the number of success obtained in a Bernoulli experiment is called Bernoulli distribution. Thus the random variable $X$ takes the value 0 and 1 with respective probabilities $q$ and $p$, i.e.,

` $$ \begin{equation`

*} P(X=0) = q, \text{ and } P(X=1) = p. \end{equation*} $$

## Definition

The discrete random variable $X$ is said to have Bernoulli distribution if its probability mass function (p.m.f.) is given by

` $$ \begin{equation`

*} P(X=x) = p^x q^{1-x},\; x=0,1; 0 < p < 1; q=1-p. \end{equation*} $$

Here

- $P(X=x)\geq 0$ for all $x$
- $\sum_{x} P(X=x) = P(X=0) + P(X=1) = q+p =1$.

Hence $P(X=x)$ is a probability mass function (p.m.f.).

## Key features of Bernoulli's Distribution

- There are only two outcomes for a random experiment like success ($S$) and failure ($F$).
- The outcomes are mutually exclusive.
- The probability of success is $p$.
- The random variable $X$ is the total number of success.

## Mean and Variance of Bernoulli's Distribution

The mean of Bernoulli distribution is

` $$ \begin{eqnarray`

*} \text{mean }= E(X) &=& \sum_{x=0}^1 x P(X=x) \ &=& 0\times P(X=0) + 1\times P(X=1)\ &=& 0\times q + 1\times p = p. \end{eqnarray*} $$

To find variance of $X$, we need to find $E(X^2)$.

` $$ \begin{eqnarray`

*} E(X^2) &=& \sum_{x=0}^1 x^2 P(X=x) \ &=& 0\times P(X=0) + 1\times P(X=1)\ &=& 0\times q + 1\times p\ &=& p. \end{eqnarray*} $$

Hence, the variance of Bernoulli distribution is

` $$ \begin{eqnarray`

*} \text{ Variance }= V(X) &=& E(X^2)-[E(x)]^2\ &=& p-p^2 \ &=& p(1-p)\ &=& pq. \end{eqnarray*} $$

Thus if $X$ is Bernoulli random variable with parameter $p$, then mean is $E(X)=p$ and variance is $V(X)= pq$.

**Mean $>$ Variance**.

## M.G.F. of Bernoulli Distribution

The m.g.f. of Bernoulli distribution is given by

` $$ \begin{eqnarray`

*} M X(t) &=& E(e^{tX}) \ &=& \sum{x=0}^1 e^{tx}P(X=x)\ &=& e^0 P(X=0) + e^tP(X=1)\ &=& q+pe^t. \end{eqnarray*} $$

Thus, the moment generating function of Bernoulli's distribution is $M_X(t) = q+pe^t$.

## P.G.F. of Bernoulli Distribution

The p.g.f. of Bernoulli distribution is given by

` $$ \begin{eqnarray`

*} P X(t) &=& E(t^{X}) \ &=& \sum{x=0}^1 t^xP(X=x)\ &=& t^0 P(X=0) + t^1P(X=1)\ &=& q+pt. \end{eqnarray*} $$

Thus, the probability generating function of Bernoulli's distribution is $P_X(t) = q+pt$.

## Reference

You can use Bernoulli Distribution calculator to determine the mean, variance and probability for Bernoulli's distribution with parameter probability of success $p$.

Bernoulli Distribution Calculator

Let me know in the comments if you have any questions on **Bernoulli Distribution** and your thought on this article.