unspurious.calculators

Probability · Distributions

Geometric Distribution Calculator

The geometric distribution counts how many tries it takes to get the first success — the first head, the first sale, the first win — when each independent attempt succeeds with the same probability p. Set p and a trial number k and get every probability at once: the first success falling exactly on, before, by, on-or-after, or after trial k. With the distribution drawn, the mean of 1∕p, and the unsettling fact that the process has no memory at all.

X is the trial on which the first success occurs (1, 2, 3, …), so p is the chance of success on any single attempt. All five probabilities are listed below — the chip just chooses which to headline and shade.

Result

In plain English

Keep trying something until it works for the first time, and the number of attempts you need follows the geometric distribution. Each attempt is an independent coin-of-probability-p; the chance the first success lands on trial k is the chance of k − 1 failures followed by one success. The single most likely answer is always “the very first try” — the probabilities only fall from there — yet on average it takes 1∕p attempts, because the long tail of unlucky runs drags the average up.

geometric distribution
The number of independent trials up to and including the first success, each succeeding with probability p. Here X = 1, 2, 3, … counts the trials.
P(X = k), the probability mass
(1 − p)ᵏ⁻¹ · p — the chance of k − 1 failures, then a success. The bars always shrink as k grows.
mean = 1∕p
The expected number of trials to the first success. A 1-in-5 event takes 5 tries on average; a 1-in-100 event, 100. The standard deviation is √(1 − p)∕p.
memorylessness
The geometric is the only discrete distribution with no memory: having already failed m times, the chance you need n more is exactly the same as it was at the start. The past is irrelevant.
the gambler’s fallacy
That memorylessness is precisely why a losing streak does not mean you are “due.” The roulette wheel does not remember; your expected wait resets after every spin.
two conventions
Some texts count the failures before the first success (X = 0, 1, 2, …) instead of the trials. This calculator uses the trials version; subtract one for the failures version.

Frequently asked

How do you calculate a geometric probability?

The probability that the first success occurs on trial k is P(X = k) = (1 − p)ᵏ⁻¹ · p — the chance of k − 1 failures in a row followed by a success. For p = 0.2 and k = 3 that is 0.8² × 0.2 = 0.128. The cumulative “by trial k” is P(X ≤ k) = 1 − (1 − p)ᵏ, and “not yet by trial k” is P(X > k) = (1 − p)ᵏ. This page lists exactly-k, fewer-than, at-most, at-least and more-than side by side.

What is the difference between the geometric and binomial distributions?

They count opposite things. The binomial fixes the number of trials n and counts how many successes you get. The geometric fixes the goal — the first success — and counts how many trials that takes. Binomial: “in 10 flips, how many heads?” Geometric: “how many flips until the first head?” The geometric also has no upper limit, since you might (improbably) fail for a very long time, whereas the binomial caps at n.

Why does the average take 1∕p trials when the first try is the most likely?

Both are true at once. The single most probable outcome is success on trial 1, and each later trial is less likely than the one before — the distribution only ever falls. But it has a long right tail: occasionally you fail many times in a row, and those rare long waits pull the mean up to 1∕p. The most likely value (the mode, always 1) and the average (1∕p) are simply different summaries of a heavily right-skewed shape.

What does it mean that the geometric distribution is “memoryless”?

It means the process forgets the past completely. If you have already failed m times, the probability you need n more trials is exactly what it was before you started — P(X > m + n | X > m) = P(X > n). The geometric is the only discrete distribution with this property. It is also the mathematical refutation of the gambler’s fallacy: a coin, a wheel or a slot machine has no memory of its losing streak, so you are never “due” — your expected wait is 1∕p again after every failure.