Skip to content

Geometric Distribution

Definition

Let 0<p≤10<p\le1 and q=1−pq=1-p. A discrete random variable XX has a geometric distribution with parameter pp, written X∼Geo⁡(p)X\sim\operatorname{Geo}(p), if XX counts the failures before the first success in independent trials with success probability pp:

P(X=k)=qkp,k=0,1,2,….\mathbb{P}(X=k)=q^kp,\qquad k=0,1,2,\ldots.

At p=1p=1 the first trial is a success, so X=0X=0 with probability 11.


Interpretation

The geometric distribution counts how many failures happen before the first success in independent trials with success probability pp. A value of zero means that the first trial succeeds.

Probability bars for the number of failures before the first success with success probability 0.3, starting at 0.3 at 0 and shrinking by a factor 0.7 at each step.

In the figure p=0.3p=0.3: the bar at 00 is P(X=0)=p=0.3\mathbb{P}(X=0)=p=0.3, and each next bar is 0.70.7 times the previous one, so the bars decrease like the terms of a geometric series, which gives the distribution its name. The most likely value is 00, while the mean q/p=0.7/0.3≈2.33q/p=0.7/0.3\approx2.33 given in the figure lies further to the right because of the long tail.

Each bar is qq times the one before, starting at P(X=0)=p\mathbb{P}(X=0)=p. A smaller pp means a longer wait: EX=q/p\mathbb{E}X=q/p.

Each trial is a Bernoulli variable, and X=kX=k means kk failures followed by a success, with probability qkpq^kp by independence. The masses sum to 11 because p∑k≥0qk=p/(1−q)=1\displaystyle p\sum_{k\ge0}q^k=p/(1-q)=1. The tail formula in the Key Results, P(X≥m)=qm\mathbb{P}(X\ge m)=q^m, has an equally direct reading: at least mm failures occur exactly when the first mm trials all fail. It also shows that waiting does not help: given mm failures so far, the conditional probability of at least nn more is qm+n/qm=qnq^{m+n}/q^m=q^n, the memoryless property.

Books and software use the name "geometric" for two versions. This page counts failures, with values 0,1,2,…0,1,2,\ldots; the first success distribution counts trials including the success, T=X+1T=X+1, with values 1,2,…1,2,\ldots. Before using a formula, check which values it starts from.


Key Results

  • EX=(1−p)/p\mathbb{E}X=(1-p)/p and Var⁡(X)=(1−p)/p2\operatorname{Var}(X)=(1-p)/p^2.
  • For integers m≥0m\ge0, P(X≥m)=(1−p)m\mathbb{P}(X\ge m)=(1-p)^m.

Examples

  • For p=1/2p=1/2, P(X=2)=1/8\mathbb{P}(X=2)=1/8.
  • For p=1/4p=1/4, the expected failure count is (3/4)/(1/4)=3(3/4)/(1/4)=3.

Prerequisites

Sources

Aliases: Geom(p), geometric random variable, zero-based geometric distribution, Geo(p) Keywords: failures before first success Symbols: sum

Last updated: 20 October 2026 03:02