GARETH GRANTTECHNOLOGY · DATA · INNOVATION
Explore

10 / Distributions

Geometric distribution: trials until the first success

The geometric distribution models the trial number on which the first success occurs. It is useful for a repeated, comparable yes/no process where the success probability stays constant.

IntermediateLive exploration + Python

The business question

How many attempts might be needed before the first successful outcome?

  • Estimate attempts needed for the first qualified sales conversion in a simplified contact model.
  • Explore repeated independent retries or inspection attempts where the same success condition applies.
  • Connect per-attempt cost to expected cost before the first success.

How the method works

Define success precisely and count trials starting at one. If p is the probability of success on an attempt, a first success on attempt k requires k − 1 failures followed by a success. Multiply those probabilities to obtain (1 − p)^(k − 1) × p. SciPy’s geom uses this trial-count convention; some references instead count failures before success and therefore start at zero.

The chance of at least one success in the first m attempts is one minus the chance that all m attempts fail. The expected number of attempts is 1/p, but that expectation is not a guaranteed completion count. A process can succeed immediately or continue much longer than the average. Showing a tail probability makes that variability visible to a manager setting a contact or retry budget.

The model is memoryless in trial count. After several failures it still assigns the same p to the next comparable attempt. Real sales work can violate this assumption when lead quality changes, repeated contact annoys the same customer or the team learns during the campaign. Use the model for a defined scenario and reassess its relevance before treating its result as an operating target.

The calculation

P(K = k) = (1 − p)ᵏ⁻¹p; P(K ≤ m) = 1 − (1 − p)ᵐ; E[K] = 1/p
Read the symbols
SymbolMeaning
KTrial number of the first success, taking values 1, 2, 3 and so on.
pConstant success probability on an independent attempt.
mA whole-number attempt budget.
cost per attemptComparable incremental cost incurred on every attempt.

A worked business example

ILLUSTRATIVE SCENARIO

Illustrative outreach team considers a scenario with a 20% qualified conversion probability per independent lead. Each attempted contact costs R40. The supervisor wants both the average cost and a finite-attempt coverage probability.

Inputs

  • Success probability p = 0.20.
  • Attempt budget m = 8 contacts.
  • Incremental cost per attempt = R40.

Work through the numbers

  1. Expected attempts until the first success = 1/0.20 = 5.
  2. Expected contact cost until first success = 5 × R40 = R200, assuming every attempt has the same cost and the process can continue.
  3. Chance of no success in eight attempts = 0.80⁸ = 0.1677722. Therefore P(K ≤ 8) = 0.8322278.
  4. Chance that the first success still has not occurred after ten attempts is 0.80¹⁰ = 0.1073742.
Expected attempts 5 and expected contact cost R200; probability of a first success within eight attempts 83.22%.

An eight-contact budget exceeds the expected five contacts but still leaves a 16.78% chance of no success in this simplified scenario. A finite campaign needs both a probability target and a stopping or escalation policy.

Explore the decision

Count trials until first success. The live explorer has its own example inputs; it is separate from the worked calculation above.

Enable JavaScript to use this calculator. The worked example and executable Python remain available.

Apply it at work

  1. Define one attempt, the first-success criterion and whether attempts concern different independent opportunities.
  2. Estimate p for the specific channel, customer group and period.
  3. Calculate expected attempts, finite-budget coverage and cost under the same convention.
  4. Review outcomes and revise the approach if p changes after failures, learning or repeated contact.

Check these assumptions

  • Attempts are independent and have the same success probability.
  • The first success is the stopping event; a multi-success target needs a different distribution.
  • Each attempt is classified as success or failure using the same rule.
  • Expected unbounded-attempt cost assumes constant per-attempt cost and continued attempts; a capped campaign has a different cost calculation.

Common mistakes and how to avoid them

  • Counting failures instead of total attempts creates an off-by-one error in outputs and cost.
  • Treating repeated calls to the same customer as independent identical leads can overstate coverage.
  • An estimated historical conversion rate can change when the channel, offer or audience changes.

How this can help the business

  • A manager can see how an attempt budget translates into the chance of obtaining an initial result.
  • Expected acquisition effort can be compared with contribution while recognising long runs of failure and channel differences.
A decision rule to adapt

Choose an attempt policy using both the chance of success within the budget and the cost of continued attempts, then validate the constant-probability assumption.

When to use another approach

Use binomial for successes in a fixed campaign, negative binomial for a target of several successes, or a time-varying conversion model when attempts differ.

Reproduce the worked example in Python

The code is self-contained for this example. Dependencies and run instructions are included with the downloadable notebook.

Show executable code and recorded output
from scipy.stats import geom
p = 0.20
mean_attempts = geom.mean(p)
print(f'Expected attempts: {mean_attempts:.2f}')
print(f'Expected cost until success: R {mean_attempts*40:.2f}')
print(f'First success within eight attempts: {geom.cdf(8,p):.2%}')
print(f'No success after ten attempts: {geom.sf(10,p):.2%}')

Recorded output

Expected attempts: 5.00
Expected cost until success: R 200.00
First success within eight attempts: 83.22%
No success after ten attempts: 10.74%
Download all worked examples

Sources and further reading

Concepts are linked to primary teaching or technical sources. The business examples are illustrative applications, not reported client results.