Learn
Lesson · Discrete Probability · Distributions

Bernoulli Trials and the Binomial Distribution

n independent trials, each succeeding with probability p. The number of successes has P(X = k) = C(n,k)p^k(1−p)^{n−k}, mean np and variance np(1−p).

P(X = k) = C(n,k) pᵏ (1−p)ⁿ⁻ᵏ E[X] = np Var(X) = np(1−p) requires: FIXED n, INDEPENDENT trials, CONSTANT p
The most-used discrete distribution

Core ideas

What this lesson establishes

Three assumptions define it. When they hold the formula applies exactly; when they do not it can be badly wrong.

1

The coefficient counts the positions

C(n,k) is the number of ways the k successes can be arranged, and p^k(1−p)^{n−k} is the probability of any one such arrangement.

2

The mean is np by linearity

Write X as a sum of n indicators each with expectation p. No summation over the distribution is needed.

3

The assumptions are the fragile part

Fixed n, independent trials, constant p. Sampling without replacement violates the last two and needs the hypergeometric distribution instead.

The material

The binomial distribution

Derivation, moments, and where the assumptions fail.

Definition · Bernoulli trial

A single experiment with two outcomes, success with probability p and failure with probability 1 − p. Its indicator has mean p and variance p(1−p).

Theorem · Binomial distribution

If X counts the successes in n independent Bernoulli trials each with probability p, then P(X = k) = C(n,k)p^k(1−p)^{n−k} for k = 0, …, n.

One particular sequence with k successes and n − k failures has probability p^k(1−p)^{n−k}, by independence.

The number of such sequences is the number of ways to choose which k trials succeed, which is C(n,k).

The sequences are disjoint events, so the sum rule gives the product.

□

The distribution sums to 1 by the binomial theorem of “The Binomial Theorem” in Combinatorics and Counting: Σ_k C(n,k)p^k(1−p)^{n−k} = (p + (1−p))ⁿ = 1. That is the theorem doing genuine work, not an analogy.

Theorem · Mean and variance

E[X] = np and Var(X) = np(1−p).

Write X = I₁ + ⋯ + I_n with Iⱼ indicating success on trial j. Then E[X] = Σ E[Iⱼ] = np by linearity — no independence needed for this step.

For the variance, independence IS needed: Var(X) = Σ Var(Iⱼ) = np(1−p), since each indicator has variance p(1−p).

□

The variance is largest at p = 1/2, where it is n/4, and vanishes at p = 0 and p = 1. That is exactly right: a trial that always succeeds or always fails has no spread.

Example · Ten coin flips

n = 10, p = 1/2. P(exactly 5 heads) = C(10,5)/2¹⁰ = 252/1024 ≈ 0.246. Slightly under a quarter, which surprises people who expect the most likely value to be likely.

Example · Quality control

A process produces 2% defectives. In a batch of 100, E[defects] = 2 and P(no defects) = 0.98¹⁰⁰ ≈ 0.133. So about one batch in eight is clean.

Where the assumptions fail

  • Sampling without replacement. Drawing 5 cards from a deck, the probability of an ace changes with each draw. The correct distribution is hypergeometric; the binomial is an approximation that is good when the sample is small relative to the population.
  • Dependent trials. Weather on consecutive days is not independent, so counting rainy days with a binomial understates the chance of long runs.
  • Varying p. If the success probability drifts, the distribution is not binomial even though the trials are independent.

The failure mode is characteristic: the mean stays about right while the variance is wrong, usually understated. That makes the extremes far more likely than the model predicts, which is precisely where a wrong model does damage.

Interactive

Distribution, expectation, variance

Definition first, formula second

Distribution
P(X = k)E[X]

Method

Applying the binomial

Check the three assumptions before using the formula.

1

Confirm n is fixed in advance

If the number of trials depends on the results, this is not a binomial — “The Geometric Distribution and Waiting Times” handles the commonest such case.

2

Confirm the trials are independent

Sampling without replacement is the standard violation, and it matters when the sample is a substantial fraction of the population.

3

Confirm p is constant

Same probability every trial. Drift breaks the model even when the trials are independent.

4

Then compute

C(n,k)p^k(1−p)^{n−k} for a single k, or sum over a range for "at least" questions — often via the complement.

Binomial

Score 0 / 0

A multiple-choice test

20 questions, 4 options each, answered at random. n = 20, p = 1/4.

E[X] = 20 × 0.25 = 5 Var(X) = 20 × 0.25 × 0.75 = 3.75, σ ≈ 1.94 P(exactly 5) = C(20,5)(0.25)⁵(0.75)¹⁵ ≈ 0.2023 P(at least 10) = 1 − P(X ≤ 9) ≈ 1 − 0.9861 = 0.0139 So passing at 50% by guessing happens about once in 72 attempts. Note 10 is about 2.6σ above the mean; Chebyshev would only guarantee ≤ 1/2.6² ≈ 15%, and the true answer is 1.4%.

The comparison with Chebyshev is worth noticing. The general bound is correct and roughly ten times too generous, which is the usual situation: distribution-free bounds are safe and loose, and knowing the distribution buys precision.

Common mistakes

1
Using it for sampling without replacementThe trials are dependent. When the sample is a small fraction of the population the error is small; when it is not, it is large.
2
Forgetting the binomial coefficientp^k(1−p)^{n−k} is the probability of ONE arrangement. C(n,k) counts them.
3
Assuming the mean is the likely valueP(X = np) shrinks like 1/√n. At n = 100, p = 1/2, the chance of exactly 50 heads is about 8%.

Check your understanding

✓
Finish when you check the three assumptions first.

For each of: coin flips, cards drawn without replacement, defects in a production run, and rainy days in a week — say which of the three assumptions hold and whether the binomial applies.

Note: For large n the binomial is well approximated by the normal distribution, and for large n with small np by the Poisson. Both are continuous-probability topics; what matters here is that the exact formula is computable and the approximations exist because it becomes unwieldy.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.