Probability Distributions: Bernoulli & Binomial
Bernoulli and Binomial Random Variables
Bernoulli Random Variable
A Bernoulli random variable is the simplest possible random variable. It models a single trial with exactly two outcomes: success or failure.
The variable X can only take two values: 0 (failure) or 1 (success).
The probability of success is denoted by p, so P(X=1)=p.
The probability of failure is q=1−p, so P(X=0)=1−p=q.
The range of X is {0,1}.
Definition: A Bernoulli random variable X has P(X=1)=p and P(X=0)=1−p, where 0≤p≤1. The two outcomes are often called “success” and “failure.”
Common Examples
Coin flip: Let success = heads. For a fair coin, p=21.
Dice roll: Let success = rolling a six. Then p=61.
Manufacturing: Let success = a good part. Then p is the probability that a part is good.
Binary mask in computing: A matrix of independent Bernoulli random variables can randomly black out pixels in an image.
In every case, the event of interest is defined by the problem, and p may be any number between 0 and 1 — it does not have to be 21.
Binomial Random Variable
A binomial random variable arises when we perform n independent Bernoulli trials and count the total number of successes.
Let B1,B2,…,Bn be independent Bernoulli random variables, each with the same success probability p.
Define X=B1+B2+⋯+Bn.
Then X is a binomial random variable with parameters n (number of trials) and p (probability of success on each trial).
Notation: X∼Binomial(n,p) means X follows a binomial distribution with n trials and success probability p.
Probability Mass Function
The probability of observing exactly k successes in n independent Bernoulli trials is:
Explanation of the formula:
(kn) counts the number of ways to arrange k successes among n trials (combinatorial factor).
pk is the probability that those k specific trials are successes.
qn−k is the probability that the remaining n−k trials are failures.
Because the trials are independent, the probabilities multiply.
This formula is a direct consequence of the binomial theorem: (p+q)n=∑k=0n(kn)pkqn−k=1, which confirms that the probabilities sum to one.
Examples and Verification
Small Case: n=2
Compute all probabilities for X∼Binomial(2,p).
k=0: Only way is both failures. P(X=0)=q⋅q=q2.
k=1: Two orders: (success, failure) or (failure, success). P(X=1)=pq+qp=2pq.
k=2: Both successes. P(X=2)=p⋅p=p2.
Check that the probabilities sum to one:
The coefficients 1,2,1 are the third row of Pascal’s triangle.
Small Case: n=3 (Recommended Exercise)
For n=3, the probabilities are:
P(X=0)=q3
P(X=1)=3pq2 (three ways: success on first, second, or third trial)
P(X=2)=3p2q
P(X=3)=p3
The coefficients 1,3,3,1 come from Pascal’s triangle. Verify that these sum to (p+q)3=1.
Larger Example: 12 Dice Rolls
Let success = rolling a six on a fair die. Then p=61, q=65, and n=12. Define X as the number of sixes in 12 rolls. Then X∼Binomial(12,61).
The probability of exactly three sixes is:
This value can be computed with a calculator or software. The formula is far simpler than enumerating all 212 possible sequences.
Limiting Behavior: Approximations for Large n
For large n, the binomial distribution can be approximated by two other classic distributions, depending on the values of np and nq.
Normal Approximation
If np and nq are both sufficiently large (say, both ≥5), then the binomial distribution is well approximated by a normal distribution with:
Mean: μ=np
Standard deviation: σ=npq
This is a direct consequence of the Central Limit Theorem. The binomial distribution’s shape becomes symmetric and bell‑shaped as n grows.
Poisson Approximation
If np is small (rare events) or nq is small (rare failures), the binomial distribution is well approximated by a Poisson distribution with parameter λ=np (when p is small) or λ=nq (when q is small, redefining success). More precisely, if n is large and p is small, then:
The Poisson distribution is useful for modeling the number of occurrences of rare events in a large number of independent trials.
These two limiting cases (normal and Poisson) will be studied in detail in subsequent lectures.
Key takeaway: The Bernoulli and binomial distributions form the foundation for many real‑world models, from coin flips and quality control to the normal and Poisson distributions that arise from their large‑sample limits.

Ask anything
We've read this whole study set, so questions about it get the best answers.