The Bernoulli and Binomial Distributions
How many heads turn up in 20 flips of a biased coin? This simple question hides one of the most important structures in all of probability. The answer comes from adding up many identical, independent yes/no experiments. This pattern is so common it deserves its own name. At the single-trial level, it is the Bernoulli distribution. At the aggregate level, it is the Binomial distribution. Together they form the arithmetic backbone of discrete probability. Quality control, polling, genetics, network reliability, and randomized algorithms all rely on it. Each of these, at some point, reduces to counting successes among independent trials. The idea matters because it is the first genuine bridge. It connects a single random experiment to a sum of many. Once we understand the Bernoulli variable as the atomic unit of "success or failure," the Binomial distribution follows almost automatically. It emerges as a sum of independent copies. Its mean, variance, and shape can all be derived from that additive structure. They need not be memorized. This is also the first place where the reader sees the payoff of treating a random variable as an object to be manipulated algebraically. It can be added, scaled, and analyzed, rather than just tabulated. The big picture: the Binomial distribution is what you get when independence and identical trial probabilities combine with simple counting (binomial coefficients). It is simultaneously a distribution in its own right and a stepping stone. Its large-, small- limit gives the Poisson distribution. Its structure as a sum of independent, identically distributed pieces makes it the natural first example. This applies for Moment Generating Functions and later the Central Limit Theorem. This article gives the exact definitions of Bernoulli and Binomial random variables. It proves the core theorem that a Binomial variable is a sum of independent Bernoullis. This includes a full derivation of its PMF, mean, and variance. It works through two asymmetric numerical examples. It also shows precisely what breaks when the trials are not independent or not identically distributed.
- A Bernoulli() random variable takes value ("success") with probability and ("failure") with probability .
- A Binomial() random variable counts the number of successes in independent Bernoulli() trials.
- Its PMF is for , derived by counting arrangements.
- Mean and variance add trial-by-trial: , .
- Both independence and a common success probability across trials are essential — drop either and the simple formulas fail.
- Key idea: the Binomial is not a new primitive object — it is literally a sum of independent Bernoulli variables, and every one of its properties inherits from that sum.
Where this lives today
The Bernoulli/Binomial pair is the working model wherever a fixed procedure is repeated independently with a constant success chance. In statistics, estimating an unknown proportion (an election poll, a clinical trial response rate, a defect rate) is modeled as observing a Binomial count and inverting it — the sample proportion is the natural unbiased estimator, with variance derived directly from the theorem above. In reliability engineering, the number of failed components among identical, independently operating units is Binomial, feeding directly into redundancy design (-out-of- systems). In genetics, the number of offspring inheriting a given allele under simple Mendelian independence assumptions is Binomial. In computer science and cryptography, Binomial counting underlies random graph models (Erdős–Rényi , where each of the possible edges is an independent Bernoulli() trial), randomized algorithm analysis (number of "successful" random probes), and hash-collision estimates. In statistical physics, the Binomial distribution is the discrete analogue of a two-state system (e.g., spins that are up/down independently), and its large- behavior (via Poisson and normal limits) connects directly to the emergence of the moment-generating-function machinery used to prove the Central Limit Theorem.
:::quiz[If , what is in terms of and ?]
- ✓
Ask the tutor: How does the Binomial distribution's proof structure foreshadow the moment generating function proof of the Poisson limit?
Let . A random variable has the Bernoulli distribution with parameter , written , if takes values in with
Equivalently, its probability mass function is for . A collection of Bernoulli trials is called a sequence of independent, identically distributed (i.i.d.) Bernoulli() trials if each and are mutually independent random variables (meaning for every choice of ). A random variable has the Binomial distribution with parameters and , written , if
where are i.i.d. trials. Equivalently (as proved below), takes values in with PMF
Intuition
Think of a Bernoulli variable as a single coin flip, possibly with an unfair coin: it is "on" with probability and "off" otherwise, and it carries no memory of any other flip. The Binomial distribution is simply what happens when you flip that same coin times, independently, and tally the total number of heads. The word "independent" is doing real work here: it guarantees that knowing the outcome of flip 3 tells you nothing about flip 7, so the only source of randomness in the total count is the raw combinatorics of which subset of the trials happened to succeed. The binomial coefficient enters because there are exactly that many ways to choose which of the trials are successes; each such arrangement, by independence, has the same probability . This is the essential mental picture: the Binomial PMF is (number of ways to succeed times) (probability of any one specific way). The shape of the distribution — roughly bell-shaped, peaked near , skewed right for small and left for near — is a direct visual consequence of this counting formula.
Let be i.i.d. random variables for some and , and let
Then: 1. (PMF) For every ,
and for . 2. (Mean) . 3. (Variance) .
Part 1: the PMF. We use the technique of partitioning the event by which coordinates succeed. Fix . The event occurs exactly when precisely of the variables equal and the remaining equal . Formally, let range over subsets of size , and define the event
Then
and this union is disjoint: if both have size , then some index lies in one but not the other, so and specify contradictory values at that index and cannot both hold simultaneously. By finite additivity of probability over disjoint events,
By the mutual independence of (part of the hypothesis), for any fixed ,
using that each so , , and this value does not depend on which particular set we chose — only on its size . There are exactly subsets of size (a standard combinatorial fact: choosing elements out of unordered). Hence
Since with each , the sum can only take integer values between and , so automatically for . This proves Part 1. (Sanity check that this is a valid PMF: by the Binomial Theorem, , and each term is nonnegative since , so it is indeed a valid probability distribution.)
Part 2: the mean. We use linearity of expectation, which requires no independence assumption at all — only that expectations of the individual terms exist, which they do since each takes only the values . First compute for a single Bernoulli() variable directly from the definition of expectation for a discrete random variable:
By linearity of expectation (valid for any random variables with finite expectation, dependent or not),
Part 3: the variance. Here we do use independence, via the fact that variance is additive over independent random variables: if are pairwise independent with finite variance, then . We first establish this additivity fact, then apply it. Additivity of variance under independence. For any random variables ,
Expanding and subtracting term by term gives
If are independent, then for discrete random variables,
so the cross term vanishes and . Extending to pairwise-independent variables by induction on (group the first terms, which remain independent of and pairwise independent among themselves, apply the two-variable case to and , then the inductive hypothesis to the first group) gives
Variance of a single Bernoulli() variable. Since (as , and , ),
Hence
Conclusion. Since are (mutually, hence pairwise) independent, additivity of variance gives
This completes the proof of all three parts.
∎Worked examples
Example 1 — asymmetric parameters, direct PMF computation. A factory's inspection line has a defect rate of per unit (i.e., each unit is independently defective with probability ). A quality inspector samples units. What is the probability that exactly units are defective, and what is the expected number of defective units in the sample? Let be the number of defective units among the sampled. Assuming each unit's defect status is an independent Bernoulli() trial (a reasonable model if units are produced independently and sampled without strong correlation), by the sum representation proved above. Using the PMF from Part 1 of the theorem:
Compute each factor:
For : , so , giving . Therefore
So there is about a chance of exactly defective units. By Part 2 of the theorem, the expected number of defective units is
and by Part 3, the variance is
so the standard deviation is . Note that the mean is not one of the more likely outcomes in absolute terms — since is discrete and skewed for small , the mode is actually at — but it correctly represents the long-run average defect count per sample of 15.
Example 2 — comparing two binomials via the sum representation, without recomputing PMFs. Suppose two independent batches are inspected under the same process as above: batch A has units (defect probability each) and batch B has units, same defect probability , inspected independently of batch A. Let be the number of defects in A and the number of defects in B, with independent. What is the distribution of the total number of defects across both batches, and what are its mean and variance? This is exactly where the sum representation earns its keep: rather than treating as some new, unfamiliar object requiring a fresh derivation, we recognize that
where all are i.i.d. (the independent within batch A, the independent within batch B, and the two batches independent of each other by hypothesis). Then
is literally a sum of i.i.d. variables — the independence across the two groups combined with independence within each group gives mutual independence of all variables together (independence of the batches means the joint distribution of and factors, and combined with within-batch independence this factors the joint distribution of all 40 variables into a product of 40 marginals). By the definition of the Binomial distribution as a sum of i.i.d. Bernoulli trials,
Consequently, without any further computation, Parts 2 and 3 of the theorem give
As a check, additivity of expectation and (independent) variance directly gives the same numbers: (since ), and . This illustrates the general fact — provable the same way — that (independent, common ) is .
The theorem requires the trials to be identically distributed — the same success probability for every trial — not merely independent. Drop this and the clean Binomial PMF formula fails. Consider independent trials with different success probabilities: and , independent. Let . Since are still independent, the disjoint-partition argument in Part 1 of the proof still applies structurally, but the probability of any particular configuration is no longer the same across configurations with the same number of successes. Concretely:
If we had (incorrectly) applied the Binomial formula with, say, an "average" and , we would predict , , — utterly wrong compared to the true values . The distribution of here is called Poisson-binomial, not Binomial, precisely because the per-trial probabilities differ. The mean is still additive, , matching with by coincidence of this symmetric example — but the variance is not: , whereas a true would have variance . This shows identical distribution across trials is not a technical nicety but is essential to both the PMF and second-moment formulas.
Scope, edge cases & common traps
| Situation | What holds | What can fail | |
|---|---|---|---|
| or | is degenerate ( or ); formulas still valid (variance ) | Binomial coefficient formula still technically correct but distribution is trivial | |
| Independent, common | Full theorem applies: PMF, mean , variance | — | |
| Independent, varying | Mean still (linearity always holds); variance still additive | PMF is not Binomial — it is Poisson-binomial (see counterexample) | |
| Dependent trials, common | Marginal mean per trial still , so still holds (linearity needs no independence) | Variance formula generally fails; PMF is not Binomial | |
| Sampling without replacement from a finite population | — | Trials are dependent (not independent) — correct model is [[Hypergeometric distribution | Hypergeometric]], not Binomial |
| Large , small , moderate | Binomial PMF is well approximated by [[The Poisson Distribution | Poisson]] | Approximation, not equality — needs large and small jointly |
The mathematician behind it
Origins · 1 minJacob Bernoulli and how this was discovered
Jacob (Jakob/James) Bernoulli was a member of the remarkable Bernoulli family of mathematicians in Basel. He is best known in probability for his posthumously published treatise Ars Conjectandi (1713), which contains the first rigorous treatment of what we now call Bernoulli trials and a proof of an early version of the Law of Large Numbers (the "Golden Theorem," today called Bernoulli's theorem). He also made foundational contributions to calculus, the calculus of variations, and the theory of series, and the number appears in his work on compound interest.
Is the Bernoulli distribution just a special case of the Binomial distribution?
Yes: is exactly . Setting in the PMF gives at and at , which is precisely the Bernoulli PMF. Conceptually, the Bernoulli distribution is the "atomic" building block — a single trial — while the Binomial distribution describes the aggregate outcome of such atoms combined by independent summation. Every theorem about the Binomial distribution can, and in this article does, get proved by first establishing facts about the underlying Bernoulli pieces (mean , variance ) and then using linearity of expectation and additivity of variance under independence to lift those facts to the sum.
Why does the Binomial PMF involve a binomial coefficient specifically, and not some other count?
The binomial coefficient counts the number of ways to choose which of the trials are the "successful" ones, treating the trials as distinguishable but the successes among them as an unordered subset. In the proof, the event is partitioned into disjoint events , one for each subset of size specifying exactly which trials succeed. Because the trials are independent and identically distributed, every such subset contributes the same probability , so the total probability is just that common value multiplied by the number of subsets, . If trials were not identically distributed, different subsets would contribute different probabilities and no single binomial coefficient could summarize the count — this is exactly the failure mode illustrated in the counterexample block.
How are the mean and variance formulas and actually used in practice?
They give instant summary statistics without ever writing out the full PMF. For instance, if models defective items in a large shipment, you immediately know the expected number of defects is and the standard deviation is , letting you assess whether an observed count (say defects) is unusually high without ever summing terms of the PMF. These two numbers are also the inputs to normal or Poisson approximations to the Binomial, and is the variance of the sample proportion , the workhorse quantity in confidence intervals for proportions.
Does the Binomial theorem require the number of trials to be random or fixed?
Fixed. The entire construction — the sum , the combinatorial count , and the proof of the PMF — presupposes that is a deterministic, known constant chosen in advance, not a random stopping time. If instead you flip a coin until you observe a fixed number of successes and count the trials needed, you get the (different) Negative Binomial distribution; if you flip until the first success, you get the Geometric distribution. Both are built from the same Bernoulli atoms but organized around a random rather than fixed number of trials, so their PMFs and proofs differ from the one given here even though Bernoulli trials remain the common ancestor.
What goes wrong if trials are sampled without replacement from a finite population?
Independence fails. If you draw balls without replacement from an urn with a finite number of red and non-red balls, learning that the first draw was red changes the probability that the second draw is red, because one red ball has been removed from the urn. The trials are then dependent, violating a hypothesis of the theorem, and the correct distribution for the number of red balls drawn is the Hypergeometric distribution, not the Binomial. However, if the population is very large relative to the sample size, removing a few items barely changes the remaining proportions, and the Hypergeometric distribution is well approximated by the Binomial — this is why survey sampling from a large population is often modeled as (approximately) Binomial even though sampling without replacement is technically dependent.
How does the Binomial distribution connect to the Poisson distribution?
When is large and is small in such a way that stays roughly constant (a "rare events, many trials" regime), the Binomial PMF converges term-by-term to the Poisson PMF . This is a genuine limiting theorem, not a coincidence: it reflects that a Poisson process can be thought of as the limit of many independent, individually-unlikely Bernoulli trials packed into a fixed interval. This connection is typically the very next construction built on top of the material in this article, since it requires nothing more than careful limit-taking in the Binomial PMF formula proved here.
Why does variance require independence but the mean formula does not?
Linearity of expectation, , is an algebraic identity about integrals (or sums, in the discrete case) that holds unconditionally — it never uses independence, only that each expectation exists. Variance, by contrast, expands as , and the covariance cross-terms vanish precisely when are independent (since then ). Without independence, these cross terms can be positive or negative and generally do not cancel, so the simple formula can fail even though still holds — exactly the asymmetry noted in the scope table above.