Bernoulli Distribution Calculator

Bernoulli Distribution Calculator

Bernoulli's Distribution Calculator can help you to calculate the mean, variance and probability for Bernoulli's distribution with parameter probability of success $p$.

Bernoulli Distribution Calculator
Probability of success (p):
Number of success (x):
Probability : P(X = x)
Mean : E(X)
Variance : V(X)
Standard Deviation :

Bernoulli's Distribution Theory

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*} $$

Bernoulli's Distribution 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*} $$


  • $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$.


I hope you find above article on Bernoulli Distribution Calculator helpful and educational.

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

VRCBuzz co-founder and passionate about making every day the greatest day of life. Raju is nerd at heart with a background in Statistics. Raju looks after overseeing day to day operations as well as focusing on strategic planning and growth of VRCBuzz products and services. Raju has more than 25 years of experience in Teaching fields. He gain energy by helping people to reach their goal and motivate to align to their passion. Raju holds a Ph.D. degree in Statistics. Raju loves to spend his leisure time on reading and implementing AI and machine learning concepts using statistical models.

Leave a Comment