![]() |
VOOZH | about |
The Bernoulli Distribution is one of the most basic probability models used in statistics. It is designed to analyze situations where there are only two possible outcomes, such as success or failure, yes or no, profit or loss. This makes it extremely useful in business analytics because many real world decisions and performance metrics can be simplified into binary results.
It is based on the following assumptions:
A Bernoulli trial is a single experiment that results in only two possible outcomes: success (1) or failure (0). Each trial has a probability of success p and a probability of failure q = 1-p. A Bernoulli Distribution models the outcome of one such Bernoulli trial. In other words, the distribution provides the probability structure for a single success/failure experiment.
Examples
The Bernoulli Distribution is represented by a discrete probability graph with only two possible values on the horizontal axis: 0 and 1. Since the random variable can take only these two outcomes, the graph contains exactly two vertical bars (or spikes).
The Bernoulli Distribution formula is used to describe the probability of two possible outcomes:
It is written as:
where:
The PMF gives the probability that the random variable takes a specific value (0 or 1).
Here,
The CDF gives the probability that the random variable is less than or equal to a specific value.
Here: The CDF increases in steps because a Bernoulli variable can take only two values: 0 and 1.
Find the probability of getting heads (success) on flipping a fair coin.
Solution: Let X represent the outcome of the coin toss.
X = 1 if heads, X = 0 if tails.
p (probability of success) is 0.5 for a fair coin and q (probability of failure) = 1 - p is 0.5
p = 0.5.
The mean of a Bernoulli distribution, also called the expected value, represents the long run average outcome of repeated independent trials. Since a Bernoulli variable takes only two values 1 (success) and 0 (failure), its mean is simply the probability of success.
In simple terms, if the probability of success is = 0.5, then over many trials the average outcome will approach 0.5. The mean directly reflects how likely success is in a single trial.
For a Bernoulli random variable :
The expected value (mean) is calculated by multiplying each outcome by its probability and adding them:
Final Result:
Variance measures how much the two possible outcomes (0 and 1) deviate from the mean. For a Bernoulli distribution, the variance is , meaning it depends entirely on the probability of success and failure . Variability is highest when = 0.5, because success and failure are equally likely. When is close to 0 or 1, variability is low since the outcome becomes more predictable.
We start with the variance formula:
Since a Bernoulli variable takes only 0 and 1, we have:
Substituting the values in variance formula we get variance:
The standard deviation is the square root of the variance and measures the average spread of outcomes around the mean in the original scale of the variable.
Since the variance of a Bernoulli Distribution is , the standard deviation is:
Here, we set the value of p=0.6. This means:
Output:
PMF Values: [0.4 0.6]
Output:
Output:
You can download the full code from here
The Bernoulli Distribution is widely used in business because many real world outcomes are binary (yes/no, success/failure). Some key applications include:
The Bernoulli Distribution and the Binomial Distribution are both used to model random experiments with binary outcomes, but they differ in how they handle multiple trials or repetitions of these experiments.
Bernoulli Distribution | Binomial Distribution | |
|---|---|---|
Number of Trials | Single trial | Multiple trials |
Possible Outcomes | 2 outcomes (0 or 1) | Multiple outcomes (0, 1, 2, ..., n successes) |
Parameter | Probability of success p | Number of trials n and probability p |
Random Variable | Indicates success (1) or failure (0) | Counts total number of successes |
Purpose | Describes single trial events with success/failure. | Models the number of successes in multiple trials. |
Example | Single coin toss, Pass/Fail | Number of heads in 10 tosses, Defective items in a batch |