Geometric & Negative Binomial
The number of trials until the first success, and its generalization to the $r$-th success.
1. The idea
A Geometric random variable counts the number of independent Bernoulli trials up to and including the first success: for
Its defining property is memorylessness: given that the first trials failed, the remaining number of trials needed is still Geometric, independent of . This makes conditioning arguments collapse to restarting the clock.
Negative Binomial generalizes this to the number of trials until the -th success; it is the sum of independent Geometric variables, so its mean and variance scale by .
2. Why it matters
Memorylessness is one of the most reused tricks in interviews: any "waiting for the first occurrence" question, once you show it's Geometric, can be answered without ever writing an infinite sum.
3. Core mathematics
Parameters
Support
trials up to and including the first success
Expectation
Variance
Key property
memorylessness
Negative Binomial
sum of iid Geometric
4. How to recognize it
Think of this when…
- "Number of trials/flips/attempts until the first success"
- "Expected number of rolls to see a 6" or similar first-occurrence questions
- "Until the -th success" signals Negative Binomial
- Any conditioning on "given it hasn't happened yet" — a memorylessness cue
5. Worked example
Worked example
A die is rolled repeatedly until a 6 appears. Given that the first 6 has not appeared in the first 4 rolls, find the expected number of additional rolls needed.
- 1
Let be the roll number of the first 6; .
- 2
By memorylessness, conditioning on resets the count: the additional number of rolls needed is again Geometric.
- 3
So the expected additional rolls is just itself.
- Answer: additional rolls are expected, regardless of how many rolls have already failed.
6. Common mistakes
- Writing the PMF as instead of (off-by-one in the exponent)
- Confusing the two common conventions: number of trials until success (support starts at 1) vs. number of failures before success (support starts at 0, mean )
- Forgetting to invoke memorylessness and instead re-deriving a conditional distribution from scratch
- Applying memorylessness to a non-Geometric/non-Exponential variable, where it does not hold
7. Quick check
A biased coin has . What is the expected number of flips until the first heads?
Which property lets you say that a Geometric variable's remaining wait, given failures so far, has the same distribution as the original?
8. Practice
20 QuantSolve questions use this concept.
Practice this concept9. Related methods
Create a free account to save lesson progress.
Recommended next lessonPoisson →