Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Geometric Distribution






Geometric Distribution: Trials Until First Success


The geometric distribution is based on a sequence of independent Bernoulli trials that continues until the first success occurs. The number of trials is not fixed in advance; instead, the experiment stops as soon as success is observed. The random variable represents how long it takes to achieve the first success, making the timing of success — not the total count — the central focus.

Key Terms

Geometric Distribution— number of trials until first success
Bernoulli Experiment— the single trial repeated until success
Sequence of Bernoulli Trials— the repeated structure of the geometric
Negative Binomial Distribution— the geometric is the r=1r=1 special case
Expected Value— E[X]=1/pE[X] = 1/p
Variance— Var⁡(X)=(1−p)/p2\operatorname{Var}(X) = (1-p)/p^2

See All Probability Definitions →


The Probabilistic Experiment Behind geometric distribution

Some experiments are repeated until something finally happens.
Roll a die until a 6 comes up, shoot free throws until one goes in, call customers until one says yes. Nobody fixes the number of attempts in advance; the question is how many it takes.
Rolling a fair die until the first 6: the first roll succeeds with probability 1/6, and each later roll is a little less likely to be the one.
For the first 6 to arrive on roll kk, the first k−1k - 1 rolls must all miss and roll kk must hit.
first 6 on roll kwhat must happenprobability
161/6 ≈ 0.167
2not 6, then 6(5/6)(1/6) ≈ 0.139
3not 6, not 6, then 6(5/6)²(1/6) ≈ 0.116
4three misses, then 6(5/6)³(1/6) ≈ 0.096
kk − 1 misses, then 6(5/6)ᵏ⁻¹(1/6)
Those probabilities are forced: each miss has probability 5/6, the rolls are independent, so the factors multiply.
Every row is k−1k - 1 factors of 56\frac{5}{6} followed by one factor of 16\frac{1}{6}. Nothing else could happen — the first success has to come after a run of failures, and independence turns that run into a product.
Each trial is a Bernoulli experiment: two outcomes, constant success probability, and independence between trials. The random variable counts when success occurs, not how many successes occur in total. This makes the geometric distribution fundamentally about waiting time rather than accumulation.
The definition
The geometric distribution with success probability pp is the distribution of the number of independent trials needed to get the first success: P(X=k)=(1−p)k−1pP(X = k) = (1 - p)^{k-1} p for k=1,2,3,…k = 1, 2, 3, \dots
So the number of rolls until the first 6 is geometric with p=16p = \frac{1}{6}.
It is a waiting-time distribution: X counts when the first success comes, not how many successes there are.
The geometric distribution serves to count the number of trials required until the first success occurs. Unlike the binomial distribution, the number of trials is not fixed in advance. Instead, trials continue indefinitely until success happens for the first time.

Example
Flipping a coin repeatedly until the first heads appears. If X=4X=4, this means the first three flips were tails and the fourth flip was heads. The experiment stops as soon as success occurs.

Its signature feature: a run of failures changes nothing about the wait still ahead.
A defining characteristic of the geometric distribution is the memoryless property: the probability that success occurs in future trials does not depend on how many failures have already occurred. The process effectively "restarts" after each failure.
In symbols:
Geometric Memoryless
P(X>m+n∣X>m)=P(X>n)P(X > m + n \mid X > m) = P(X > n)
Learn more about this formula: Geometric Memoryless →
Pitfall: Expecting a success to be due
For a fair coin after five tails, reading P(X>6)=164P(X > 6) = \frac{1}{64} as the chance that flip six is a tail too makes heads look 6364\frac{63}{64} likely. Given the five tails, P(X=6∣X>5)=12P(X = 6 \mid X > 5) = \frac{1}{2}, as on the first flip.
Read the identity with mm as the number of trials that have already failed and nn as a number of trials still to come. The left side is the chance of waiting more than nn further trials after those failures; the right side is the chance of waiting more than nn trials from the very start. The two are equal for every mm: the trials already played are spent, and each new trial succeeds with the same probability pp.
Geometric PMF with p = 0.3 and the PMF given two failures: the same bars, shifted two trials to the rightky123456789101112after 2 failuresblue: P(X = k)amber: given X > 2same bars, 2 steps laterAfter failures the count restarts: no memory of the past
Restarting after failures

Blue bars: the probability that the first success comes on trial k, for p = 0.3. Amber bars: the same probabilities once two failures have already happened. They are the blue bars moved two trials to the right, unchanged in height: the chance that success comes 1, 2, 3, … trials from now does not depend on how many trials have failed so far.

This is the discrete counterpart of the exponential distribution's memoryless property.
However many trials have failed, the wait still ahead is a fresh geometric wait with the same pp.
What generalizes and what was particular — and one convention to check.
Any success probability pp between 00 and 11 works the same way; 16\frac{1}{6} was particular to the die. Some books count the failures before the first success instead of the trials, which shifts everything by one: Y=X−1Y = X - 1 takes the values 0,1,2,…0, 1, 2, \dots Check which count a formula uses before applying it; this page counts trials, as the probability mass function section shows.
The rest of the page covers the notation, the parameter, the PMF and CDF, the mean, variance, mode and median, and the moment generating function.

Geometric Notation

Notation

Geometric Notation

The geometric is the family's cautionary tale: one name, two incompatible definitions, and nothing but the notation to tell them apart. The parameter-convention warning names this page as its worst case — the marks below are how to read which geometric a source means before trusting a single formula. All catalogued among the probability symbols.
The declaration tilde and capital/lowercase split come from random variable notation and distribution notation; q=1−pq = 1 - p from binomial notation; the given-bar from conditional probability notation; E[X]E[X] and Var⁡(X)\operatorname{Var}(X) from expected value and variance notation.
X∼Geom⁡(p)X \sim \operatorname{Geom}(p)
X follows a geometric distribution — but which one, the declaration alone cannot say
Geom⁡(p)\operatorname{Geom}(p), spelled-out Geometric⁡(p)\operatorname{Geometric}(p), occasionally G(p)G(p) — and behind every spelling, two rival definitions: XX counts the trials up to and including the first success, or the failures before it. The declaration looks identical either way; only the surrounding marks reveal the convention.
CasesTwo fingerprints settle it: the support line — starting at 1,2,3,…1, 2, 3, \ldots means trials, starting at 0,1,2,…0, 1, 2, \ldots means failures — and the mean, E[X]=1/pE[X] = 1/p for trials against q/pq/p for failures. Much software counts failures while most introductory texts count trials, so the check is not optional when moving between the two.
Do not confuseEach other, silently. Every formula on this page shifts by exactly one between the conventions — quoting a trials-convention mean into a failures-convention model is off by one forever, with no error message anywhere.
P(X=k)=qk−1pP(X{=}k) = q^{k-1}p vs qkpq^k p
k-minus-one failures then a success — or k failures then a success
The exponent carries the convention: qk−1pq^{k-1}p spells "the kk-th trial succeeds after k−1k{-}1 failures", qkpq^k p spells "kk failures, then success" — the failure abbreviation q doing the compression in both. Read the exponent before the formula: it is the convention's signature inside the pmf itself.
CasesThe tail closes in one mark: P(X>k)=qkP(X > k) = q^k under the trials convention — surviving kk trials means kk straight failures — the cleanest tail-probability formula any distribution owns, and the engine behind the memoryless property below.
Do not confuseA typo. The two pmfs differ only in an exponent's −1-1 — easy to "correct" in either direction when copying between sources; the support clause beside the formula is the arbiter of which exponent is right.
P(X>m+n∣X>m)=P(X>n)P(X > m + n \mid X > m) = P(X > n)
given m fruitless trials so far, the remaining wait behaves like a fresh start
The signature property written in marks: two survival tails and a given-bar, stating that conditioning on mm failures shifts nothing — the wait restarts clean. Among discrete distributions only the geometric satisfies this line; its continuous twin is the exponential, which owns the same identity with real-valued slots.
CasesThe proof is one substitution: with P(X>k)=qkP(X > k) = q^k, the left side becomes qm+n/qm=qnq^{m+n}/q^m = q^n — the tail formula from the previous entry doing all the work.
Do not confuseThe gambler's intuition it refutes. The identity says a streak of failures does not make success "due" — reading the conditional as accumulating pressure is exactly the fallacy the formula exists to forbid.
DownloadPNG2×PDF
Notation · Cheat sheet
Distribution Notation at a Glance
The marks from the notation cards across the distribution pages: how each is read and what it means. Every group links to the full card on its page.
Distributions
(Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P})
a probability space
Outcomes, events, and the probability measure.
PX(A)\mathbb{P}_X(A)
the distribution of X
Equals P(X∈A)\mathbb{P}(X \in A).
X=dYX \overset{d}{=} Y
equal in distribution
Same law, not necessarily the same values.
Binomial
X∼Bin⁡(n,p)X \sim \operatorname{Bin}(n, p)
binomial, n trials, p
The number of successes in nn independent trials.
q=1−pq = 1 - p
q, the failure probability
An abbreviation, not a new parameter.
GeometricThis page
Geom⁡(p)\operatorname{Geom}(p)
geometric with p
Two conventions: count trials, or count failures.
qk−1pq^{k-1}p vs qkpq^k p
the two pmfs
The exponent shows which convention is in use.
Negative binomial
NB⁡(r,p)\operatorname{NB}(r, p)
negative binomial
Trials until the rr-th success.
k=r,r+1,…k = r, r{+}1, \ldots
the support starts at r
Fewer trials cannot hold rr successes.
Hypergeometric
Hyp⁡(N,K,n)\operatorname{Hyp}(N, K, n)
hypergeometric
Population NN with KK successes; nn draws without replacement.
(Kk)(N−Kn−k)(Nn)\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}
the pmf
Successes chosen, failures chosen, over all samples.
Poisson
Pois⁡(λ)\operatorname{Pois}(\lambda)
Poisson with rate lambda
Counts of events in a window.
λ\lambda
lambda
The expected count per window; it depends on the window size.
Discrete uniform
DU⁡(a,b)\operatorname{DU}(a, b)
discrete uniform
Each integer from aa to bb equally likely.
1b−a+1\frac{1}{b - a + 1}
one over the count
The +1+1 counts both endpoints.
Continuous uniform
X∼U(a,b)X \sim U(a, b)
uniform from a to b
The slots are the endpoints, not a centre and a spread.
1b−a\frac{1}{b - a}
one over the width
A flat density; no +1+1 here.
Exponential
Exp⁡(λ)\operatorname{Exp}(\lambda)
exponential with rate lambda
Some books put the scale β=1λ\beta = \frac{1}{\lambda} in the slot.
P(X>x)=e−λxP(X > x) = e^{-\lambda x}
the survival tail
The chance of waiting longer than xx.
Normal
N(μ,σ2)N(\mu, \sigma^2)
normal, mean mu
Second slot: usually the variance; some texts use σ\sigma.
Z∼N(0,1)Z \sim N(0, 1)
capital Z, standard normal
A score z=x−μσz = \frac{x - \mu}{\sigma} counts standard deviations.
φ(z),  Φ(z)\varphi(z), \; \Phi(z)
phi; capital Phi
The standard normal density and its CDF.
Same marks, different job
N(μ,σ2)N(\mu, \sigma^2)Check whether the second slot is the variance or the standard deviation.
Exp⁡(λ)\operatorname{Exp}(\lambda)Rate or scale: the two readings give means 1λ\frac{1}{\lambda} and λ\lambda.
U(a,b)U(a, b) vs DU⁡(a,b)\operatorname{DU}(a, b)Width b−ab - a against a count of b−a+1b - a + 1 values.
Φ\Phi vs φ\varphiCapital is the CDF, lowercase the density.
Distribution Notation at a Glance·/probability/distributionsLearn Math Class

Parameters


pp: probability of success on a single trial, with 0<p≤10<p≤1

The geometric distribution models the number of trials needed to get the first success in a sequence of independent Bernoulli trials.

There's only one parameter — pp, the chance of success each time — which completely determines the shape of the distribution.

The outcomes are positive integers: 1,2,3,…1,2,3,… where each value represents the trial number on which success first occurs.

Probability Mass Function (PMF) and Support (Range)


The probability mass function (PMF) of a geometric distribution is given by:

Geometric PMF
P(X=k)=(1−p)k−1p,k=1,2,3,…P(X = k) = (1-p)^{k-1} p, \quad k = 1, 2, 3, \ldots
Learn more about this formula: Geometric PMF →



* First Success: The geometric distribution models the number of trials needed to get the first success in a sequence of independent Bernoulli trials.

* Support (Range of the Random Variable):
• The random variable XX can take on values 1,2,3,…1, 2, 3, \ldots (all positive integers).
• X=kX = k means the first success occurs on the kk-th trial.
• The support is thus a countably infinite set.

* Logic Behind the Formula:
• (1−p)k−1(1-p)^{k-1}: The probability of getting k−1k-1 failures before the first success
• pp: The probability of success on the kk-th trial
• The total probability sums to 1:

∑k=1∞P(X=k)=∑k=1∞(1−p)k−1p=p∑k=1∞(1−p)k−1=p⋅11−(1−p)=p⋅1p=1\sum_{k=1}^{\infty} P(X = k) = \sum_{k=1}^{\infty} (1-p)^{k-1} p = p \sum_{k=1}^{\infty} (1-p)^{k-1} = p \cdot \frac{1}{1-(1-p)} = p \cdot \frac{1}{p} = 1

• This uses the geometric series formula: ∑k=0∞rk=11−r\sum_{k=0}^{\infty} r^k = \frac{1}{1-r} for ∣r∣<1|r| < 1

Geometric Distribution

Trials until first success (probability p)

Explanation

The geometric distribution models the number of trials needed to get the first success in repeated independent trials. The probability mass function is P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1} p. The expected value is E[X]=1pE[X] = \frac{1}{p} and the variance is Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2}. Common applications include counting coin flips until the first heads, attempts until the first sale is made, or trials until equipment failure occurs.

0.0000.0600.1200.1800.2400.3001357911131516Value (k)Probability P(X = k)
Geometric PMF, p = 0.3

The tallest bar is at 1, the first trial, and every later bar is the previous one scaled by 1 minus p: the probability of needing k trials decays geometrically, which gives the distribution its name. The bars continue forever but their total is 1. Change p and watch the decay speed up or slow down on the PMF visualizer.

Accumulating the bars gives a closed-form CDF.

Cumulative Distribution Function (CDF)


The cumulative distribution function (CDF) of a geometric distribution is given by:

Geometric CDF
FX(k)=P(X≤k)=1−(1−p)kF_X(k) = P(X \leq k) = 1 - (1-p)^k
Learn more about this formula: Geometric CDF →


Where:
pp = probability of success on each trial
kk = number of trials until and including the first success (where k≥1k \geq 1)
(1−p)(1-p) = probability of failure on each trial

Intuition Behind the Formula


Definition: The CDF gives the probability that the first success occurs on or before trial kk.

Complement Approach:
Instead of summing probabilities from 1 to kk, it's easier to use the complement. The event "first success on or before trial kk" is the complement of "first success after trial kk", which means all of the first kk trials are failures:

Cumulative Distribution Function (CDF)
P(X≤k)=1−P(all first k trials fail)=1−(1−p)kP(X \leq k) = 1 - P(\text{all first } k \text{ trials fail}) = 1 - (1-p)^k

Pitfall: Adding p for each trial
Writing P(X≤6)=6×16=1P(X \leq 6) = 6 \times \frac{1}{6} = 1 for a die adds the chance of a 6 on each roll and makes a 6 within six rolls certain. The complement gives P(X≤6)=1−(56)6≈0.665P(X \leq 6) = 1 - \left(\frac{5}{6}\right)^6 \approx 0.665.

The event that the first success comes within kk trials can happen in kk different ways, one for each trial on which it can arrive, and each way has its own probability. The complement happens in only one way: all of the first kk trials fail. Because the trials are independent, those kk failure probabilities multiply, which is why the complement is the shorter road to the CDF.

Verification by Summation:
We can verify this by summing the PMF:

Cumulative Distribution Function (CDF)
P(X≤k)=∑i=1k(1−p)i−1p=p∑i=0k−1(1−p)i=p⋅1−(1−p)k1−(1−p)=1−(1−p)kP(X \leq k) = \sum_{i=1}^{k} (1-p)^{i-1}p = p\sum_{i=0}^{k-1} (1-p)^i = p \cdot \frac{1-(1-p)^k}{1-(1-p)} = 1-(1-p)^k
The summation check above, split into its four equalities.
DownloadPNG2×PDF
ShowP(X≤k)=1−(1−p)kP(X \leq k) = 1 - (1-p)^k
1
P(X≤k)=∑i=1k(1−p)i−1pP(X \leq k) = \sum_{i=1}^{k} (1-p)^{i-1}p
PMFSumming the PMF over the first kk trials
2
=p∑i=0k−1(1−p)i= p\sum_{i=0}^{k-1} (1-p)^i
factorTake out pp and start the index at 00
3
=p⋅1−(1−p)k1−(1−p)= p \cdot \frac{1-(1-p)^k}{1-(1-p)}
key stepThe sum of a finite geometric series with ratio 1−p1-p
4
=1−(1−p)k= 1-(1-p)^k
cancelThe denominator is pp
P(X≤k)=1−(1−p)kP(X \leq k) = 1 - (1-p)^k
The same result as the complement approach.
Checking the geometric CDF by summationLearn Math Class
The finite geometric series is the gold step; its denominator 1−(1−p)1-(1-p) equals pp and cancels the factor in front.
Monotonic Property: As kk increases, (1−p)k(1-p)^k decreases toward 0, so FX(k)F_X(k) increases toward 1, which reflects the increasing certainty that success will eventually occur.

Did you know: Zero in 300 caps the rate near 1%
If nn trials all fail, any pp above 3n\frac{3}{n} would have made that run less than 5% likely, since (1−3n)n<e−3≈0.05\left(1 - \frac{3}{n}\right)^n < e^{-3} \approx 0.05. So no side effect in 300 patients makes a rate above 1% implausible.

The same tail can be read in the other direction. Suppose pp is unknown and nn trials have been run with no success at all. Each candidate value of pp gives that run the probability (1−p)n(1-p)^n, which is tiny when pp is large, so a long run of failures rules out the larger values of pp and leaves only the small ones as believable.

Geometric Distribution CDF

CDF for waiting time until first success

CDF Explanation

The geometric CDF has a closed form: F(k)=P(X≤k)=1−(1−p)kF(k) = P(X \leq k) = 1 - (1-p)^k for k≥1k \geq 1. This represents the probability that the first success occurs on or before trial kk. The CDF starts at F(1)=pF(1) = p (success on the first trial) and asymptotically approaches 1.0 as kk increases. The rate of increase depends on pp: larger values of pp lead to faster convergence to 1.0, while smaller values result in a more gradual increase, reflecting the longer expected waiting time.
0.00.20.40.60.81.015913172125293334Value (k)Cumulative Probability F(k)
Geometric CDF, p = 0.3

The event that the first success comes within k trials has probability 1 minus (1 minus p) to the k, the complement of k straight failures. The staircase climbs quickly at first and then flattens as that complement approaches 1. Read the probability of the event X ≤ k at any step on the discrete CDF explorer.

The mean of the distribution is derived next.
Questions about success within kk trials are answered through their opposite: kk failures in a row.

Expected Value (Mean)


As explained in the general case for calculating expected value, the expected value of a discrete random variable is computed as a weighted sum where each possible value is multiplied by its probability:

Expected Value (Discrete)
E[X]=∑xx⋅P(X=x)E[X] = \sum_{x} x \cdot P(X = x)
Learn more about this formula: Expected Value (Discrete) →


For the geometric distribution, we apply this general formula to the specific probability mass function of this distribution.

Formula


Geometric Mean
E[X]=1pE[X] = \frac{1}{p}
Learn more about this formula: Geometric Mean →


Where:
pp = probability of success on each trial

Derivation and Intuition


Starting from the general definition and substituting the PMF P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1}p for k=1,2,3,…k = 1, 2, 3, \ldots:

Expected Value (Mean)
E[X]=∑k=1∞k⋅(1−p)k−1p=p∑k=1∞k⋅(1−p)k−1E[X] = \sum_{k=1}^{\infty} k \cdot (1-p)^{k-1} p = p \sum_{k=1}^{\infty} k \cdot (1-p)^{k-1}

Using the formula for the derivative of a geometric series, we recognize that:

Expected Value (Mean)
∑k=1∞k⋅rk−1=1(1−r)2\sum_{k=1}^{\infty} k \cdot r^{k-1} = \frac{1}{(1-r)^2}

Substituting r=1−pr = 1-p:

Expected Value (Mean)
E[X]=p⋅1(1−(1−p))2=p⋅1p2=1pE[X] = p \cdot \frac{1}{(1-(1-p))^2} = p \cdot \frac{1}{p^2} = \frac{1}{p}
The derivation of the mean one step at a time. Use Next and Back to move through it.
DownloadPNG2×PDF
ShowE[X]=1pE[X] = \frac{1}{p}
1 / 5
Substitute the PMF
E[X]=∑k=1∞k⋅(1−p)k−1p\displaystyle E[X] = \sum_{k=1}^{\infty} k \cdot (1-p)^{k-1} p
The general definition with P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1}p for k=1,2,3,…k = 1, 2, 3, \ldots
E[X]=1pE[X] = \frac{1}{p}
Deriving the geometric meanLearn Math Class
Everything rests on the series ∑krk−1=1(1−r)2\sum k r^{k-1} = \frac{1}{(1-r)^2}: with r=1−pr = 1-p its denominator becomes p2p^2, and one factor pp cancels.
The result E[X]=1pE[X] = \frac{1}{p} captures an intuitive relationship: if the probability of success on each trial is pp, then on average you need 1p\frac{1}{p} trials to achieve the first success. The smaller the probability of success, the more trials you expect to need.

Example


Consider rolling a die until you get a 6, where p=16p = \frac{1}{6}:

Expected Value (Mean)
E[X]=11/6=6E[X] = \frac{1}{1/6} = 6

On average, you expect to roll the die 6 times, counting the roll that shows the first 6. This makes intuitive sense: with a 1-in-6 chance per roll, the average wait is 6 rolls.

To compute the expected value of a geometric distribution for your own parameters, step by step, use the geometric expected value calculator.

Variance and Standard Deviation


The variance of a discrete random variable measures how spread out the values are around the expected value. It is computed as:

Variance and Standard Deviation
Var(X)=E[(X−μ)2]=∑x(x−μ)2P(X=x)\mathrm{Var}(X) = \mathbb{E}[(X - \mu)^2] = \sum_{x} (x - \mu)^2 P(X = x)

Or using the shortcut formula:

Variance and Standard Deviation
Var(X)=E[X2]−μ2\mathrm{Var}(X) = \mathbb{E}[X^2] - \mu^2

For the geometric distribution, we apply this formula to derive the variance.

Formula


Geometric Variance
Var(X)=1−pp2\mathrm{Var}(X) = \frac{1-p}{p^2}
Learn more about this formula: Geometric Variance →


Where:
pp = probability of success on each trial
(1−p)=q(1-p) = q = probability of failure on each trial

Derivation and Intuition


Starting with the shortcut formula, we need to calculate E[X2]\mathbb{E}[X^2].

We know from the expected value section that μ=1p\mu = \frac{1}{p}.

Using the PMF P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1}p and applying summation techniques involving derivatives of geometric series:

Variance and Standard Deviation
E[X2]=∑k=1∞k2(1−p)k−1p=2−pp2\mathbb{E}[X^2] = \sum_{k=1}^{\infty} k^2 (1-p)^{k-1} p = \frac{2-p}{p^2}

Applying the shortcut formula:

Variance and Standard Deviation
Var(X)=2−pp2−(1p)2=2−pp2−1p2=1−pp2\mathrm{Var}(X) = \frac{2-p}{p^2} - \left(\frac{1}{p}\right)^2 = \frac{2-p}{p^2} - \frac{1}{p^2} = \frac{1-p}{p^2}
The variance computation above as a chain, from E[X2]\mathbb{E}[X^2] to the shortcut formula.
DownloadPNG2×PDF
ShowVar(X)=1−pp2\mathrm{Var}(X) = \frac{1-p}{p^2}
1
E[X2]=∑k=1∞k2(1−p)k−1p\mathbb{E}[X^2] = \sum_{k=1}^{\infty} k^2 (1-p)^{k-1} p
PMFUsing the PMF P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1}p
2
=2−pp2= \frac{2-p}{p^2}
seriesSummation techniques involving derivatives of geometric series
3
Var(X)=2−pp2−(1p)2\mathrm{Var}(X) = \frac{2-p}{p^2} - \left(\frac{1}{p}\right)^2
key stepThe shortcut formula, with μ=1p\mu = \frac{1}{p} from the expected value section
4
=2−pp2−1p2= \frac{2-p}{p^2} - \frac{1}{p^2}
squareSquaring the mean
5
=1−pp2= \frac{1-p}{p^2}
subtractSame denominator
Var(X)=1−pp2\mathrm{Var}(X) = \frac{1-p}{p^2}
Deriving the geometric varianceLearn Math Class
Once E[X2]\mathbb{E}[X^2] is known, the gold step reduces the variance to subtracting two fractions over the same denominator p2p^2.
The result Var(X)=1−pp2\mathrm{Var}(X) = \frac{1-p}{p^2} shows that variance increases as pp decreases. When success is rare (small pp), the waiting time becomes highly variable—sometimes you succeed quickly, sometimes you wait a very long time. The quadratic relationship with pp in the denominator means variance grows rapidly as pp approaches zero.

Standard Deviation


Variance and Standard Deviation
σ=1−pp2=1−pp\sigma = \sqrt{\frac{1-p}{p^2}} = \frac{\sqrt{1-p}}{p}

Example


Consider rolling a die until you get a 6, where p=16p = \frac{1}{6}:

Variance and Standard Deviation
Var(X)=1−16(16)2=56136=56×36=30\mathrm{Var}(X) = \frac{1 - \frac{1}{6}}{(\frac{1}{6})^2} = \frac{\frac{5}{6}}{\frac{1}{36}} = \frac{5}{6} \times 36 = 30

Variance and Standard Deviation
σ=30≈5.477\sigma = \sqrt{30} \approx 5.477

The variance of 30 and standard deviation of about 5.5 indicate substantial variability around the expected wait time of 6 rolls. You might get lucky and succeed on roll 2, or unlucky and wait 15+ rolls.

When success is rare, the spread of the wait is nearly as large as the wait itself.

Mode and Median

Mode


The mode is the value of kk (number of trials until first success) with the highest probability—the peak of the PMF.

For the geometric distribution, the mode is always:

Mode and Median
Mode=1\text{Mode} = 1

Intuition: The geometric PMF is pX(k)=(1−p)k−1pp_X(k) = (1-p)^{k-1}p, which decreases monotonically. The probability is highest at the first trial and decreases exponentially with each subsequent trial. Since each additional trial multiplies the probability by (1−p)<1(1-p) < 1, the maximum probability always occurs at k=1k = 1.

Example
For p=0.3p = 0.3:
• P(X=1)=0.3P(X = 1) = 0.3
• P(X=2)=0.7×0.3=0.21P(X = 2) = 0.7 \times 0.3 = 0.21
• P(X=3)=0.49×0.3=0.147P(X = 3) = 0.49 \times 0.3 = 0.147
The mode is 1, representing that getting success on the first trial is always the most likely single outcome.

This holds regardless of the value of pp—whether success is rare (pp near 0) or common (pp near 1), the first trial is always most probable.

Median


The median is the value mm such that P(X≤m)≥0.5P(X \leq m) \geq 0.5 and P(X≥m)≥0.5P(X \geq m) \geq 0.5.

For the geometric distribution, the median can be found by solving:

Mode and Median
∑k=1m(1−p)k−1p≥0.5\sum_{k=1}^{m} (1-p)^{k-1}p \geq 0.5

Using the CDF F(k)=1−(1−p)kF(k) = 1 - (1-p)^k, we solve:

Mode and Median
1−(1−p)m≥0.51 - (1-p)^m \geq 0.5

Mode and Median
(1−p)m≤0.5(1-p)^m \leq 0.5

Mode and Median
m≥ln⁡(0.5)ln⁡(1−p)=−ln⁡(2)ln⁡(1−p)m \geq \frac{\ln(0.5)}{\ln(1-p)} = \frac{-\ln(2)}{\ln(1-p)}

The median is:

Mode and Median
Median=⌈−ln⁡(2)ln⁡(1−p)⌉\text{Median} = \left\lceil \frac{-\ln(2)}{\ln(1-p)} \right\rceil

Example:
For p=0.5p = 0.5:

Mode and Median
Median=⌈−ln⁡(2)ln⁡(0.5)⌉=⌈0.6930.693⌉=1\text{Median} = \left\lceil \frac{-\ln(2)}{\ln(0.5)} \right\rceil = \left\lceil \frac{0.693}{0.693} \right\rceil = 1

Example:
For p=0.3p = 0.3:

Mode and Median
Median=⌈−ln⁡(2)ln⁡(0.7)⌉=⌈0.6930.357⌉=⌈1.94⌉=2\text{Median} = \left\lceil \frac{-\ln(2)}{\ln(0.7)} \right\rceil = \left\lceil \frac{0.693}{0.357} \right\rceil = \lceil 1.94 \rceil = 2

Properties:
• The median is about ln⁡2p≈0.69p\frac{\ln 2}{p} \approx \frac{0.69}{p} for small pp, well below the expected value 1p\frac{1}{p}
• For high pp, median = mode = 1
• For low pp, median > mode, reflecting right skew
• The geometric distribution is always right-skewed (median ≥ mode)

Geometric PMF with p = 0.3: mode 1, median 2, mean 1/0.3 = 3.33ky123456789101112medianmeanmode 1: the tallest bareach bar 0.7 × the lastp = 0.3: the mode is 1, the median 2, the mean 3.33
Mode, median and mean for p = 0.3

The PMF for p = 0.3. The first bar, P(X = 1) = 0.3, is the tallest, so the mode is 1, and every later bar is 0.7 times the one before. The median is 2, because P(X ≤ 2) = 0.51 is the first cumulative value to pass one half. The mean, 1/p = 3.33, lies further right: the long tail of rare late successes pulls it up.

For any p the geometric is right-skewed: mode ≤ median ≤ mean.

Applications and Examples


Practical Example


Suppose you're rolling a fair six-sided die until you get a 6. The probability of rolling a 6 is p=16p = \frac{1}{6}. The probability that you need exactly k=4k = 4 rolls to get your first 6 is:

P(X=4)=(56)4−1⋅16=(56)3⋅16≈0.096P(X = 4) = \left(\frac{5}{6}\right)^{4-1} \cdot \frac{1}{6} = \left(\frac{5}{6}\right)^{3} \cdot \frac{1}{6} \approx 0.096

Pitfall: Using k failures in the exponent
Writing (56)4⋅16≈0.080\left(\frac{5}{6}\right)^{4} \cdot \frac{1}{6} \approx 0.080 puts four failed rolls before the 6, which is the chance of needing five rolls. Exactly 44 rolls means 33 failures: P(X=4)≈0.096P(X = 4) \approx 0.096.

This means there's about a 9.6% chance that you'll need exactly 4 rolls to get your first 6.

The roll that shows the first 6 is itself one of the kk rolls being counted. Every term of the PMF is built from the same two pieces: a run of failed rolls, each with probability 56\frac{5}{6}, and then one roll that shows a 6 with probability 16\frac{1}{6}.

Interactive Calculator


This interactive calculator computes probabilities for the geometric distribution, which models the number of trials needed until the first success occurs. Enter your success probability (pp) and choose whether you want the full distribution or specific probabilities like P(X=k)P(X=k), P(X<k)P(X<k), or P(X≥k)P(X≥k) to find how likely you are to achieve your first success on a particular trial. Perfect for modeling scenarios like sales conversions, quality testing, or any situation where you're waiting for the first success.

1. Select probability type: 'All values' shows full distribution, or choose a specific query like P(X=k) or P(X≤k)
2. Enter p (success probability) - must be between 0 and 1, cannot be 0
3. For specific queries, enter k (trial number) - must be a positive integer
4. Click Calculate to see results including mean, variance, and probability distribution

Geometric Distribution Calculator

Calculate probabilities and distribution properties

Probability of success on each trial


Related Distributions


The geometric distribution is the simplest waiting-time distribution. Its relatives wait for more than one success, count the same trials another way, or measure the same wait in continuous time.

Negative binomial: waiting for several successes


The negative binomial distribution counts the trials needed to reach the rr-th success, and the geometric is its case r=1r = 1. After each success the wait for the next one starts afresh, so the total is a sum of rr independent geometric waits X1,…,XrX_1, \ldots, X_r:

Related Distributions
X1+X2+⋯+Xr∼NegBin⁡(r,p)X_1 + X_2 + \cdots + X_r \sim \operatorname{NegBin}(r, p)

The mean and the variance are therefore rr times the geometric ones, rp\frac{r}{p} and r(1−p)p2\frac{r(1-p)}{p^2}.

Binomial: the same trials, a fixed number of them


The binomial distribution fixes the number of trials and counts successes; the geometric fixes one success and counts trials. The two meet in the tail formula, because the first success comes after trial nn exactly when the first nn trials hold no success. For Y∼Bin⁡(n,p)Y \sim \operatorname{Bin}(n, p):

Related Distributions
P(X>n)=(1−p)n=P(Y=0)P(X > n) = (1-p)^n = P(Y = 0)

Exponential: the same wait in continuous time


The exponential distribution is the only continuous distribution with no memory, as the geometric is the only discrete one. Run one trial every Δt\Delta t units of time and let each succeed with probability p=λΔtp = \lambda \Delta t. The wait TT is the number of trials times Δt\Delta t, and

Related Distributions
P(T>t)=(1−λΔt)t/Δt→e−λtas Δt→0P(T > t) = (1 - \lambda \Delta t)^{t / \Delta t} \to e^{-\lambda t} \quad \text{as } \Delta t \to 0

so the geometric wait turns into the exponential wait as the steps shrink.

The first of several waits


Run two independent sequences of trials side by side, with success chances p1p_1 and p2p_2, and stop at the first success in either. A step passes with no success with probability (1−p1)(1−p2)(1 - p_1)(1 - p_2), so the stopping time is again geometric, with success chance 1−(1−p1)(1−p2)1 - (1 - p_1)(1 - p_2). With two dice rolled together and a six wanted on either, that chance is 1−2536=11361 - \frac{25}{36} = \frac{11}{36}, and the mean wait drops from 66 rolls to 3611≈3.3\frac{36}{11} \approx 3.3.

Of these, the negative binomial and exponential links matter most: the first extends the wait to several successes, the second carries the memoryless property over to continuous time.

Geometric at a Glance

This summary gathers the geometric distribution on one card of ten rows. Each row names one part of the distribution with a line on what it gives and a link to the section that explains it, then states the formula or fact and adds a note or a worked number.

The first rows fix the setup: the chance of success on each trial and the trial numbers on which the first success can come. Then come the probability of a first success on a given trial, the chance of one within a number of trials, the mean, the variance with the standard deviation, and the mode and median. The last rows give the memoryless property, the link to the negative binomial and the die-rolling example.
DownloadPNG2×PDF
AspectFormula or statementNote or example
ParameterThe single number that fixes the distribution, as the parameters section explains.p∈(0,1]p \in (0, 1], the success probability per trialindependent Bernoulli trials with constant pp
SupportThe trial numbers on which the first success can land, set out with the PMF and its support.k∈{1,2,3,…}k \in \{1, 2, 3, \ldots\}kk is the trial on which the first success occurs
PMFThe probability that the first success comes on trial kk, from the PMF section.P(X=k)=(1−p)k−1p,k=1,2,3,…P(X = k) = (1-p)^{k-1} p, \quad k = 1, 2, 3, \ldotsk−1k - 1 failures, then a success; strictly decreasing in kk
CDFThe probability of a first success within kk trials, derived in the CDF section.FX(k)=P(X≤k)=1−(1−p)kF_X(k) = P(X \leq k) = 1 - (1-p)^kcomplement of "all first kk trials fail"
Expected valueThe average number of trials up to and including the first success, from the expected value section.E[X]=1p\displaystyle E[X] = \frac{1}{p}rolling for a 6: p=1/6p = 1/6, so E[X]=6E[X] = 6 trials on average
VarianceHow widely the waiting time spreads, worked out in variance and standard deviation.Var(X)=1−pp2\displaystyle \mathrm{Var}(X) = \frac{1-p}{p^2}; σ=1−pp\displaystyle \sigma = \frac{\sqrt{1-p}}{p}grows rapidly as p→0p \to 0: rare successes are highly variable
Mode and medianThe most likely trial and the trial by which half the probability is used up, found in mode and median.Mode=1\text{Mode} = 1 always; Median=⌈−ln⁡(2)ln⁡(1−p)⌉\displaystyle \text{Median} = \left\lceil \frac{-\ln(2)}{\ln(1-p)} \right\rceilthe PMF is strictly decreasing, so trial 11 is always the most likely
Memoryless propertyFailures so far do not change the wait still ahead, as the experiment behind the distribution shows.P(X>m+n∣X>m)=P(X>n)P(X > m + n \mid X > m) = P(X > n)the only discrete distribution with this property
RelationWaiting for one success is waiting for the first of rr successes with r=1r = 1, as the key terms note.Geom⁡(p)=NegBin⁡(1,p)\operatorname{Geom}(p) = \operatorname{NegBin}(1, p)the geometric is the r=1r = 1 special case of the negative binomial
Canonical exampleThe die-rolling wait the page works through; variance and standard deviation finishes its numbers.rolling a die until the first 6: p=1/6p = 1/6E[X]=6E[X] = 6, Var(X)=30\mathrm{Var}(X) = 30, σ≈5.48\sigma \approx 5.48
Geometric distribution at a glance·All probability formulasLearn Math Class
The running total is the row to reach for first: the chance of a first success within some number of trials is one minus the chance that every one of them fails. The memoryless property then says that trials already lost change nothing about the wait still ahead.

Common Pitfalls

Three mistakes come up again and again in geometric problems. Each one is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.
DownloadPNG2×PDF
1Expecting a success to be due
After a run of failures, the next trial is treated as more likely to succeed than the first one was. The probability of the whole run, computed from the start, is used as if it were the probability of the next trial.
Start
A fair coin has shown five tails.
Wrong turn
Error here
Six tails in a row has probability
P(X>6)=(12)6=164P(X > 6) = \left(\frac{1}{2}\right)^6 = \frac{1}{64}
So flip six is taken to be heads with probability 1−164=63641 - \frac{1}{64} = \frac{63}{64}.
Right path
The five tails have already happened, so the question is conditional on X>5X > 5.
P(X=6∣X>5)=P(X=6)P(X>5)P(X = 6 \mid X > 5) = \frac{P(X = 6)}{P(X > 5)}

=1/641/32=12= \frac{1/64}{1/32} = \frac{1}{2}
Why it happensA long streak of failures is rare when viewed from the start, and that rarity is carried over to the next trial, even though each flip is independent of the ones before it.
How to checkApply the memoryless identity with m=5m = 5 and n=1n = 1. P(X>6∣X>5)=P(X>1)=12P(X > 6 \mid X > 5) = P(X > 1) = \frac{1}{2}, so heads on flip six has probability 1−12=121 - \frac{1}{2} = \frac{1}{2}, exactly as on the first flip.
2Adding p for each trial
The probability that the first success comes within kk trials is computed as kk times pp, adding up the chance of a success on each trial.
Wrong turn
Error here
For a die rolled until the first 6,
P(X≤6)=6×16=1P(X \leq 6) = 6 \times \frac{1}{6} = 1
Which says a 6 is certain to appear within six rolls.
Right path
The complement of a 6 within six rolls is six rolls with no 6.
P(X≤6)=1−(56)6P(X \leq 6) = 1 - \left(\frac{5}{6}\right)^6

=1−1562546656≈0.665= 1 - \frac{15625}{46656} \approx 0.665
Why it happensFor one trial P(X≤1)=pP(X \leq 1) = p is correct, and for small kk and small pp the product kpkp is close to the right value, so the shortcut looks reliable. It counts the outcomes with a 6 on several of the rolls more than once.
How to checkThe result must stay below 11. With seven rolls the same shortcut gives 7×16=767 \times \frac{1}{6} = \frac{7}{6}, which is not a probability. Summing the PMF gives the right value as well: 16+536+⋯+(56)5⋅16≈0.665\frac{1}{6} + \frac{5}{36} + \cdots + \left(\frac{5}{6}\right)^5 \cdot \frac{1}{6} \approx 0.665.
3Using k failures in the exponent
The probability that the first success comes on trial kk is computed as (1−p)kp(1-p)^k p, as if kk failures came before the success.
Wrong turn
Error here
For a die and k=4k = 4,
P(X=4)=(56)4⋅16=6257776≈0.080P(X = 4) = \left(\frac{5}{6}\right)^4 \cdot \frac{1}{6} = \frac{625}{7776} \approx 0.080
This is the probability of four failed rolls followed by a 6, that is, of needing five rolls.
Right path
The fourth roll is the success, so only three rolls fail.
P(X=4)=(56)3⋅16=1251296P(X = 4) = \left(\frac{5}{6}\right)^3 \cdot \frac{1}{6} = \frac{125}{1296}

≈0.096\approx 0.096
Why it happensThe trial number kk appears in the question, so it goes straight into the exponent. The form (1−p)kp(1-p)^k p is also correct under the other convention, where XX counts failures instead of trials, and formulas copied from such a source carry it over.
How to checkPut k=1k = 1. The first roll is a 6 with probability 16\frac{1}{6}, and (1−p)k−1p(1-p)^{k-1} p gives exactly that, while (1−p)kp(1-p)^k p gives 536\frac{5}{36}. The wrong PMF also adds up to 1−p=561 - p = \frac{5}{6} instead of 11.
Common pitfalls with the geometric distribution·/probability/distributions/discrete/geometricLearn Math Class
Each slip forgets how the geometric distribution counts. Past failures do not make a success due, by the memoryless property; the chance of a first success within kk trials is 1−(1−p)k1 - (1 - p)^k, not kpkp; and a first success on trial kk follows k−1k - 1 failures. Putting k=1k = 1 into the formula, or checking that a probability stays below 11, catches each slip.

Skills You Should Learn

Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Taught on this page
More distribution methods

Geometric Distribution FAQ

Does the geometric distribution count trials or failures?

+
Both conventions exist, and the declaration Geom(p) does not say which. Under the trials convention X counts trials up to and including the first success; under the failures convention it counts failures before it. Three fingerprints settle it: the support starts at 1 or at 0, the pmf exponent is k−1 or k, and the mean is 1/p or q/p.Read more →

What is the memoryless property?

+
Past failures carry no information: P(X > m + n | X > m) = P(X > n). After a run of failures the wait restarts clean, with the same distribution it had at the start. The proof is one substitution — with P(X > k) = q^k, the left side becomes q^(m+n)/q^m = q^n. It refutes the intuition that a long streak makes success due.Read more →

What is the probability of needing more than k trials?

+
q^k, under the trials convention — the cleanest tail formula any distribution owns. Surviving k trials without success means k straight failures, each with probability q = 1 − p, so P(X > k) = q^k. That single expression is also what makes the memoryless identity fall out in one substitution.Read more →

Is the geometric distribution the only memoryless distribution?

+
Among discrete distributions, yes — no other discrete distribution satisfies the identity. It has a continuous twin, though: the exponential owns the same property with real-valued slots, and is likewise the only continuous distribution that does. Memorylessness picks out exactly one distribution on each side of the discrete/continuous line.Read more →

If something never happens in 300 trials, how rare must it be?

+
Rarer than about 1 in 100, by the rule of three: after nn trials with no success, values of pp above 3n\frac{3}{n} are implausible. Any such pp would make an all-failure run less than 5% likely, since (1−3n)n<e−3≈0.05\left(1 - \frac{3}{n}\right)^n < e^{-3} \approx 0.05. So no side effect in 300 patients rules out rates above roughly 3300=1%\frac{3}{300} = 1\% at the 95% level.Read more →

Why is the median wait shorter than the mean wait?

+
Because the long right tail pulls the mean up. For a die rolled until the first 6 the mean is 66 rolls, yet the median is 44: P(X≤4)=1−(56)4≈0.518P(X \leq 4) = 1 - \left(\frac{5}{6}\right)^4 \approx 0.518, while P(X≤3)≈0.421P(X \leq 3) \approx 0.421. A few very long waits drag the average past the typical one. For small pp the median is about ln⁡2p≈0.69p\frac{\ln 2}{p} \approx \frac{0.69}{p}, roughly 70% of the mean, and the mode is always 11.Read more →