STAT 200 · Statistics for Economics
The Binomial Distribution
Count successes in repeated yes-or-no trials, learn when the binomial model fits, and use it to decide how many seats to sell.
Key takeaways
- The binomial distribution gives the probability of each possible number of successes in a fixed number of yes-or-no trials.
- It fits only when the number of trials is fixed, each has two outcomes, trials are independent, and the success chance stays the same.
- Each probability combines the chance of one particular ordering with the number of orderings that give the same count.
- The expected number of successes is n × p, and the standard deviation is the square root of n × p × (1 − p).
- When trials influence one another, as when friends travel together, the binomial model can badly understate the chance of extreme results.
Picture Lena, who runs sightseeing trips on a small boat with 8 seats. Customers pay online ahead of time. Some never show up. They oversleep, miss the ferry, or decide the couch looks nicer than the sea. Lena watches empty seats float around the harbor and wonders: what if she sold 10 tickets?
Sell too few and seats go to waste. Sell too many and someone stands on the dock, furious. To choose well, she needs the chance that 0, 1, 2 or all 10 ticket holders appear.
That is a counting problem with a famous shape. It turns up whenever you repeat a yes-or-no event and ask how many times the answer is yes.
The four conditions
A trial is one repetition of the chance event, such as one ticket holder either showing up or not. A success is whichever outcome you decide to count. It need not be happy news. A statistician can call a defective bulb a success and feel fine about it.
The binomial distribution describes the number of successes when four conditions hold:
- There is a fixed number of trials, called n.
- Each trial has only two outcomes: success or failure.
- The trials are independent, so one result does not change the chances for another.
- The chance of success, called p, is the same on every trial.
If any answer is no, the binomial may mislead you.
Does "the number of customers who walk in until someone buys" qualify? No, because the number of trials is not fixed. Does "how many of 20 randomly chosen invoices are late" qualify? Usually yes, if they are picked from a very large pile, so that removing one barely changes the odds for the next.
Building the formula from a small case
Let us start with a snack counter. Suppose each customer buys a cookie with probability 0.2, independently. Look at 5 customers. What is the chance that exactly 2 buy?
First pick one specific pattern: Yes, Yes, No, No, No. Because the customers are independent, you multiply, using the rule from conditional probability:
0.2 × 0.2 × 0.8 × 0.8 × 0.8 = 0.02048 But that is only one pattern. The two buyers could be the first and third, or the fourth and fifth, and so on. Each pattern has the same probability. You just need to count the patterns.
The count of ways to choose which k of the n trials succeed is written C(n, k) and read "n choose k." The factorial sign, !, means multiply a whole number by every whole number below it down to 1.
C(n, k) = n! ÷ (k! × (n − k)!)
C(5, 2) = 120 ÷ (2 × 6) = 10 So P(exactly 2 buyers) = 10 × 0.02048 = 0.2048.
The general rule is:
The whole distribution at a glance
Work out every possible count for the 5 customers and you get this:
| Buyers | Orderings | Probability |
|---|---|---|
| 0 | 1 | 0.32768 |
| 1 | 5 | 0.40960 |
| 2 | 10 | 0.20480 |
| 3 | 10 | 0.05120 |
| 4 | 5 | 0.00640 |
| 5 | 1 | 0.00032 |
The probabilities add to 1, as any probability distribution must. One buyer is the most likely result. Five buyers would happen about 3 times in 10,000, so if you see it, enjoy the moment.
With a small p, the distribution leans toward low counts and has a tail to the right. Hypothetical example: the numbers are made up to show the method, not a quote or an average.
A useful shortcut handles "at least one." Instead of adding five rows, subtract the chance of none: 1 − 0.32768 = 0.67232, or about 67%.
Center and spread
You do not need the whole table to find the expected count. Each trial adds 1 with probability p, so its expected contribution is p. Add up n of them, as expected values can always be added.
Expected successes = n × p
Variance = n × p × (1 − p)
Standard deviation = √(n × p × (1 − p)) For the cookie counter: the expected count is 5 × 0.2 = 1. The variance is 5 × 0.2 × 0.8 = 0.8, and the standard deviation is about 0.89.
The term p × (1 − p) is largest when p is 0.5. A 50-50 event is the hardest to guess. If p is 0.01 or 0.99, you nearly know what each trial will do, so there is less spread.
Spread also grows more slowly than the number of trials. With 100 customers, the expected count is 20 and the standard deviation is 4. With 10,000 customers, they are 2,000 and 40. As a share of the total, 4 out of 100 is 4 points, but 40 out of 10,000 is only 0.4 points. Big crowds give steadier shares. Hold on to that thought. It powers most of the inference lessons ahead.
Worked example: how many tickets should Lena sell?
Make up some numbers. Each ticket holder shows up with probability 0.8, independently. A ticket costs $40 and is not refunded for no-shows. If more than 8 people arrive, each extra person is turned away with a voucher that costs Lena $100. She still keeps the $40 ticket price.
Sell 8. Revenue is 8 × 40 = $320. Nobody is ever turned away.
Sell 9. Someone is turned away only if all 9 show: 0.8⁹ ≈ 0.134. Expected profit before boat costs is 360 − 100 × 0.134 ≈ $347.
Sell 10. One person is turned away if exactly 9 show, and two if all 10 show.
P(9 of 10 show) = 10 × 0.8⁹ × 0.2 ≈ 0.268
P(10 of 10 show) = 0.8¹⁰ ≈ 0.107
Expected people turned away = 1 × 0.268 + 2 × 0.107 ≈ 0.483
Expected result = 400 − 100 × 0.483 ≈ $352 Sell 11. The chances that exactly 9, 10 or 11 show are about 0.295, 0.236 and 0.086. Expected turned away is 0.295 + 0.472 + 0.258 ≈ 1.025. The expected result is 440 − 102.5 ≈ $337.
Selling 10 gives the highest expected result. Still, with 10 tickets sold, someone is left on the dock whenever 9 or 10 appear, which is about 37.6% of trips. Lena might reasonably sell 9 to protect her reviews. Airlines and hotels face a richer version of this same trade-off, with rules about compensation that you should look up for the country and industry involved.
Using it to judge a claim
The binomial is also a lie detector, of a polite kind. It tells you how surprising a result would be if a claim were true.
Suppose a supplier tells Lena that only 10% of its life jackets arrive with a faulty buckle. She opens a box of 10, picked from a very large shipment, and finds 4 faulty ones. Bad luck, or a bad claim?
Assume the claim is true and ask how often 4 or more faults would appear. It is easiest to add the chances of 0 through 3 and subtract from 1.
| Faulty buckles | Probability if p = 0.1 |
|---|---|
| 0 | 0.3487 |
| 1 | 0.3874 |
| 2 | 0.1937 |
| 3 | 0.0574 |
| 4 or more | 0.0128 |
The first four rows add to about 0.9872. So a result of 4 or more happens only about 1.3% of the time when the claim is true. Either Lena witnessed something rare, or the real fault rate is higher than 10%. She has good reason to open more boxes and have a talk with the supplier.
Notice what the number does not say. It is not the chance that the supplier is lying. It is the chance of data this extreme if the supplier is right. That difference is the same one-way street you met with Bayes' rule, and it becomes the heart of hypothesis testing later in this course.
From counts to shares, and toward a bell
Often you care about the share of successes more than the count. Divide the count by n and you get the sample proportion. Its expected value is p. Its standard deviation is √(p × (1 − p) ÷ n).
Say p is 0.2. With 25 customers, the standard deviation of the share is √(0.16 ÷ 25) = 0.08, or 8 points. With 400 customers it is √(0.16 ÷ 400) = 0.02, or 2 points. Sixteen times as many customers makes the share four times as steady. Precision improves with the square root of n, which means it gets expensive.
Something else happens as n grows. The lopsided bars you saw for 5 customers become more and more balanced around the center. For large n, the outline looks like a smooth bell, the shape in the next lesson. A common rule of thumb says the bell is a decent stand-in when both n × p and n × (1 − p) are at least about 10. For 400 customers with p = 0.2, those are 80 and 320, so you are comfortably there. For 5 customers, they are 1 and 4, so stick with the exact table.
When you face a new problem, work in a fixed order. Check the four conditions. Name n, p and the counts you care about. Decide whether the question says exactly, at least or at most. Then compute, and compare your answer with the expected count, n × p. If you find a high chance for a count far from n × p, go back and look for a slip.
The common mistake: trusting independence too easily
Suppose Lena's tickets are often bought by families of five. If their car breaks down, five people vanish at once. The no-shows are no longer independent. Extreme results, such as very empty or completely full boats, become more likely than the binomial table says.
Models of loan defaults face the same hazard. If each of 1,000 borrowers defaults independently with a small chance, the total is very predictable. If a recession pushes many of them under together, it is not. A neat formula resting on a false assumption gives precise wrong answers.
A second mistake is the gambler's fallacy: thinking that after several failures a success is "due." If trials are truly independent, five no-shows in a row do not make the sixth ticket holder any more likely to appear. The coin has no memory and no sense of fairness.
A third is mixing up "exactly," "at least" and "at most." "At least 4 of 5" means 4 or 5, so you add two rows: 0.00640 + 0.00032 = 0.00672. Read the wording twice before you add.
Words to know
Trial one repetition of a chance event that has an outcome you can record.
Success the outcome you have chosen to count, whether or not it is good news.
Binomial distribution the probabilities for the number of successes in n independent trials with the same success chance p.
Combination a way of choosing k items from n when the order of choosing does not matter.
Factorial a whole number multiplied by every smaller whole number down to 1.
Gambler's fallacy the false belief that independent trials must even out in the short run.
Check yourself
- What are the four conditions for a binomial setting?
- A fair coin is flipped 4 times. What is the probability of exactly 2 heads?
- Each of 3 shoppers uses a coupon with probability 0.2, independently. What is the chance at least one does?
- For n = 50 and p = 0.1, find the expected number of successes and the standard deviation.
- Explain why counting rainy days in one particular week may not fit the binomial model.
Show the answers
- A fixed number of trials, two outcomes per trial, independent trials, and the same success probability on each.
- C(4, 2) = 6 and each ordering has probability 0.5⁴ = 0.0625, so the answer is 6 × 0.0625 = 0.375.
- The chance nobody uses one is 0.8³ = 0.512, so the chance of at least one is 1 − 0.512 = 0.488.
- The expected number is 50 × 0.1 = 5, and the standard deviation is √(50 × 0.1 × 0.9) = √4.5 ≈ 2.12.
- Weather on neighboring days tends to be linked, since one storm can last several days, so the days are not independent.