Module 3: Distributions · Lesson 3.2 · about 25 min
The binomial: how many of n say yes
The binomial distribution counts yeses in n independent tries with the same chance p: conversions, clicks, defects, survey answers. Its formula, mean and spread, and how to tell when a count is surprising.
Module 3 · about 25 minutes · school maths. You’ll be able to recognise a binomial situation, compute binomial probabilities, its mean and SD, and judge whether a count of yeses is surprising.
In everyday terms: flip a slightly biased coin 10 times and count heads. Conversions, clicks and defects work the same way: each visitor is one flip with chance p of “yes”.
1. Counting yeses
Conversions, clicks, opens, defects, survey “yes” answers: much of an analyst’s data is a count of successes out of a number of tries. When
- there are a fixed number of tries,
- each try is a yes or no,
- each has the same chance of yes,
- tries are independent,
the number of yeses follows a binomial distribution, written .
2. The formula
The chance of exactly yeses:
Read it as: is the chance of one particular pattern with yeses and noes; (Lesson 2.4) counts how many such patterns there are.
Its mean and standard deviation are simple:
Slide up and the bars turn into a bell curve, a preview of Lesson 3.4. A common rule: when both and are at least 10, the normal curve approximates the binomial well. That’s why tests on conversion rates (Lesson 7.5) can use normal maths.
3. Proportions
Analysts usually work with the share of yeses, , rather than the count. Dividing by :
That second formula is the standard error of a proportion. It returns in confidence intervals (Lesson 5.2) and A/B tests (Module 7). Notice the : four times the visitors halves the wobble.
4. When the binomial breaks
- Not independent: one customer making many visits, or friends influencing each other. Count customers, not visits, or expect more spread than the formula says.
- Not the same p: mixing mobile (2 %) and desktop (6 %) traffic gives more variation than a single binomial. Split by segment.
- No fixed n: orders per hour have no “number of tries”. Use the Poisson (Lesson 3.3).
- n
- Number of independent tries (visitors, tickets, units).
- p
- Chance of a yes on each try.
- P(X = k) = nCk · p^k · (1 − p)^(n − k)
- Ways to choose which k say yes × chance of that exact pattern.
- Mean n·p, SD √(n·p·(1 − p))
- Where the count centres and how much it usually wobbles.
- Physical meaning
- The binomial is the shape of "how many said yes" when everyone decides independently. Its SD grows like √n, so the share p̂ = X/n wobbles less as n grows: that is why big samples give steady percentages.
“10 % conversion means exactly 10 of 100 visitors will buy.” Ten is only the centre. With n = 100 and p = 0.1, the SD is 3, so anything from about 4 to 16 buyers is an ordinary day.
Watch it happen, one step at a time:
Maths and principle
Principle: the binomial is the sum of independent yes/no (Bernoulli) variables. Each has mean and variance ; adding of them gives mean and variance (the rules from Lesson 3.1).
Equations: , , .
In code: Excel BINOM.DIST(k, n, p, FALSE) for exactly , TRUE for or fewer; Python scipy.stats.binom.pmf(k, n, p) and .cdf.
Try it: with , , P(exactly 5 heads) = = 252/1,024 ≈ 24.6 %. Even the most likely result happens less than a quarter of the time.
5. Worked example
Made-up numbers. A support team resolves 80 % of tickets on first contact. Of the next 10 tickets, what’s the chance at least 9 are resolved first time?
- P(X = 10) = 0.8¹⁰ ≈ 0.1074.
- P(X = 9) = × 0.8⁹ × 0.2 = 10 × 0.1342 × 0.2 ≈ 0.2684.
- P(X ≥ 9) ≈ 0.1074 + 0.2684 = 0.376, about 38 %.
Mean = 10 × 0.8 = 8 tickets; SD = √(10 × 0.8 × 0.2) = √1.6 ≈ 1.26. So a day with only 6 of 10 resolved (1.6 SDs below the mean) is unlucky but not alarming on its own.
6. Practice
- A 2 % defect rate, batch of 50. What are the mean and SD of the number of defects?
- Using the formula, find P(exactly 0 defects) in that batch.
- 1,000 visitors, true conversion 4 %. Between which two counts will about 95 % of days fall (mean ± 2 SD)?
Answers
- Mean 1; SD √(50 × 0.02 × 0.98) = √0.98 ≈ 0.99.
- 0.98⁵⁰ ≈ 0.364.
- Mean 40; SD √(1,000 × 0.04 × 0.96) = √38.4 ≈ 6.2. From about 28 to 52 conversions.
Try it on your own data: the binomial lab draws any binomial and shades the probability you ask for; the probability distribution explorer handles it alongside the other distributions.
New words: Bernoulli trial, binomial distribution, success probability, sample proportion, standard error of a proportion.
- Binomial: n independent tries, same p, count the yeses.
- P(X = k) = nCk · p^k · (1 − p)^(n − k).
- Mean n·p; SD √(n·p(1 − p)); the share X/n has SD √(p(1 − p)/n).
- It breaks when tries are not independent (one customer, many visits) or p changes.
Check yourself
Sources
- OpenIntro Statistics, 4th edition (Diez, Cetinkaya-Rundel, Barr), Section 4.3 Binomial distribution https://www.openintro.org/book/os/
- NIST/SEMATECH e-Handbook, 1.3.6.6.18 Binomial Distribution https://www.itl.nist.gov/div898/handbook/eda/section3/eda366i.htm
Your ticks stay in this browser. Save them as a file on the course home.
Updated 2026-11-22. Numbers in the examples are made up to show the idea unless a source is given. Simulations run in your browser; nothing you type is sent anywhere.