Advertisement

🎯 Geometric Distribution Calculator

Calculate the probability that the first success occurs on trial k. Computes P(X=k), cumulative P(X≤k), mean, and variance for a geometric distribution.

Between 0 and 1

Must be ≥ 1

What is the Geometric Distribution?

The geometric distribution is a discrete probability distribution that models the number of trials needed to achieve the first success in a sequence of independent Bernoulli trials, where each trial has a constant probability of success p and probability of failure q = 1 − p. In the most common formulation, P(X = k) = (1−p)^(k−1) × p, where k is the trial number on which the first success occurs. This distribution arises naturally whenever you ask "how many attempts until the first hit?" — from quality control sampling to game theory to reliability engineering.

The geometric distribution has a unique and practically important property called memorylessness: the probability of success on the next trial is always p, regardless of how many failures have already occurred. This means that knowing you've already failed 10 times doesn't change your chances on trial 11 — each attempt is truly independent. This property is often counter-intuitive (people tend to believe a run of failures makes success "due"), but it is mathematically provable and makes the geometric distribution analytically tractable. It is the only discrete distribution with this memoryless property.

Key statistics of the geometric distribution include a mean (expected number of trials) of 1/p, variance of (1−p)/p², and standard deviation √[(1−p)/p²]. For a fair coin flip (p = 0.5), the expected number of flips to get the first heads is 1/0.5 = 2 flips. For a rare event like rolling a six (p = 1/6), the expected wait is 6 rolls. This calculator computes P(X = k), P(X ≤ k), P(X > k), mean, variance, and standard deviation for any success probability and trial count, with a probability distribution chart for visual analysis.

Geometric Distribution Formulas

PMF (first success on trial k)
P(X = k) = (1 − p)^(k−1) × p
CDF
P(X ≤ k) = 1 − (1 − p)^k
Mean and Variance
E[X] = 1/p
Var(X) = (1−p) / p²

Real-World Examples

  1. 1
    Free Throw Shooting
    A basketball player with 70% free throw accuracy: what is the probability their first miss happens on the 4th attempt?
  2. 2
    Sales Calls
    A salesperson closes a deal with probability 0.20 per call. What is the expected number of calls until the first sale?
  3. 3
    Defective Items
    An assembly line produces 1% defective items. What is P(first defect found on the 5th inspection)?
  4. 4
    Clinical Trials
    A drug has 40% response rate. What is P(first responder is the 3rd patient)?

Frequently Asked Questions

The geometric distribution models the number of independent Bernoulli trials needed to get the first success, where each trial has probability p of success. It is memoryless — past failures do not affect future probabilities.

The memoryless property means P(X > m + n | X > m) = P(X > n). In plain terms, if you have already had k failures, the distribution of remaining trials until success is the same as at the start. This is unique to the geometric (and exponential) distributions.

The geometric distribution is a special case of the negative binomial distribution with r = 1. The negative binomial models the number of trials until r successes, while geometric models trials until 1 success.

Use it when you are counting the number of trials until the first success, each trial is independent, and the success probability p is constant across trials. Examples include coin flips until heads, or inspections until finding a defect.

P(X = k) = (1−p)^(k−1) × p means there were exactly k−1 failures (each with probability 1−p) before the first success (probability p) on trial k.

Real-World Applications

🎲
Game Theory
Calculate the expected number of dice rolls until a specific outcome — e.g. expected rolls to get a "6" on a fair die is 1/p = 6.
🔬
Quality Control
Model the number of items inspected before finding the first defective unit, given a known defect rate.
📡
Network Packet Retransmission
In unreliable networks, model the number of transmission attempts needed before a packet is successfully acknowledged.
💊
Clinical Trials
Estimate the number of patient screenings needed before finding the first eligible trial participant given a known eligibility rate.
Equipment Failure Modelling
For components with a constant per-cycle failure rate, the geometric distribution models cycles until first failure (discrete-time reliability).
📞
Call Centre Modelling
Model the number of calls handled before a first-call resolution — given a known first-call resolution rate.

Common Mistakes

1
Confusing the two formulations
There are two conventions: P(X=k) = (1-p)^(k-1)·p counts the trial of first success (k ≥ 1); the alternate form P(X=k) = (1-p)^k·p counts failures before first success (k ≥ 0). Always confirm which is intended.
2
Assuming the memoryless property means "streaks even out"
Memorylessness means past results do NOT influence future trials — it does NOT mean failures make success more likely soon. Each trial is independent.
3
Applying the geometric distribution when p is not constant
If the success probability changes across trials (e.g. sampling without replacement), the geometric distribution does not apply — use the negative hypergeometric instead.
4
Confusing geometric with negative binomial
The geometric distribution is the special case of the negative binomial for r=1 (first success). The negative binomial generalises to "rth success on kth trial."
5
Using the wrong formula for CDF
The CDF P(X ≤ k) = 1 − (1−p)^k (for the k-failures-before-success form) — not a simple sum of individual P(X=k) terms.

Geometric Distribution Key Statistics (P(X=k) = (1−p)^(k−1)·p)

Success Probability (p) Mean (1/p) P(success by trial 5)
p = 0.5 (coin flip) 2 trials 96.9%
p = 0.25 (1 in 4) 4 trials 76.3%
p = 0.1 (1 in 10) 10 trials 41.0%
p = 1/6 (die roll) 6 trials 59.8%
p = 0.01 (1 in 100) 100 trials 4.9%

References

  1. Hogg, Robert V., McKean, Joseph W., and Craig, Allen T. Introduction to Mathematical Statistics. Pearson, 2019.
  2. Wackerly, Dennis D., Mendenhall, William, and Scheaffer, Richard L. Mathematical Statistics with Applications. Cengage, 2014.
  3. DeGroot, Morris H. and Schervish, Mark J. Probability and Statistics. Pearson, 2012.
  4. Ross, Sheldon M. A First Course in Probability. Pearson, 2019.
  5. Feller, William. An Introduction to Probability Theory and Its Applications. Wiley, 1968.

Related Calculators