Calculator

Geometric Distribution

Calculate PMF, cumulative probabilities and percentiles of the number of trials until the first success.

Settings

Calculator focused on this distribution.

Result and visualization

Calculate PDF/PMF, CDF and percentiles instantly.

Result pending…

Explanation

The geometric distribution describes how many independent trials are needed to obtain the first success, when each trial has the same probability of success \( p \). It is a discrete distribution with support on the positive integers \( k = 1, 2, 3, \ldots \) and is the special case of the negative binomial distribution with \( r = 1 \). Its mean is \( 1/p \) and its variance is \( (1-p)/p^2 \); with a small probability of success, the mean is high and the distribution has a very long right tail.

The memoryless property is its most important feature: given that \( m \) failed trials have already occurred, the distribution of the number of additional trials until the first success is exactly the same as at the start. Use it for "repeat until you succeed" processes: sales prospecting, quality trials until the first defect, network connection attempts, or any situation where the trials are independent of each other and have a constant probability of success.

Formula

\( P(X=k)=(1-p)^{k-1}p,\quad k=1,2,3,\dots \)

Parameters

  • p: probability of success on each trial.
  • k: trial number on which the first success occurs.

Worked example

Situation: A technical support technician resolves each ticket with a probability of \(p = 0.2\) on the first attempt. The attempts are independent. Let \(X\) be the number of the attempt on which the ticket is resolved for the first time.

Question 1: What is the probability that the ticket is resolved on exactly the third attempt, \(P(X = 3)\)?

Solution: We apply the geometric PMF, where the first two attempts fail and the third succeeds: \[ P(X = 3) = (1 - p)^{3-1} \cdot p = (0.8)^2 \times 0.2 = 0.64 \times 0.2 = 0.128 \] There is a 12.8% probability of resolving the ticket on exactly the third attempt.

Question 2: How many attempts are needed on average, \(E[X]\)?

Solution: The mean of the geometric distribution is: \[ E[X] = \frac{1}{p} = \frac{1}{0.2} = 5 \text{ attempts} \] However, the median (50th percentile) is lower: \(P(X \leq k) \geq 0.5 \Rightarrow 1 - 0.8^k \geq 0.5 \Rightarrow k \geq \lceil\ln(0.5)/\ln(0.8)\rceil = 4\). The median is 4 attempts.

Interpretation: With a 20% resolution rate, half of the tickets are resolved in 4 attempts or fewer, but the mean rises to 5 because of the long right tail. Thanks to the memoryless property, if 3 attempts have already failed, the distribution of the number of additional attempts needed is identical to the original distribution.

How to interpret the result

The calculator offers three types of output. The PMF, \( P(X = k) = (1-p)^{k-1} p \), gives the probability that the first success occurs exactly on attempt \( k \). This probability decreases geometrically: attempt 1 always has the highest probability (\( p \)), attempt 2 has \( (1-p)p \), and so on. In the chart, the bars decrease from left to right; the bar for attempt 1 is always the tallest regardless of \( p \).

The CDF, \( P(X \leq k) = 1 - (1-p)^k \), gives the probability of achieving the first success in \( k \) or fewer attempts. If \( p = 0.2 \) and \( k = 5 \), then \( P(X \leq 5) = 1 - 0.8^5 \approx 0.672 \): 67.2% of processes achieve the first success in five or fewer attempts. The right tail \( P(X > k) = (1-p)^k \) measures the probability of not yet having succeeded after \( k \) attempts, and thanks to the memoryless property, this probability does not depend on how many failed attempts have already accumulated.

The percentile result returns the smallest integer \( k \) such that \( P(X \leq k) \geq p \). The 50th percentile (median) is the number of attempts separating the faster half from the slower half in achieving success; the 90th percentile indicates the number of attempts that only 10% of processes exceed without having succeeded, which can be used to size resources in prospecting scenarios or repeated trials.

Frequently asked questions

  • What does the geometric distribution model? The number of trials needed to obtain the first success, when trials are independent with the same probability p; that is the convention used by this calculator.
  • What is the discrete memoryless property? Having accumulated failures does not raise the probability of success on the next trial. After 10 tails in a row, the probability of heads is unchanged: streaks are not “due” to even out.
  • What is its mean and what intuition does it give? The mean is 1/p: if an event has probability 0.05 per attempt, it takes 20 attempts on average to see it for the first time. The distribution is highly skewed, so the median lies below the mean.

Reference: Geometric distribution — Wikipedia