Flip a fair coin ten times. How many heads should you get? Five, obviously. But how often do you really get exactly five? Less than a quarter of the time. That small surprise is the doorway into one of the most useful ideas in all of statistics, and it is the same idea a factory uses to decide whether to ship a batch of phone chargers.
Why I still start every probability class with a coin
I have spent a lot of years explaining probability to engineers, analysts, nurses, marketers and one very patient group of warehouse supervisors. Every time, I start with a coin, and every time somebody looks slightly insulted. A coin? Really? But a coin is the cleanest possible laboratory. Two outcomes, no hidden moving parts, a probability everyone already believes. Once the coin makes sense, you can swap the word “heads” for “defective charger” or “customer clicked” or “seed sprouted” and the maths does not change at all.
That swap is the whole story of the binomial distribution. It is the tool for counting successes when you repeat the same yes-or-no event a fixed number of times. It answers questions like these:
- If I flip a coin 10 times, what is the chance of exactly 4 heads?
- If 5% of chargers are faulty and I test 20, how likely is it that I find none?
- If a shooter makes 80% of free throws, how likely is a perfect night?
- If I email 200 people and 5% usually click, is 15 clicks luck or a real improvement?
By the end of this article you will be able to answer all four, by hand if you want, and you will know when the answer can be trusted and when it cannot. We will move from coin flips to quality control, then into free throws, exam guessing, email campaigns and airline overbooking. There is a small interactive panel, a few graphics, a quiz and an FAQ at the end.
The one-sentence definition. The binomial distribution gives the probability of getting exactly k successes in n independent yes-or-no trials, when each trial has the same probability p of success.
Three letters do all the work: n for how many trials, p for the chance of success on each one, and k for the number of successes you are asking about.
Is my situation actually binomial? The four checks
Before you use any formula, check that the situation qualifies. Skipping this step is the number one source of bad statistics I have seen in reports over the years. The formula will happily give you a number even when the setup is wrong. A wrong setup just gives you a confident wrong number.
You decide the number of trials in advance. Ten flips, twenty chargers, two hundred emails. Not “keep going until something happens.”
Each trial is a success or a failure. Heads or tails, defective or fine, clicked or ignored. “Success” just means the thing you are counting, even if it is bad news.
One trial does not change the next. A coin has no memory. A charger coming off the line does not care about the one before it.
The probability of success is the same every single time. If p drifts, the pattern breaks.
A quick habit that helps: say the four conditions out loud about your problem. “I have 20 chargers, each is defective or not, one charger does not affect another, and the defect rate is 5% for all of them.” If any sentence makes you hesitate, stop and think before calculating.
The coin flip: building the idea from scratch
Let us take the smallest interesting case. Flip a fair coin 4 times and ask for exactly 2 heads. Each flip is independent and heads has probability 0.5, so any particular sequence of four flips has probability 0.5 × 0.5 × 0.5 × 0.5 = 1/16.
Now the key question: how many different sequences contain exactly two heads? Here they are all.
| Sequence | Sequence | Sequence |
|---|---|---|
| HHTT | HTHT | HTTH |
| THHT | THTH | TTHH |
There are six. Each has probability 1/16, and they cannot happen together, so we add them: 6 × 1/16 = 6/16, which is 37.50%. That is the entire logic of the binomial distribution. Count the ways, then multiply by the probability of each way.
Listing sequences works for four flips. For twenty flips you would need over a million lines. So mathematicians invented a shortcut for the counting part, and it has a friendly name: “n choose k.”
Counting the ways with Pascal’s triangle
The number of ways to choose k successes among n trials is written C(n, k). You can compute it with factorials, but there is a prettier way. Each number in Pascal’s triangle is the sum of the two numbers above it, and row n, position k gives C(n, k). The highlighted circle below is C(4, 2) = 6, our six coin sequences.
Notice how the numbers rise toward the middle of each row. There are far more ways to get a balanced result than an extreme one. Only one sequence gives 4 heads out of 4 (HHHH), but six give 2 heads out of 4. That simple fact is why the middle of the binomial chart is always the tallest for a fair coin.
The formula, one piece at a time
People stare at this and feel intimidated. Do not. It is three pieces you already understand:
- C(n, k) counts how many different orders produce exactly k successes.
- pk is the probability that k particular trials all succeed.
- (1 − p)n − k is the probability that all the remaining trials fail.
Worked example: exactly 5 heads in 10 fair flips
Here n = 10, k = 5, p = 0.5. Then C(10, 5) = 252. Each specific sequence has probability 0.510 = 1/1024. So the probability is 252/1024, which is 24.6%. Not quite one in four. Most people guess it is closer to half, because “five is the average.” The average is five, but the exact value of five is only one of eleven possible outcomes competing for probability.
Look at the tails of that chart. Zero heads or ten heads each has a probability of 0.10%, about one in a thousand. Meanwhile, getting between 4 and 6 heads happens 65.6% of the time, and 8 or more heads happens 5.5% of the time. A run of 8 heads out of 10 is unusual, but it is not a miracle. I tell people that if they never see it once in a while, the coin is the strange one.
Quality control: the same maths on a factory floor
Now change the story. A company buys phone chargers from a supplier who says the defect rate is 5%. The receiving team pulls 20 chargers from a shipment and tests them. Is this binomial? Fixed n (20), two outcomes (defective or fine), independent units, and a constant defect rate. Yes, with the usual caveat that we treat a large shipment as if each pick is independent.
Here, “success” means “defective”. That trips people up. Success is just the thing we count. So n = 20, p = 0.05, and we can produce the whole table of outcomes.
| Defects found | Exactly this many | This many or fewer | Plain-English meaning |
|---|---|---|---|
| 0 | 35.85% | 35.85% | The perfect batch. Happens a bit over a third of the time. |
| 1 | 37.74% | 73.58% | One bad unit, by far the most common surprise. |
| 2 | 18.87% | 92.45% | Two bad units. Still ordinary luck. |
| 3 | 5.96% | 98.41% | Three or more starts to raise eyebrows. |
| 4 | 1.33% | 99.74% | Rare enough to make a supervisor walk over. |
| 5 | 0.22% | 99.97% | Very rare. Worth checking the line. |
| 6 | 0.03% | 100.00% | Something has probably changed on the line. |
Read that chart carefully because it corrects two common instincts. First, a defect-free sample happens only 35.8% of the time, even though the supplier really is at 5%. Finding zero defects in 20 does not prove the supplier is perfect. Second, finding one defect (37.7%) is just as likely as finding none. Three or more defects has probability 7.55%, so if that happens you have a real reason to call the supplier.
The “at least one” shortcut every analyst should know
Suppose your manager asks, “What is the chance we see at least one defective charger?” Do not add up 20 terms. Use the complement: P(at least one) = 1 − P(none). Here, that is 1 − 0.9520 = 64.2%. Nearly two in three samples of 20 contain at least one bad unit, even at a healthy 5% rate. It is one of the most useful tricks in the whole subject, and it works for any “at least one” question.
The wrong shortcut goes: 20 chargers × 5% each = 100%, so we are sure to find one. Nope. Percentages of different events do not simply add up unless the events cannot overlap, and here they can.
Mean and standard deviation: what to expect and how far off you can be
The binomial distribution has two beautifully simple summary numbers.
For 10 fair coin flips, the mean is 5 and the standard deviation is √(10 × 0.5 × 0.5) = 1.58. For 20 chargers at 5% defect, the mean is 1 and the standard deviation is 0.97. So you expect about one defect, plus or minus one. That explains the chart above, where 0, 1 and 2 defects are all perfectly normal.
When I coach new analysts, I ask them to memorise this rule: the mean tells you what to expect, the standard deviation tells you how surprised to be. A result within about two standard deviations of the mean is ordinary luck. A result far beyond that deserves an investigation.
Five real situations, one formula
Below is a small panel. Tap a tab to switch situations. It runs on plain HTML and CSS, so it works anywhere the article does. In each case, I ran the exact numbers so you can see the formula do real work.
Free throws
A basketball player who makes 80% of her free throws takes 10 shots tonight. Each shot is a trial, made or missed. Assume shots do not affect each other and her skill is the same on every attempt.
What the formula says. The chance she hits exactly 8 is 30.2%. That is the single most likely result, yet it is well under one in three. The chance she hits 8 or more is 67.8%. The chance of a perfect 10 for 10 is only 10.7%. This is why commentators gush over a flawless night from an 80% shooter: it happens about one game in nine, not every game.
Guessing on a test
A quiz has 10 multiple-choice questions with four options each. A student who has not studied guesses every answer. Each guess is right with probability 0.25.
What the formula says. Reaching 5 or more correct by pure luck has probability 7.8%. Reaching 7 or more drops to 0.35%. Guessing gets you a couple of right answers most of the time, but it will almost never get you a pass mark. That is exactly why test designers use enough questions and enough options.
Email campaign
You send a newsletter to 200 people. Historically 5% click the main link. Every recipient is a trial, click or no click.
What the formula says. You expect about 10 clicks, give or take 3. The chance of 15 or more clicks is 7.8%. The chance of 5 or fewer is 6.2%. When a colleague announces that the new subject line ‘doubled’ clicks after a send of 200 people, this calculation is the polite way to say it might just be noise.
Seed germination
A packet says 90% of seeds germinate. You plant 12. Each seed either sprouts or it does not.
What the formula says. All 12 sprouting has probability 28.2%. Ten or more sprouting has probability 88.9%. And 8 or fewer, the case where you would feel cheated, has probability 2.6%. A packet can be perfectly honest and still leave you with a gap in the row.
Airline overbooking
An airline sells 105 tickets for a 100-seat plane. Each passenger shows up with probability 0.90, independently. A bump happens only if 101 or more show up.
What the formula says. On average 94.5 people show up, which leaves the plane comfortably under capacity. The chance that 101 or more arrive is 1.7%. That small number is the whole business logic of overbooking. Real airlines use richer models, since families travel together and are not independent, but the binomial gives the first honest estimate.
Notice the pattern. In every tab the mean tells a comforting story (8 baskets, 10 clicks, 10.8 sprouts), but the interesting decisions live in the details of the spread. The exact result is rarely the average result. That is not a flaw of the model. It is the model working as intended.
How the shape changes with p
A fair coin gives a symmetric, hill-shaped chart. But change p and the hill slides sideways. When p is small, successes are rare and the pile of probability sits near zero. When p is large, it sits near n. Only p = 0.5 gives perfect symmetry. The three charts below all use n = 10.
Here is a practical reading of those pictures. A left-leaning chart (p = 0.1) tells you that “zero” and “one” are the typical answers, and that seeing four or five is a real signal. A right-leaning chart (p = 0.9) is the mirror image. If you understand one, you understand the other by swapping the words “success” and “failure”.
Acceptance sampling: how factories really use it
Let me show you the most valuable use of this distribution in industry. Testing every unit is expensive, and sometimes destructive (you cannot crash-test every car). So companies test a sample and use a rule. A classic example: test 20 units; accept the lot if you find at most 1 defective, otherwise reject.
The natural question is how good this rule is. It depends on the true defect rate of the lot, which nobody knows. But the binomial lets us compute the acceptance probability for each possible defect rate.
| True defect rate | Lot accepted | Meaning |
|---|---|---|
| 1% | 98.3% | Excellent lot, nearly always accepted |
| 2% | 94.0% | Good lot, still usually accepted |
| 5% | 73.6% | Borderline, accepted about 3 times in 4 |
| 10% | 39.2% | Poor lot, still accepted about 2 times in 5 |
| 15% | 17.6% | Bad lot, accepted about 1 time in 6 |
| 20% | 6.9% | Very bad lot, accepted only about 1 time in 14 |
This is a real piece of quality engineering, called an operating characteristic curve. Read it like a report card on your inspection rule. A 1% defective lot is accepted 98% of the time, which is good for the supplier. A 5% lot is accepted 74% of the time, which may be too lenient if 5% is unacceptable to you. A 10% lot is still accepted 39% of the time. If that bothers you, you do not change the maths, you change the plan: test more units, or accept only when zero defects appear.
What I love about this example is that it turns an argument (“is this sample big enough?”) into a number. Instead of saying “20 feels low,” you can say, “with 20 units we still let a 10% bad lot through about two times in five.” That sentence changes meetings.
Cumulative probability: “at most” and “at least”
Real questions are rarely about exactly k. They are about ranges. “At most 2 defects.” “At least 8 baskets.” “Between 40 and 60 heads.” The rule is simple: add the individual probabilities in the range.
- At most k: add P(0) up to P(k). This is the cumulative column in the charger table.
- At least k: use 1 minus P(at most k − 1). Careful with that minus one, it is where most slips happen.
- Between a and b: add P(a) through P(b), or subtract two cumulative values.
As an example, in 100 fair flips the chance of exactly 50 heads is only 8.0%, but the chance of landing anywhere from 40 to 60 heads is 96.5%. The exact value is stingy, while the range is generous. In real work you almost always want the range.
When n gets big: the normal approximation
Computing C(200, 15) by hand is unpleasant. Before computers, statisticians noticed something lovely: as n grows, the binomial chart looks more and more like the smooth bell curve, centred at np with width equal to the standard deviation. That gave them a shortcut. Treat the count as roughly normal with mean np and standard deviation √(np(1 − p)).
A common rule of thumb says the approximation is decent when both np and n(1 − p) are at least 10. Our email campaign (n = 200, p = 0.05) has np = 10, right at the edge, so it works but not perfectly. Today, software gives exact binomial answers instantly, so the approximation matters more for understanding than for calculation. Still, the ideas are the same: a big sample makes the outcome more predictable in proportion, even though the raw count can wobble more.
That last point deserves emphasis. With 10 flips, the share of heads can easily land at 30% or 70%. With 1,000 flips it rarely strays beyond 47% to 53%. Bigger samples do not make luck disappear. They make luck small relative to the total.
Six mistakes I keep seeing (tap to open)
1. Treating dependent events as independent
If one customer’s decision affects another’s, or if defects come in clusters because a machine overheated, the binomial understates the chance of extreme outcomes. Families flying together, viral social posts and faulty batches from one tool all break independence.
2. Letting p change midway
If your conversion rate is 3% on weekdays and 8% on weekends, one binomial for the whole week is wrong. Split the problem or model each group separately.
3. Confusing “success” with “good”
In quality control, a “success” is usually a defect. The word is just the label for what you count. Decide it first, and set p to match.
4. Adding percentages to get “at least one”
20 trials at 5% does not equal 100%. Use the complement, 1 minus the chance of none.
5. Forgetting the ordering count
Multiplying pk by (1 − p)n − k gives the chance of one specific sequence. Leaving out C(n, k) undercounts massively. That is the single most frequent formula error.
6. Sampling a big fraction of a small lot
If you draw 20 items from a lot of only 50 without replacement, each draw changes the odds for the next. The binomial is only an approximation when the sample is a small slice of the population, and a hypergeometric model is more accurate when it is not.
Where else you will meet this distribution
Conversions out of visitors. The basis of most significance tests you have ever seen in a dashboard.
How many of n patients respond to a treatment or report a side effect.
How many of n people surveyed say yes, which drives every margin of error you read.
How many of n components survive a stress test or a year of use.
Any time your data is “how many out of how many,” the binomial is probably lurking underneath.
Quick quiz: test yourself
Tap a question to reveal the answer with the reasoning behind it.
A machine makes bolts with a 2% defect rate. You inspect 15 bolts. Which situation is a valid binomial setup?
- The defect rate rises as the machine heats up during the sample
- Each bolt is defective or fine, independent, with the same 2% chance
- You keep inspecting until you find the first defect
- You measure the exact length of each bolt
Binomial needs a fixed number of trials, two outcomes, independence and a constant p. Option B is the only one that gives all four. C is a geometric setup and D is continuous.
With n = 10 and p = 0.5, what is the mean number of successes?
- 0.5
- 2.5
- 5
- 10
Mean = n × p = 10 × 0.5 = 5.
You test 20 phone chargers at a 5% defect rate. What is the chance that at least one is defective?
- 5%
- About 36%
- About 50%
- About 64%
Use the complement. P(none defective) = 0.9520 = 35.8%, so P(at least one) = 64.2%. Multiplying 20 × 5% and calling it 100% is a classic trap.
Which change makes the binomial bar chart lean to the right, with the tall bars near the high counts?
- Raising p above 0.5
- Lowering p below 0.5
- Making n smaller only
- Making the trials dependent
When p is above 0.5, successes are more likely than failures, so the pile of probability sits near the high end.
Why is C(4,2) = 6 in the coin example?
- Because there are 6 coins
- Because there are 6 different orders that give exactly 2 heads in 4 flips
- Because 4 + 2 = 6
- Because p = 0.5 and 0.5 × 12 = 6
HHTT, HTHT, HTTH, THHT, THTH and TTHH are the six orderings. The formula counts them so you do not have to list them.
Frequently asked questions
What is the binomial distribution in simple words?
It tells you how likely each count of successes is when you repeat the same yes-or-no trial a fixed number of times. Flip a coin 10 times and ask how many heads: that is a binomial question.
What are the four conditions for a binomial distribution?
A fixed number of trials, exactly two outcomes on each trial, independent trials, and the same probability of success every time. Statisticians sometimes remember this as BINS: Binary, Independent, Number fixed, Success probability constant.
How do I calculate a binomial probability by hand?
Multiply three things: the number of ways to arrange k successes among n trials, C(n,k), then p to the power k, then (1 − p) to the power n − k. A scientific calculator or a spreadsheet does the arithmetic in seconds.
What is the difference between binomial and normal distribution?
Binomial counts successes in a fixed number of yes-or-no trials, so it only takes whole-number values. Normal is smooth and continuous. When n is large and p is not extreme, the binomial looks nearly normal, which is why the normal curve is often used as a shortcut.
When should I not use the binomial distribution?
Skip it when trials influence each other, when p changes from trial to trial, or when you sample a large share of a small population without replacement. In that last case the hypergeometric distribution fits better.
How do I find the mean and standard deviation?
The mean is n × p. The standard deviation is the square root of n × p × (1 − p). For 100 coin flips, that is a mean of 50 and a standard deviation of 5.
The takeaway
The binomial distribution is counting, made respectable. Check the four conditions, count the arrangements, multiply by the probabilities, and read the whole chart, not just the middle bar. Once you have done that for a coin, you have done it for a factory, a free-throw line, an inbox and an airplane.
The next time somebody tells you a result was “too unlikely to be chance” or “exactly what we expected,” you will know the right question: unlikely compared to what distribution?
