Skip to content

Cheatsheet: Counts and trials: the binomial distribution

The binomial distribution counts successes in n independent yes-or-no trials with a constant success probability p. It answers “how many out of N.”

1. Fixed number of trials, n.
2. Two outcomes per trial (success/failure) -- a single trial is a Bernoulli trial.
3. Constant success probability, p.
4. Independent trials.
If p drifts or trials interact (e.g. drawing without replacement), it is NOT binomial.
P(exactly k) = C(n, k) x p^k x (1 - p)^(n - k)
C(n, k) ways to arrange k successes among n trials ("n choose k")
p^k probability of the k successes
(1-p)^(n-k) probability of the (n-k) failures
3 coin flips, exactly 2 heads: C(3,2) x 0.5^2 x 0.5^1 = 3 x 0.125 = 3/8
Model 80% accurate, exactly 4 of 5 correct: C(5,4) x 0.8^4 x 0.2 = 5 x 0.4096 x 0.2 = 0.41
E[X] = n x p 5 predictions at 80% -> 4 expected; 100 visitors at 3% -> 3 sign-ups
Var(X) = n x p x (1-p) (largest near p = 0.5)
The formula gives EXACTLY k.
"At least k" -> sum P(k) + P(k+1) + ... + P(n).
"At least one" -> 1 - P(zero) = 1 - (1 - p)^n (the complement, far easier).
  • Accuracy = correct predictions out of n test examples (a binomial count -> small test sets are noisy).
  • Conversion / click rates: sign-ups out of visitors, clicks out of impressions.
  • Large n: the binomial smooths toward the normal (the central limit theorem, next phase).
  • Using the binomial when the four conditions fail (dependent trials, drifting p).
  • Confusing “exactly k” with “at least k.”
  • Dropping the C(n,k) factor (counts only one arrangement; badly undercounts).
  • Treating n x p as guaranteed (it is a long-run average).
  • Bernoulli trial: a single yes/no trial with success probability p.
  • Binomial distribution: the count of successes in n independent Bernoulli trials.
  • C(n, k): “n choose k,” the number of ways to pick which k trials succeed.
  • n x p: the expected number of successes.