Binomial and Geometric Distributions
Count successes in repeated trials with the binomial distribution, wait for the first success with the geometric, and use their means and variances.
Welcome back!
Step 1 of 12Learn
Guessing on a quiz
A quiz has 10 multiple-choice questions with 4 options each. You didn't study and guess every answer. What's the chance you get exactly 3 right?
Each question is a Bernoulli trial: one experiment with two outcomes, success (probability p) or failure (probability 1 − p). Here p = 0.25. When you repeat a Bernoulli trial n times independently, with the same p each time, the number of successes X has a binomial distribution, written X ~ Binomial(n, p).
To get exactly k successes, pick which k of the n trials succeed (C(n, k) ways); each such arrangement has probability pk(1 − p)^(n − k). So
P(X = k) = C(n, k) · pk · (1 − p)^(n − k)
For the quiz, k = 3:
P(X = 3) = C(10, 3) × 0.253 × 0.757 = 120 × 0.015625 × 0.1335 ≈ 0.250.
So about a quarter of blind guessers get exactly 3 right. Getting 7 or more right by pure guessing has probability about 0.0035, which is why a 70% passing mark is safe against random guessing.
Before using the binomial, check all four conditions: a fixed number of trials, two outcomes, independent trials, and the same p each time. Drawing cards without replacement breaks independence; a basketball player getting tired breaks constant p.
Step 2 of 12Practice · Work it out
A fair coin is flipped 6 times. What is the probability of getting exactly 4 heads? Give a decimal to three places.
Step 3 of 12Practice · Chart
Guessing a 10-question quiz (4 options each)
Binomial(10, 0.25): the chance of each number of correct guesses. Scores above 5 are almost invisible.
Tap the most likely number of correct answers.
Tap the bar that answers the question, then press Check.
Step 4 of 12Learn
Mean and variance of a binomial
You could compute the mean of a binomial from the PMF, but linearity of expectation makes it instant. Write X as a sum of n indicator variables, one per trial, each equal to 1 for success and 0 for failure. Each indicator has mean p and variance p(1 − p). Adding n independent ones:
E[X] = n·p Var(X) = n·p·(1 − p), so SD = √(np(1 − p))
Quiz example. n = 10, p = 0.25: mean = 2.5 correct, variance = 10 × 0.25 × 0.75 = 1.875, SD ≈ 1.37.
Quality control. A machine produces 2% defective parts. In a box of 500, the expected number of defects is 500 × 0.02 = 10, with SD √(500 × 0.02 × 0.98) ≈ 3.1. A box with 25 defects is about 4.8 SDs above the mean, a strong sign that something changed on the production line.
The variance np(1 − p) is largest when p = 0.5 and shrinks toward 0 as p approaches 0 or 1. That makes sense: if success is nearly certain or nearly impossible, there's little room for surprise.
Shape. With p = 0.5 the distribution is symmetric. With small p it is skewed right, piled up near 0 with a tail toward larger counts. As n grows, the binomial looks more and more like a bell curve, a first glimpse of the central limit theorem.
Step 5 of 12Try the calculator
Binomial summary
Enter the number of trials and the success probability.
- Mean np
- 2.5
- Standard deviation
- 1.369
- P(zero successes)
- 0.05631
- P(at least one success)
- 0.94369
- P(all successes)
- 0.000001
Step 6 of 12Practice · Work it out
About 8% of men have red-green color blindness. In a random sample of 50 men, what is the expected number with color blindness?
Step 7 of 12Learn
Waiting for the first success
Now flip the question. Instead of fixing the number of trials and counting successes, keep going until the first success and count the trials. That count has a geometric distribution.
For the first success to happen on trial k, the first k − 1 trials must fail and trial k must succeed:
P(X = k) = (1 − p)^(k − 1) · p, k = 1, 2, 3, …
Mean: E[X] = 1/p. On average, waiting for a 6 on a die takes 6 rolls. If a sales call succeeds 10% of the time, expect 10 calls per sale.
The tail is simple: P(X > k) = (1 − p)k, since needing more than k trials means the first k all failed.
The geometric distribution is memoryless: P(X > s + t | X > s) = P(X > t). If you've already rolled 10 times without a 6, the expected number of additional rolls is still 6. The die does not "owe" you a six. This is the gambler's fallacy seen from the waiting-time side.
Common mistake: expecting a 1-in-6 event to happen within 6 tries. P(at least one 6 in 6 rolls) = 1 − (5/6)6 ≈ 0.665, only two-thirds. About a third of the time you'll wait longer, sometimes much longer. The mean is 6, but the distribution has a long right tail.
Step 8 of 12Explore
How long might you wait?
The curve shows P(X > k), the chance that the first success takes more than k trials, for success probability p. Slide p and compare the mean waiting time with how long the tail stretches.
- Mean number of trials 1/p
- 5.88
- P(more than twice the mean)
- 0.112
- Trials for a 90% chance of success
- 12.4
Step 9 of 12Note
Step 10 of 12Practice · Sort into groups
Which distribution fits each situation best?
Tap an item, then tap its group (or drag it there).
Step 11 of 12Note
Step 12 of 12Practice · Choose one
A website visitor makes a purchase with probability 0.04, independently. What is the expected number of visitors until the first purchase?
Lesson complete!