All lessons

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.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

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.

When n independent people each say yes with the same chance p, the number of yeses follows the binomial distribution, centred on n·p.

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

  1. there are a fixed number n of tries,
  2. each try is a yes or no,
  3. each has the same chance p of yes,
  4. tries are independent,

the number of yeses X follows a binomial distribution, written X∼Bin(n,p).

2. The formula

The chance of exactly k yeses:

P(X=k)=(nk)pk(1−p)n−k

Read it as: pk(1−p)n−k is the chance of one particular pattern with k yeses and n−k noes; (nk) (Lesson 2.4) counts how many such patterns there are.

Its mean and standard deviation are simple:

μ=npσ=np(1−p)
Try it: how many of n say yes?
P(X ≥ k)
mean np
standard deviation √(np(1−p))
Each bar is the chance that exactly that many of the n people say yes, if each decides independently with the same chance p. Highlighted bars add up to "at least k". With n = 20 and p = 0.2 you expect 4 yeses, and 7 or more happens only about 1 time in 10, so seeing 7 is a little surprising but not shocking.

Slide n up and the bars turn into a bell curve, a preview of Lesson 3.4. A common rule: when both np and n(1−p) 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, pˆ=X/n, rather than the count. Dividing by n:

E[pˆ]=pSD(pˆ)=p(1−p)n

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 n: 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:

The setup. 80 % of tickets are resolved first time. Next 10 tickets: chance at least 9 are?
All 10. 0.8¹⁰ ≈ 0.107.
Exactly 9. Which one fails? 10 ways. Each way: 0.8⁹ × 0.2. Total 10 × 0.134 × 0.2 ≈ 0.268.
Add. P(at least 9) ≈ 0.107 + 0.268 = 0.376, about 38 %.
Centre and wobble. Mean 10 × 0.8 = 8; SD √1.6 ≈ 1.26. A day with 6 of 10 is 1.6 SDs low: unlucky, not alarming.
Maths and principle

Principle: the binomial is the sum of n independent yes/no (Bernoulli) variables. Each has mean p and variance p(1−p); adding n of them gives mean np and variance np(1−p) (the rules from Lesson 3.1).

Equations: P(X=k)=(nk)pk(1−p)n−k, μ=np, σ2=np(1−p).

In code: Excel BINOM.DIST(k, n, p, FALSE) for exactly k, TRUE for k or fewer; Python scipy.stats.binom.pmf(k, n, p) and .cdf.

Try it: with n=10, p=0.5, P(exactly 5 heads) = (105)/210 = 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) = (109) × 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

  1. A 2 % defect rate, batch of 50. What are the mean and SD of the number of defects?
  2. Using the formula, find P(exactly 0 defects) in that batch.
  3. 1,000 visitors, true conversion 4 %. Between which two counts will about 95 % of days fall (mean ± 2 SD)?
Answers
  1. Mean 1; SD √(50 × 0.02 × 0.98) = √0.98 ≈ 0.99.
  2. 0.98⁵⁰ ≈ 0.364.
  3. 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

1Which situation is binomial?
2n = 400 visitors, p = 0.05. What are the mean and SD of the number who buy?
3A campaign usually converts 5 % of 400 visitors (mean 20, SD about 4.4). Today 32 bought. Is that unusual?

Sources

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.