Bernoulli Distribution
Bernoulli Distribution is a type of discrete probability distribution where every experiment conducted asks a question that can be answered only in yes or no. In other words, the random variable can be 1 with a probability p or it can be 0 with a probability (1  p). Such an experiment is called a Bernoulli trial. A pass or fail exam can be modeled by a Bernoulli Distribution.
If we have a Binomial Distribution where n = 1 then it becomes a Bernoulli Distribution. As this distribution is very easy to understand, it is used as a basis for deriving more complex distributions. Bernoulli Distribution can be used to describe events that can only have two outcomes, that is, success or failure. In this article, we will learn about the formula, pmf, CDF, and other aspects of the Bernoulli Distribution.
What is Bernoulli Distribution?
Bernoulli Distribution is a special kind of distribution that is used to model reallife examples and can be used in many different types of applications. A random experiment that can only have an outcome of either 1 or 0 is known as a Bernoulli trial. Such an experiment is used in a Bernoulli distribution.
Bernoulli Distribution Definition
A discrete probability distribution wherein the random variable can only have 2 possible outcomes is known as a Bernoulli Distribution. If in a Bernoulli trial the random variable takes on the value of 1, it means that this is a success. The probability of success is given by p. Similarly, if the value of the random variable is 0, it indicates failure. The probability of failure is q or 1  p. Bernoulli distribution can be used to derive a binomial distribution, geometric distribution, and negative binomial distribution.
Bernoulli Distribution Example
Suppose there is an experiment where you flip a coin that is fair. If the outcome of the flip is heads then you will win. This means that the probability of getting heads is p = 1/2. If X is the random variable following a Bernoulli Distribution, we get P(X = 1) = p = 1/2.
Bernoulli Distribution Formula
A binomial random variable, X, is also known as an indicator variable. This is because if an event results in success then X = 1 and if the outcome is a failure then X = 0. X can be written as X \(\sim\) Bernoulli (p), where p is the parameter. The formulas for Bernoulli distribution are given by the probability mass function (pmf) and the cumulative distribution function (CDF).
Probability Mass Function for Bernoulli Distribution
We calculate the probability mass function for a Bernoulli distribution. The probability that a discrete random variable will be exactly equal to some value is given by the probability mass function. The formula for pmf, f, associated with a Bernoulli random variable over possible outcomes 'x' is given as follows:
PMF = f(x, p) = \(\left\{\begin{matrix} p & if \: x = 1\\ q = 1  p & if \: x = 0 \end{matrix}\right.\)
We can also express this formula as,
f(x, p) = p^{x} (1  p)^{1  x}, x \(\epsilon\) {0, 1}
Cumulative Distribution Function for Bernoulli Distribution
The cumulative distribution function of a Bernoulli random variable X when evaluated at x is defined as the probability that X will take a value lesser than or equal to x. The formula is given as follows:
CDF = F(x, p) = \(\left\{\begin{matrix} 0 & if \: x < 0\\ 1  p & if \: 0 \leq x < 1\\ 1 & x\geq 1 \end{matrix}\right.\)
Mean and Variance of Bernoulli Distribution
The arithmetic mean of a large number of independent realizations of the random variable X gives us the expected value or mean. The expected value can also be thought of as the weighted average. Given below is the proof and formula for the mean of a Bernoulli distribution.
Mean of Bernoulli Distribution Proof:
We know that for X,
P(X = 1) = p
P(X = 0) = q
E[X] = P(X = 1) . 1 + P(X = 0) . 0
E[X] = p . 1 + q . 0
E[X] = p
Thus, the mean or expected value of a Bernoulli distribution is given by E[X] = p.
Variance of Bernoulli Distribution Proof:
The variance can be defined as the difference of the mean of X^{2} and the square of the mean of X. Mathematically this statement can be written as follows:
Var[X] = E[X^{2}]  (E[X])^{2}
Using the properties of E[X^{2}], we get,
E[X^{2}] = \(\sum x^{2}\: P(X=x)\)
E[X^{2}] = 1^{2} . p + 0^{2} . q = p
Substituting this value in Var[X] = E[X^{2}]  (E[X])^{2} we have
Var[X] = p  p^{2}
= p(1  p)
= p . q
Hence, the variance of a Bernoulli distribution is Var[X] = p(1  p) = p . q
Bernoulli Distribution Graph
The graph of a Bernoulli distribution helps to get a visual understanding of the probability density function of the Bernoulli random variable.
The graph shows that the probability of success is p when X = 1 and the probability of failure of X is (1  p) or q if X = 0.
Bernoulli Distribution and Binomial Distribution
Bernoulli distribution is a special case of the Binomial distribution when the number of trials = 1. The difference between Bernoulli distribution and binomial distribution is given below:
Bernoulli Distribution  Binomial Distribtuion 
Bernoulli distribution is used when we want to model the outcome of a single trial of an event.  If we want to model the outcome of multiple trials of an event, Binomial distribution is used. 
It is represented as X \(\sim\) Bernoulli (p). Here, p is the probability of success.  It is denoted as X \(\sim\) Binomial (n, p). Where n is the number of trials. 
Mean, E[X] = p  Mean, E[X] = np 
Variance, Var[X] = p(1p)  Variance, Var[X]= np(1p) 
Example: Suppose the probability of passing an exam is 80% and failing is 20%. Then the Bernoulli distribution can be used to model the passing or failing in such an exam. 
Example: Suppose the probability of passing an exam is 80% and failing is 20%. Then if we want to find the probability that a student will pass in exactly 4 out of 5 exams, we use the Binomial Distribution. 
Bernoulli Distribution Applications
Bernoulli distribution is a simple distribution and hence, is widely used in many industries. Given below are some applications of Bernoulli distribution.
 In medicine, Bernoulli distributions are used to model the events experienced by a single patient. These events could be disease, death, and so on.
 Logistic regressions use Bernoulli distribution to model the occurrence of certain events such as the specific outcome of a dice roll.
 Bernoulli distribution is also used as a basis to derive several other probability distributions that have applications in the engineering, aerospace, and medical industries.
Related Articles:
Important Notes on Bernoulli Distribution
 Bernoulli distribution is a discrete probability distribution where the Bernoulli random variable can have only 0 or 1 as the outcome.
 p is the probability of success and 1  p is the probability of failure.
 The mean of a Bernoulli distribution is E[X] = p and the variance, Var[X] = p(1p).
 Bernoulli distribution is a special case of binomial distribution when only 1 trial is conducted.
Examples on Bernoulli Distribution

Example 1: A basketball player can shoot a ball into the basket with a probability of 0.6. What is the probability that he misses the shot?
Solution: We know that success probability P (X = 1) = p = 0.6
Thus, probability of failure is P (X = 0) = 1  p = 1  0.6 = 0.4
Answer: The probability of failure of the Bernoulli distribution is 0.4 
Example 2: If a Bernoulli distribution has a parameter 0.45 then find its mean.
Solution: X \(\sim\) Bernoulli (p) or X \(\sim\) Bernoulli (0.45).
Mean E[X] = p = 0.45
Answer: Mean = 0.45 
Example 3: If a Bernoulli distribution has a parameter 0.72 then find its variance.
Solution: X \(\sim\) Bernoulli (p) or X \(\sim\) Bernoulli (0.72).
Variance Var[X] = p (1p) = 0.72 (0.28) = 0.2016
Answer: Variance = 0.2016
FAQs on Bernoulli Distribution
What is Bernoulli Distribution in Statistics?
Bernoulli distribution is a discrete probability distribution where the Bernoulli trial will have only 0 (failure) or 1 (success) as its outcome.
What does p Stand for in Bernoulli Distribution?
p is a parameter in the Bernoulli distribution. A Bernoulli distribution can be written as X \(\sim\) Bernoulli (p), where X is the Bernoulli random variable. p represents the probability of getting a success.
Is Bernoulli Distribution a Normal Distribution?
Bernoulli Distribution is not a normal distribution. However, if we conducted a Bernoulli trial multiple times and record the number of successes then we can estimate this probability using the normal distribution.
What are the two Key Characteristics of Bernoulli Distribution?
The two key characteristics of a Bernoulli Distribution are:
 The Bernoulli random variable can only have 2 outcomes: 0, and 1.
 The sum of all the probability values needs to be equal to 1.
How Do You Find the Mean of a Bernoulli Distribution?
The mean or average of a Bernoulli distribution is given by the formula E[X] = p. Thus, we can also say that the parameter p is also the mean.
How to Find the Variance of Bernoulli Distribution?
To find the variance formula of a Bernoulli distribution we use E[X^{2}]  (E[X])^{2} and apply properties. Thus, Var[x] = p(1p) of a Bernoulli distribution.
What is the Difference between Binomial and Bernoulli Distribution?
Bernoulli distribution is a case of binomial distribution when only 1 trial has been conducted. A binomial distribution is given by X \(\sim\) Binomial (n, p). When n = 1, it becomes a Bernoulli distribution.
visual curriculum