PROBABILITY MODEL CHECKS

Checking a first-success median through adjacent trial counts

The median waiting time to a first success is the smallest whole trial count at which the cumulative probability reaches one half. Compare the counts just below and at the candidate to find it.

Medians of counting variables

A median splits a distribution into two halves of probability. For a continuous variable it is a single point where the cumulative probability is exactly 0.5. A first-success waiting time counts trials, so it takes values 1, 2, 3 and so on, and the cumulative probability jumps in steps. It usually skips over 0.5 without landing on it. The median is therefore defined as the first whole number at which the cumulative probability reaches or passes 0.5. This page finds that number for a success probability of 0.2 by checking the probability of no success through successive trial counts and subtracting from 1.

No success through three trials

With independent trials and a constant success probability of 0.2, the chance that a given trial fails is 0.8. The chance that the first three trials all fail is 0.8³ = 0.512, which is the binomial probability of zero successes at n = 3, k = 0, p = 0.2. The probability of at least one success within three trials is the complement, 1 − 0.512 = 0.488. That is below one half, so three trials are not enough to make a first success more likely than not. The median must be larger than 3.

No success through four trials

Extend the run by one trial. All four fail with probability 0.8⁴ = 0.4096, again read from the binomial calculator at n = 4, k = 0. The complement is 1 − 0.4096 = 0.5904, which exceeds one half. The first whole count at which the cumulative probability of success reaches 0.5 is therefore 4, and that is the median of the first-success trial number. The boundary shows clearly: 0.488 at three trials, 0.5904 at four, with 0.5 falling between them. The move from 3 to 4 adds 0.1024 of probability, the amount the geometric calculator gives for the mass at k = 4.

Reading the geometric mass

The geometric distribution assigns probability (1 − p)^(k − 1) × p to a first success on trial k. At p = 0.2 those masses are 0.2 at trial 1, 0.16 at trial 2, 0.128 at trial 3 and 0.1024 at trial 4. Adding them gives 0.2 + 0.16 + 0.128 + 0.1024 = 0.5904, matching the complement from the binomial route. Two independent calculators reaching the same cumulative value is a useful consistency check. The masses also show why the median is small: each later trial adds less probability, since the chance of reaching it with no success so far keeps shrinking.

A closed form for the threshold

The first-success cumulative probability is 1 − (1 − p)^k. Setting it at least 0.5 gives (1 − p)^k ≤ 0.5, or k ≥ ln 0.5 / ln(1 − p). For p = 0.2 the ratio is about 3.106, and rounding up to the next whole number gives 4. For p = 0.1 the ratio is about 6.58, so the median is 7. The binomial calculator confirms it: 0.9⁶ = 0.531441 still exceeds 0.5, while 0.9⁷ = 0.4782969 does not. For p = 0.5 the very first trial already has cumulative probability exactly 0.5, so the median is 1 by the rule that it is the first count reaching one half.

The median against the mean

The mean number of trials to first success is 1/p, which is 5 for p = 0.2, while the median is 4. The mean sits higher because the distribution has a long right tail: occasional runs of many failures pull the average up without moving the halfway point much. Quoting the mean as if it were a typical outcome overstates the usual wait. For p = 0.1 the mean is 10 and the median is 7. Which one to report depends on the question. If you ask how many trials are needed to have even odds of at least one success, the median answers it directly.

Why the cumulative step is easy to misplace

Two slips are common. The first is stopping at the trial where the mass looks largest. The geometric mass is always greatest at trial 1, so the mode is 1 for every success probability, and it says nothing about the median. The second is reading the binomial output for zero successes as the answer instead of its complement. At n = 4 and p = 0.2 the value 0.4096 is the probability of no success, and the median question needs the success probability 0.5904. Reading 0.4096 as "about 41 percent" and stopping there would suggest the threshold has not been reached, when in fact the complement shows it has. A short way to guard against both is to write the two cumulative values side by side before deciding, labeled "no success" and "at least one success", so the one-half comparison is made on the right quantity. A model statement such as "the first success arrives by trial 4 with probability 0.5904, and by trial 3 with probability 0.488" names the model and both numbers. Avoid rewording it as "success is expected on trial 4", which sounds like a forecast. A person could wait through ten failures at p = 0.2 without contradicting the model, which assigns that outcome probability 0.8¹⁰, about 0.107.

Percentiles other than the median

The same method finds other thresholds. A quartile or a ninety percent point asks for the first whole count where the cumulative probability reaches 0.25 or 0.9, using k ≥ ln(1 − q) / ln(1 − p) for target q. At p = 0.2 and q = 0.9, ln 0.1 / ln 0.8 is about 10.3, so the answer is 11 trials: the binomial calculator gives 0.8¹⁰ = 0.1074, which leaves cumulative success probability 0.8926, still below 0.9, while 11 trials leave a failure probability of 0.8¹¹, about 0.0859, and a success probability of about 0.9141. Each added percentile needs only the same two inputs, the success probability and the target level, so the calculation is short once the formula is set up. The median is the gentlest of these thresholds, and the distance from it to the ninety percent point shows how heavy the right tail is, with 4 trials at one half but 11 at ninety percent.

Assumptions behind the whole-trial threshold

The calculation needs independent trials with the same success probability each time, and it counts trials until the first success is observed. If success chances change with experience, or trials interact, the geometric and binomial formulas no longer apply. The probability 0.2 here is supplied for the example and is not estimated from a process. The page does not forecast completion counts for any actual project, test campaign or production line.

Try your own values with the First-success trial quantile calculator.

Reproduce the checks

No success through three trials

Open the Binomial Probability Calculator and enter:

Number of trials
3
Successes / event count
0
Success probability
0.2

Expected output:

Pmf

0.512

Its complement is below one half.

No success through four trials

Open the Binomial Probability Calculator and enter:

Number of trials
4
Successes / event count
0
Success probability
0.2

Expected output:

Pmf

0.4096

Its complement is above one half.

Fourth-trial first-success mass

Open the Geometric Distribution Calculator and enter:

Success probability
0.2
Successes / event count
4

Expected output:

Pmf

0.1024

This mass accounts for the cumulative increase.

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