The Geometric Distribution
How many times must you flip a coin before it lands heads for the first time? This simple question, asked of any repeated independent trial, leads to one of the most structurally distinctive distributions in probability. The geometric distribution governs waiting times for a first success in a sequence of independent Bernoulli Trials. It carries a signature property — memorylessness — shared by no other discrete distribution. Understanding why the geometric distribution is the unique memoryless distribution on the positive integers illuminates a deep theme in probability. Certain analytic constraints (like "the past gives no information about the future") pin down a distribution's algebraic form almost completely. The idea matters far beyond coin flips. It models the number of attempts until a component fails a quality test. It also models the number of customers served before one requests a refund. It applies to the number of DNA base-pairs read before an error occurs. It also applies to the number of rounds in a game before a player wins. It is the discrete-time ancestor of the continuous-time Exponential Distribution. The passage from one to the other is a paradigm case of how discrete probability models become continuous limits. The big picture is this: geometric random variables arise whenever we count trials-until-event in an i.i.d. Bernoulli sequence. Every fact about them — mean, variance, memorylessness, tail behavior — follows from the elementary structure of independent trials. It also follows from the algebra of geometric series (hence the name). This article develops the distribution from its defining probabilistic experiment. It proves the closed-form PMF, and establishes the memoryless property as a genuine characterization (not just an incidental fact). It also computes the moments rigorously. The article delivers a full construction of the PMF from first principles. It includes a complete proof of the memorylessness theorem (both directions). It also offers two asymmetric worked examples. It provides a counterexample showing why the "waiting for success" hypothesis cannot be dropped. Finally, it discusses where geometric reasoning appears across statistics, computer science, and physics.
- The geometric distribution counts the number of independent Bernoulli trials up to and including the first success.
- Its PMF is for (support convention stated explicitly).
- Mean , variance — both derived from differentiating a geometric series.
- The defining, characterizing feature is memorylessness: .
- It is the unique discrete distribution on with this property, and the discrete shadow of the continuous Exponential Distribution.
- Key idea: waiting time for a rare event, when trials are independent and identical, forgets how long you've already waited.
Where this lives today
Reliability engineering. The geometric distribution models the number of production units inspected before the first defective unit, under an idealized constant-defect-rate assumption; when the process is continuous-time instead, this becomes lifetime modeling via the Exponential Distribution.
Markov chains. In a two-state Markov chain (or any Markov chain observed at a fixed state), the number of steps until the chain first leaves a state is geometrically distributed — memorylessness here is exactly the Markov property restricted to a single state, making the geometric distribution the discrete-time skeleton underlying the theory of first-passage times.
Computer science and algorithms. Randomized algorithms with independent retries (rejection sampling, random restarts in SAT solvers, hashing with open addressing) have geometric run-time in the number of trials; geometric distributions also appear in the analysis of skip lists, where a node's level is generated by counting successive fair-coin successes.
Statistics — negative binomial and sequential estimation. The geometric distribution is the special case of the Negative Binomial Distribution, and inverse sampling designs (sample until the first success, rather than a fixed sample size) use the geometric distribution directly to build unbiased estimators of .
Information theory. Geometric distributions maximize entropy among all distributions on (or ) with a fixed mean — the discrete analogue of the exponential distribution's maximum-entropy property among continuous distributions on with fixed mean, linking the geometric distribution to coding theory and Huffman-code-like constructions.
Physics and queueing. Discrete-time queueing models (slotted-time systems, e.g., digital communication networks) use the geometric distribution for interarrival or service times, playing the same conceptual role that the exponential distribution plays in continuous-time queueing (the queue and its discrete-time analogues).
Ask the tutor: How exactly does rescaling a geometric distribution as produce the exponential distribution in the limit?
Let be an infinite sequence of independent and identically distributed Bernoulli random variables, , where denotes "success on trial " and denotes "failure." Define
the index of the first success (set on the probability-zero event that no success ever occurs, when ; this event has probability as shown below). Then is said to have the geometric distribution with parameter , written . Its probability mass function is
(Convention note. Some texts instead define , the number of failures before the first success, with PMF for . Both conventions are called "geometric"; this article uses the trials-to-success convention unless stated otherwise, and flags the alternative where relevant.)
Intuition
Picture an endless sequence of independent trials, each a biased coin flip landing "success" with probability . The geometric random variable is simply the trial number on which the first head appears. Since consecutive trials are independent, the probability of waiting exactly trials factors cleanly: you need failures in a row, each of probability , followed by one success of probability . This is where the name "geometric" comes from — the probabilities form a geometric sequence with ratio , the classic shape of exponential decay in discrete steps. The deepest piece of intuition is memorylessness. If you have already failed for trials and ask "how many more trials until success," the answer has exactly the same distribution as starting fresh. This is because the trials are themselves an independent Bernoulli sequence, oblivious to what happened on trials . Conditioning on having survived past trial tells you nothing about the future — the process has no memory of elapsed time, only of the constant per-trial hazard rate .
Central results
Let with as in the Definition above. Then: 1. (PMF is a valid distribution.) for , and ; consequently . 2. (Mean.) . 3. (Variance.) . 4. (Tail formula.) for .
Write .
Part 1 — PMF and normalization. By definition, occurs exactly when trials are all failures and trial is a success:
Since are independent, the probability of this intersection is the product of the individual probabilities:
This uses only the independence hypothesis on the , not identical distribution beyond each being Bernoulli (identical distribution is used to keep constant across trials). To check normalization, sum the geometric series. If (i.e., ),
using the standard geometric series identity for , which holds since . If then and the sum is trivially . In either case the total mass sums to , so is almost surely finite: .
Part 4 — Tail formula (proved first since it feeds into Parts 2–3).
again by independence, for (with the empty intersection at giving probability , consistent).
Part 2 — Mean, via the tail-sum formula. For a random variable taking values in with , the identity
holds (tail-sum formula for expectation of nonnegative integer-valued random variables; this itself follows from Tonelli's theorem applied to , exchanging sum and expectation since all terms are nonnegative). Applying Part 4,
This sum is finite since when , confirming and validating the use of the tail-sum identity retroactively (the identity holds for any nonnegative-integer-valued regardless of finiteness, with both sides equal to when has infinite mean — here we've shown the right side is finite, hence so is ).
Part 3 — Variance, via differentiating the generating series. We compute using the identity
Start from the geometric series for . Differentiating term-by-term (valid inside the radius of convergence, by standard power series theory) gives
and differentiating again,
Now
Hence
Finally,
∎
(a) Necessity. Let with . Then for all integers ,
(b) Sufficiency / uniqueness. Conversely, suppose is a random variable taking values in with for every , and suppose satisfies the memoryless property
Then for some , i.e. 's distribution is exactly the tail formula .
(a) Necessity. By Part 4 of the previous theorem, for all , where . Since we have , so for every , and conditioning is well-defined. Compute, using the definition of conditional probability and (so the intersection is just ):
This proves the memoryless identity. Note the essential algebraic mechanism: , the multiplicativity of the exponential-in- tail — this is exactly what will force the converse below.
(b) Sufficiency / uniqueness. Define for . We are given:
- (since always, by hypothesis that takes values in );
- for all (hypothesis);
- is non-increasing (since , monotonicity of probability measures);
- the memoryless relation, rewritten using (valid since ), gives the functional equation
We solve () directly (this is the discrete analogue of Cauchy's functional equation, and here elementary induction suffices — no continuity assumption is needed because the domain is the integers). Claim: for all . Proof of claim, by induction on . Base case : , true. Base case is trivial: . Inductive step: suppose for some . Apply () with :
By induction, for all . This proves the claim. Now set . Since is non-increasing with , we have , i.e. . We rule out the endpoints and :
- If : then for all , i.e., for every , forcing with probability — contradicting the hypothesis that takes values in (a proper, finite-valued random variable). So .
- If : then for all , so for , but we assumed for all including — contradiction. So .
Hence , and setting , we conclude
which is precisely the tail formula of Part 4 characterizing . Since a distribution on is uniquely determined by its tail probabilities for all (because recovers the PMF), .
∎Worked examples
Example 1 — Quality control with an asymmetric defect rate. A factory tests circuit boards one at a time; each board independently fails a stress test with probability (so it passes — the "success" we're waiting for in the sense of "first passing board" — with probability... let's set this up carefully with an asymmetric, concrete scenario). Setup. An inspector needs a board that passes a stringent voltage test. Independently, each board passes with probability (an unusually strict test — most boards fail it). Let be the number of boards tested up to and including the first one that passes. Then . (i) Probability the inspector needs to test more than boards. By the tail formula (Theorem, Part 4),
Compute : ; ; ; then So , about a chance testing runs past ten boards. (ii) Expected number of boards tested. By the Theorem (Part 2), , so on average the inspector tests about boards. (iii) Probability the very first passing board is the one tested, given that the first four all failed differently is not needed — but let's use memorylessness for a genuinely nontrivial question: given that the first boards all failed, what is the probability that at least more boards are needed? By memorylessness (Theorem part a) with (we want , i.e. "at least more" means ):
Compute . So even after consecutive failures, there is still a chance at least more boards will be needed — exactly the same probability as before any testing began that the first trials would fail. The six prior failures changed nothing about the forward-looking distribution.
Example 2 — A negotiation with a decaying acceptance probability check, using variance and a direct PMF calculation. A sales representative cold-calls prospective clients. Suppose (idealizing) each call independently results in a signed contract with probability . Let be the number of the call on which the first contract is signed. (i) Exact probability the first sale happens on exactly the call.
Compute : ; ; Let's get more precision: : . Compute . More carefully: . Sum . So (standard tables give ). Then
So about a chance the very first sale lands on call number . (ii) Mean and standard deviation of .
Standard deviation: . Notice (both close to ), reflecting the general geometric fact , near when is small — the distribution is heavily right-skewed with spread comparable to its mean, a hallmark of rare-event waiting times. (iii) Probability that the number of calls needed is within one standard deviation of the mean, i.e., , effectively . Since always,
Compute . First . Then squared again: . So , giving
So about of the time, the representative's first success falls within one standard deviation of the mean number of calls — consistent with, though not identical to, the rough heuristic from the (inapplicable here) normal approximation, since the geometric distribution is markedly skewed.
The Theorem's derivation of the PMF used both independence of the trials and a constant success probability across trials. Drop either, and the clean geometric form — and memorylessness — collapses.
Concrete construction. Let be Bernoulli trials that are not identically distributed: suppose trial succeeds with probability
with all still mutually independent. Let as before. Compute the actual PMF:
This is not of the geometric form for any single constant : note but , a dramatic increase, whereas a genuine geometric PMF is strictly decreasing in (since forces to shrink monotonically). No choice of constant can match both and simultaneously while also matching , since a true geometric with would give .
Memorylessness fails. Check whether as memorylessness would require (taking ).
Since , memorylessness fails badly: having already failed trial , the conditional chance of needing more than one further trial () is far smaller than the unconditional chance of needing more than one trial from the start () — because trial was a low-probability trial () while trial onward are high-probability (), so surviving trial makes an imminent success (trial 2) very likely. This exhibits exactly why the identical-distribution hypothesis is load-bearing: with non-constant , both the closed-form PMF and the memoryless property break down simultaneously, confirming these are not independent accidents but consequences of the same hypothesis.
Scope, edge cases & common traps
| Situation | What happens | Common error |
|---|---|---|
| deterministically (a degenerate "geometric") | Forgetting a.s.; plugging into correctly gives , consistent | |
| is not a proper random variable (); usually excluded from the parameter space | Silently allowing and dividing by in | |
| Convention mismatch | "Number of failures before success" () vs. "trial number of success" () are different distributions differing by a shift of | Copying a mean/variance formula from a source using the other convention |
| Finite trial sequences | If only trials are available (no infinite sequence), is truncated geometric — no longer supported on all of , memorylessness fails at the boundary | Applying the unbounded-support memoryless theorem to a capped process |
| Multiple "successes" needed | Waiting for the success is the Negative Binomial Distribution, a sum of i.i.d. geometrics, not itself geometric for | Confusing geometric with negative binomial |
The mathematician behind it
Origins · 1 minJacob Bernoulli and how this was discovered
Jacob Bernoulli, a member of the remarkable Bernoulli family of mathematicians, laid the groundwork for the study of repeated independent trials in his posthumously published Ars Conjectandi (1713). Though the term "geometric distribution" postdates him, his systematic treatment of what we now call Bernoulli trials — and his proof of the weak law of large numbers for the binomial setting — created the conceptual apparatus (independent repeated trials with fixed success probability) from which the geometric distribution emerges as the natural "waiting time" companion to the binomial "count of successes in fixed trials." The geometric distribution is, in a precise sense, the dual question to the one Bernoulli asked: instead of fixing the number of trials and counting successes, fix the target of one success and count the trials.
Why is the geometric distribution called "geometric"?
Because its probability mass function forms a geometric sequence in : each successive probability is obtained from the previous one by multiplying by the fixed ratio . This is the same algebraic structure as a geometric series in calculus, , and indeed the normalization proof (showing probabilities sum to ) is a direct application of the geometric series formula . The name reflects this shared exponential-decay-by-constant-ratio structure, not any connection to geometric shapes or geometry in the spatial sense.
Is the geometric distribution the same as the exponential distribution?
No, but they are close relatives. The geometric distribution is discrete, supported on positive integers, and models trials-to-first-success in discrete time. The Exponential Distribution is continuous, supported on , and models waiting time to an event in continuous time. Both share the memoryless property, and in fact the exponential distribution can be obtained as a limit of rescaled geometric distributions as the number of trials per unit time tends to infinity while the per-trial success probability shrinks proportionally — this is the discrete-to-continuous limit connecting the two, foreshadowed but not proved in detail here.
Which convention should I use: support starting at or at ?
Either is standard, but they describe different (shifted) random variables, so consistency matters. The "trials-to-success" convention (, used throughout this article) counts the trial number of the first success and has mean . The "failures-before-success" convention () counts only the failures and has mean . Always check which convention a textbook, software package (e.g., many programming libraries default to the convention), or problem statement uses before applying a formula, since plugging numbers into the wrong convention silently shifts every answer by .
Does memorylessness mean past failures are "wasted" or irrelevant?
In a precise probabilistic sense, yes: given that you have already failed times, the distribution of the number of additional trials needed is identical to the distribution of trials needed starting fresh. This can feel counterintuitive (the "gambler's fallacy" intuition suggests a run of failures should make success "overdue"), but the geometric model's independence assumption directly rules this out — each trial's outcome is generated independently of all history, so there is no accumulating "pressure" toward success. This is a modeling choice (independent, identical trials), not a universal truth about all real waiting-time processes.
How does the geometric distribution relate to the binomial distribution?
Both arise from the same underlying sequence of i.i.d. Bernoulli trials, but they ask dual questions. The Binomial Distribution fixes the number of trials in advance and counts the (random) number of successes among them. The geometric distribution instead fixes the target of exactly one success and counts the (random) number of trials required to reach it. This duality is why the same parameter and the same independence structure underlie both, and why they appear together throughout applied probability whenever "fixed-trials" versus "fixed-target" experimental designs are compared.
Can the geometric distribution have variance smaller than its mean?
Yes, whenever . Since and , the ratio is less than exactly when . This contrasts with the Poisson distribution, where mean and variance are always equal, and illustrates that the geometric distribution's dispersion behavior depends heavily on whether successes are common ( large, low variance relative to mean) or rare ( small, variance can substantially exceed the mean).
What happens to the geometric distribution as ?
As , successes become increasingly rare, so and as well — the waiting time grows without bound, as expected. If one simultaneously rescales time (letting the number of trials per unit time interval grow while shrinks proportionally, i.e., trials per interval of length ), the rescaled waiting time converges in distribution to an Exponential random variable. This limiting relationship is the precise sense in which the exponential distribution is the "continuous-time geometric distribution," a connection developed fully when studying continuous waiting-time models.