Suppose each attempt at a task succeeds with probability one quarter, independently of every other attempt, and you keep trying until the first success. How many attempts should you expect to need, how likely is a long wait, and does a run of failures make the next attempt more promising? The number of attempts is now the random quantity, not the number of successes. This lesson finds its distribution, sums its probabilities with a geometric series, and answers all three questions exactly.
Key terms
Geometric distribution
Definition Consider a sequence of independent trials, each a success with the same probability , where . Let be the number of trials up to and including the first success. Counting the successful trial is the trial-count convention, and in it the support of is when . The event means that the first trials fail and trial succeeds, so independence gives
for every positive integer , and for every other real . We say that has the geometric distribution with parameter . When the first trial succeeds with certainty, so and the support is . The formula gives this with the usual convention . The value is excluded, because then the probability of ever succeeding is .
In plain words Keep trying until the first success and count every attempt, the successful one included. The first success lands on trial in only one way, a run of failures followed by a success.
Example With , the first success comes on trial only for the pattern failure, failure, failure, success, so
This is not the binomial probability of exactly one success in four trials. That event allows the success in any of the four positions, and its probability is four times as large. Only the pattern with the success in position four has its first success on trial .
Failure-count convention
Definition Under the same independent trials with , let be the number of failures before the first success. Then , the support of is when and when , and
for every integer . Some references also call this distribution geometric, so a formula or a mean quoted for a geometric distribution is ambiguous until the convention is stated. Since the two variables differ by the constant , their means differ by and their variances are equal.
In plain words Both conventions describe the same experiment. One records how many attempts were used, the other how many failed before the success. The failure count can be zero, but the trial count cannot.
Example With , the pattern failure, failure, failure, success gives and , and , the same probability as . The value means a success on the first attempt, so , while . The mean trial count is and the mean failure count is , as the last card shows.
Geometric series
Definition For a real number and a positive integer , the finite geometric series has the sum
To see this, call the sum . Every power of except and cancels in , so . If , then as , and the infinite series converges with
If , the terms do not tend to and the infinite series diverges.
In plain words Multiplying the sum by the ratio shifts every term one place, so subtracting leaves only the first term and the one just past the end. When the ratio is smaller than in size, the leftover term fades away and the infinite sum is finite.
Example The geometric masses add to . Write . Since , we have , and the first masses add to
With and this is . As grows, , so the total is . The leftover is the probability that the first trials all fail, so the probability of never succeeding is . When this holds even though no fixed number of trials is guaranteed to be enough.
Geometric tail
Definition Let be geometric with parameter in the trial-count convention and . The event means that the first trials all fail, whatever happens afterward. Hence for every integer , with ,
The second line is the CDF of at the integer . For , the event is the event , so it has probability .
In plain words Needing more than trials is a statement about the first trials only, and they must all fail. Watch the endpoint. Needing at least trials allows trial itself to be the success, so it requires only failures.
Example With , the probability of needing more than three trials is , so . Needing at least three trials means the first two fail, so . The difference is exactly .
Memoryless property
Definition Let be geometric with parameter , where , and let . For all integers and ,
The conditioning event has probability , and since is contained in , the left side is . Equivalently, given , the remaining wait has the same geometric distribution as . When and , the event has probability and the conditional probability is not defined.
In plain words After any number of failures, the future looks exactly like a fresh start. A run of failures does not make a success due, and it does not make one less likely either. The property comes from the model, independent trials with one constant . A real process in which people learn from failed attempts, or equipment wears out, need not be memoryless.
Example With , suppose the first three attempts have failed. The probability of needing more than two additional attempts is
which equals . The expected remaining wait is still trials, so the expected total wait given those failures is . This does not contradict , because the condition removes every outcome with an early success.
Mean and variance of a geometric distribution
Definition If is geometric with parameter , where , in the trial-count convention, then
Both moments are finite because the tail shrinks geometrically. For the mean, a variable with values in the positive integers satisfies , so with
For the second moment , condition on the first trial. If it succeeds, . If it fails, , where the remaining wait does not depend on the first trial and has the same distribution as . So
Solving gives , and subtracting gives the variance. The failure count has and the same variance.
In plain words If each attempt succeeds with probability one quarter, the average wait is four attempts. The mean is not a promise, though. As shrinks toward the variance grows without bound, so rare successes come with very uneven waits.
Example With , the mean is , the second moment is , and the variance is , a standard deviation of about trials. The mean of does not guarantee a success within four trials, since . The failure count has mean and the same variance .
Check yourself
- Independent trials each succeed with probability , and counts the trials up to and including the first success. Find , and .
Show the answer
The first success lands on trial only for the pattern failure, failure, success, so
The mean is trials, and the variance is , a standard deviation of about trials.
- In the same model, the first four trials have all failed. What is the probability that more than two additional trials are needed? Someone answers . What went wrong?
Show the answer
The question asks for . The condition has probability , so
That is , the same as , as the memoryless property says. The value is the unconditional probability , which ignores the information that four failures have already happened. The four failures do not make a success due either, and the answer is neither larger nor smaller than it would be at the start.
- A reference states that a geometric distribution with has mean and gives the value probability . Can that be right?
Show the answer
Yes, if the reference uses the failure-count convention. The number of failures before the first success, , has support , the probability and the mean , which is one less than . Its variance is still . Under the trial-count convention used on this page, the value is impossible and the mean is . Neither statement is wrong, but each needs its convention.