5.4 - Waiting for the first success

5.4 - Waiting for the first success

Repeating trials until the first success gives a waiting time rather than a fixed-trial success count. Learn to recognise a geometric distribution, count the failures in point and tail probabilities, and interpret its expected waiting time.

A geometric model

You repeat an independent attempt with success probability 0.20.2 until the first success. Is it more likely that you need exactly four attempts, or more than four? The difference is whether the fourth attempt must succeed.

For this experiment, X=1X=1 means immediate success. X=4X=4 means three failures followed by success. There is no fixed maximum number of trials, unlike a binomial experiment.

Geometric distribution

The random variable XX has the geometric distribution Geo⁡(p)\operatorname{Geo}(p) when it counts the number of independent trials up to and including the first success, with the same success probability pp on every trial.

Write X∼Geo⁡(p)X\sim\operatorname{Geo}(p), where 0<p≤10<p\le1. Its possible values are 1,2,3,…1,2,3,\ldots; if p=1p=1, only 11 has positive probability.

The stopping rule matters as much as the individual trials. “Number of failures before success” would start at 00, so it is not the XX used here. “Number of successes in ten trials” is a binomial count instead.

Worked example 1: a first-success waiting time

Question. A machine makes independent attempts to read a label. Each attempt succeeds with probability 0.80.8, regardless of earlier outcomes. Let XX be the number of attempts needed for the first successful read. State its distribution and explain what X=3X=3 means.

Plan. Check independence, constant success probability and the stopping rule.

The trials continue until the first success, each with the same probability 0.80.8. Therefore

X∼Geo⁡(0.8).X\sim\operatorname{Geo}(0.8).

The event X=3X=3 is the sequence failure, failure, success. Its probability is (0.2)(0.2)(0.8)=0.032(0.2)(0.2)(0.8)=0.032.

Answer. Geo⁡(0.8)\operatorname{Geo}(0.8); X=3X=3 means two failures then a successful third attempt.

Check. It is impossible to have X=0X=0, because even an immediate success requires one attempt.

Now keep the attempts identical but change the stopping rule from the first to the second success.

Worked example 2: a different stopping rule

Question. The machine is now used until it has made two successful reads. Let YY be the total number of attempts. Does Y∼Geo⁡(0.8)Y\sim\operatorname{Geo}(0.8)?

Plan. Compare the definition of YY with a first-success waiting time.

The trials are independent and have constant success probability, but they stop at the second success. At least two trials are required:

P(Y=1)=0.\mathrm P(Y=1)=0.

A Geo⁡(0.8)\operatorname{Geo}(0.8) variable has probability 0.80.8 of equalling 11.

Answer. No. YY is a waiting time to the second success, so it is not this geometric model.

Check. Two immediate successes give Y=2Y=2; the support starts at 22, confirming the mismatch.

The model assumes the process can continue with the same probability after any number of failures. A changing chance, dependence between attempts, or a fixed stopping limit needs separate consideration.

Key idea

A geometric variable counts trials, including the successful one. Write the relevant failure/success sequence before calculating.

Use that convention in this diagnostic check.

Point and tail probabilities

To get the first success on trial rr, the first r−1r-1 trials must all fail, then trial rr must succeed. Independence lets you multiply their probabilities. There is just one permitted pattern, so no binomial coefficient is needed.

Geometric point probability

For X∼Geo⁡(p)X\sim\operatorname{Geo}(p), with 0<p<10<p<1,

P(X=r)=p(1−p)r−1,r=1,2,3,….\mathrm P(X=r)=p(1-p)^{r-1},\qquad r=1,2,3,\ldots.

In the formula booklet.

If p=1p=1, the first trial succeeds with certainty, so X=1X=1. For a tail event with 0<p<10<p<1, describe what must have happened by the boundary. More than rr trials are needed precisely when the first rr trials all fail. At least rr trials are needed when the first r−1r-1 trials fail; trial rr is unrestricted.

Geometric tail probabilities

For 0<p<10<p<1 and a positive integer rr,

P(X>r)=(1−p)r,P(X≥r)=(1−p)r−1.\mathrm P(X>r)=(1-p)^r,\qquad \mathrm P(X\ge r)=(1-p)^{r-1}.

Hence P(X≤r)=1−(1−p)r\mathrm P(X\le r)=1-(1-p)^r.

Not in the formula booklet: reconstruct these from the required failures.

Compare a point event with two different tail events at the same boundary.

Worked example 3: a success at the boundary

Question. Independent attempts have success probability 0.20.2. Find the probability that the first success occurs on the fourth attempt.

Plan. Require three failures, then a success.

P(X=4)=(0.8)3(0.2)=0.1024\begin{aligned} \mathrm P(X=4)&=(0.8)^3(0.2)\\ &=0.1024 \end{aligned}

Answer. 0.10240.1024, or 0.1020.102 to 33 significant figures.

Check. This is also P(X>3)−P(X>4)=0.512−0.4096=0.1024\mathrm P(X>3)-\mathrm P(X>4)=0.512-0.4096=0.1024: survive three failures, but not four.

Change “on the fourth attempt” to “after the fourth attempt”. The fourth attempt must now fail, and no later outcome is specified.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account