PROBABILITY WORKSHEETS

Reconciling first-success trial counts with preceding failure counts

The geometric calculator counts the trial on which the first success occurs, while the negative-binomial calculator counts failures before the required success. The same event uses k = 3 in one tool and k = 2 in the other.

Two ways to count one event

Suppose you repeat independent trials until the first success. You can describe the result by the trial number on which it happened, or by the number of failures that came first. If success arrives on trial 3, there were 2 failures before it. The geometric calculator takes the trial number, so it expects k = 3. The negative-binomial calculator takes the failure count for a required number of successes, so with one required success it expects k = 2. Entering the same k in both would describe two different events, and the results would differ. A quick example shows the size of the gap. At p = 0.5, k = 3 in the geometric tool gives 0.125, but k = 3 in the negative-binomial tool with one required success means three failures first, which has probability 0.5⁴ = 0.0625, half as large. Neither calculator is wrong. Each answers the question it was built for, and the entered k must match that question.

The calculation with p = 0.5

With a success probability of 0.5, first success on trial 3 means failure, failure, success, which has probability 0.5 × 0.5 × 0.5 = 0.125. The geometric formula (1 − p)^(k − 1) × p gives 0.5² × 0.5 = 0.125 at k = 3. The negative-binomial formula C(k + r − 1, k) × p^r × (1 − p)^k with r = 1 and k = 2 gives C(2, 2) × 0.5 × 0.25 = 0.125. The two calculators return the same value for the same event, so long as the counts are translated correctly. Listing the other outcomes under the same model helps fix the picture. First success on trial 1 has probability 0.5, on trial 2 it is 0.25, on trial 3 it is 0.125, and so on, halving each time. The sequence of probabilities is the same in both tools, and only the labels on the positions differ: 1, 2, 3 for trials, and 0, 1, 2 for failures.

Switching the convention

The translation is simple: failures before the first success equal the trial number minus 1. A trial number of 1 corresponds to 0 failures. A trial number of 4 corresponds to 3 failures. For p = 0.2, first success on trial 4 has probability 0.8³ × 0.2 = 0.1024 in the geometric tool, and the negative-binomial tool with r = 1 and k = 3 returns the same 0.1024. If you mistakenly entered k = 4 in the negative-binomial tool, you would get 0.8⁴ × 0.2 = 0.08192, the probability of four failures before the first success, which is a trial-5 event.

Why the two conventions exist

Both are in common use. Some textbooks define the geometric distribution on trial numbers 1, 2, 3 and so on, and others define it on failure counts 0, 1, 2. The negative binomial is usually defined on failures before the r-th success, though some sources count total trials. Neither is wrong, and each suits different formulas. The mean number of trials to the first success is 1 / p, which is 2 for p = 0.5. The mean number of failures before it is (1 − p) / p, which is 1 for p = 0.5. The two differ by exactly 1, matching the shift in counting. Software libraries follow different choices, which is why a function with the same name can disagree with a textbook table by one position. When comparing against a reference, check how it defines k before comparing numbers. A one-position shift in the whole table of values is a strong sign of a convention difference rather than an arithmetic mistake, and it is the first thing to rule out.

More than one required success

The negative-binomial tool earns its place when r exceeds 1. With p = 0.5 and r = 2 successes required, the probability of exactly 3 failures before the second success is C(3 + 2 − 1, 3) × 0.5² × 0.5³ = 4 × 0.25 × 0.125 = 0.125. The second success then lands on trial 5. For r = 3 and 2 failures, the probability is C(4, 2) × 0.5³ × 0.5² = 6 × 0.125 × 0.25 = 0.1875, so the third success lands on trial 5 as well. The geometric calculator cannot model these cases, because it stops at the first success. The negative-binomial formula counts the arrangements of the failures among the earlier trials. Before the last success there are k + r − 1 trials, and choosing which r − 1 of them are successes gives the combination factor. For r = 1 that factor is 1, which is why the first-success case collapses to the simple geometric product with no combination term.

Failures versus total trials with r = 2

When two successes are required, the total number of trials is the failure count plus 2. The conversion rule generalizes: trials equal failures plus r. With p = 0.2, three failures before the second success have probability C(4, 3) × 0.2² × 0.8³ = 4 × 0.04 × 0.512 = 0.08192, and the second success arrives on trial 5. If a source states the event as "the second success occurs on trial 5", you must enter 3 as the failure count. Entering 5 would describe five failures before the second success, a trial-7 event with a different probability.

A habit that prevents the error

Write the event in words before entering numbers: "first success on trial 3" or "2 failures before the first success". Then check which count the calculator labels. If you can state the stopping rule and the last trial in the sequence, the right input follows. A quick cross-check uses both tools in the case r = 1, as above, since the geometric tool at trial k and the negative-binomial tool at k − 1 failures must agree. A disagreement means one entry is off by one, which is the typical slip in this topic. Keep the event wording with the stored result too. A note such as "first success on trial 3, p = 0.5, probability 0.125" stays correct whichever tool was used to produce it, while a bare "k = 3" can be read two ways. If you share a worksheet with someone who uses the other convention, the written event is what lets them reproduce your number without guessing.

Shared assumptions

Both models assume independent trials with a common success probability and a stopping rule that ends the sequence at the required success. If trials influence each other, or the chance of success changes with experience, neither applies. The match shown here is a representation check inside the model, not evidence that a real process fits it. The values of p used are illustrative and are not estimated from data.

Reproduce the checks

Trial count including first success

Open the Geometric Distribution Calculator and enter:

Success probability
0.5
Successes / event count
3

Expected output:

Pmf

0.125

The successful trial is included in the geometric count.

Failures before one success

Open the Negative Binomial Calculator and enter:

Success probability
0.5
Required successes
1
Successes / event count
2

Expected output:

Pmf

0.125

The two preceding failures describe the same event.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks