[Home](https://learningfolio.de5.net/) / [Math](https://learningfolio.de5.net/math/) / [Math glossary](https://learningfolio.de5.net/math/glossary/) / Geometric Distribution: Formula, Mean, and Worked Examples

[Math glossary](https://learningfolio.de5.net/math/glossary/)

# Geometric Distribution: Formula, Mean, and Worked Examples

Calculate first-success probabilities, cumulative chances, mean, variance and standard deviation. Includes six worked examples.

Written by **Learningfolio Team**

We’re subject-matter experts in math, science, parent support, and education, with 100 years of combined experience. We believe in learning, experimenting, and growing, and we review one another’s work.

## On this page

* [TL;DR](https://learningfolio.de5.net/math/geometric-distribution/#tldr)
* [Key Points](https://learningfolio.de5.net/math/geometric-distribution/#key-points)
* [What is a geometric distribution?](https://learningfolio.de5.net/math/geometric-distribution/#what-is-a-geometric-distribution)
* [How do you calculate the probability of an exact wait?](https://learningfolio.de5.net/math/geometric-distribution/#how-do-you-calculate-the-probability-of-an-exact-wait)
* [What changes for at least, at most, and more than?](https://learningfolio.de5.net/math/geometric-distribution/#what-changes-for-at-least-at-most-and-more-than)
* [What are the mean, variance, and standard deviation?](https://learningfolio.de5.net/math/geometric-distribution/#what-are-the-mean-variance-and-standard-deviation)
* [When is the geometric model a good fit?](https://learningfolio.de5.net/math/geometric-distribution/#when-is-the-geometric-model-a-good-fit)
* [Six Worked Geometric Distribution Examples](https://learningfolio.de5.net/math/geometric-distribution/#six-worked-geometric-distribution-examples)
* [Common Geometric Distribution Mistakes](https://learningfolio.de5.net/math/geometric-distribution/#common-geometric-distribution-mistakes)
* [Try It Yourself](https://learningfolio.de5.net/math/geometric-distribution/#try-it-yourself)
* [Conclusion](https://learningfolio.de5.net/math/geometric-distribution/#conclusion)
* [Read More](https://learningfolio.de5.net/math/geometric-distribution/#read-more)
* [Research Behind This Article](https://learningfolio.de5.net/math/geometric-distribution/#research-behind-this-article)

## TL;DR

**A geometric distribution counts independent trials until the first success.** With success probability $p$ per trial, the chance of a first success on trial $k$ is $(1-p)^{k-1}p$.

## Key Points

* Each trial has two labelled outcomes and the same success probability.
* The trials must be independent for the usual geometric formula.
* Decide whether the variable counts all trials or only the preceding failures.
* “By trial $k$” includes all first-success times from 1 through $k$.
* The geometric model is memoryless when success remains possible.

## What is a geometric distribution?

A geometric distribution describes a wait for the first success across independent, repeated trials. “Success” is the outcome you have chosen to count, such as rolling a six or picking a marked card when you replace and reshuffle after every draw. It need not describe a desirable outcome.

Let $p$ be the constant probability of success on each trial and set $q=1-p$. Use $0<p\le1$. When $p=1$, the first trial succeeds with certainty. With $p=0$, success never occurs, so the waiting time is not a finite geometric random variable. [OpenStax, Geometric Distribution](https://openstax.org/books/introductory-statistics-2e/pages/4-4-geometric-distribution)

![A bar chart shows decreasing probabilities of first success on trials one through five when success probability is one third](https://learningfolio.de5.net/assets/versioned/geometric-distribution-first-success-bars.fb8897e6120a.webp)


With success probability one-third, each additional failure multiplies the next bar height by two-thirds.

## How do you calculate the probability of an exact wait?

Let $X$ be the trial number on which the first success occurs. For $X=k$, you need $k-1$ failures followed by one success. Independence means their probabilities multiply:

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

If $p=1$, interpret the first case directly as $P(X=1)=1$ and every later probability as zero. Another convention uses $Y=X-1$ to count only the failures before the first success. Then $Y$ starts at zero and $P(Y=j)=q^jp$. Check which variable a problem or software library uses before inserting the exponent. [OpenStax, Formula Review](https://openstax.org/books/introductory-statistics-2e/pages/4-formula-review)

## What changes for at least, at most, and more than?

| Wording | Event | Probability |
| --- | --- | --- |
| Exactly on trial $k$ | $X=k$ | $q^{k-1}p$ |
| By trial $k$, inclusive | $X\le k$ | $1-q^k$ |
| More than $k$ trials | $X>k$ | $q^k$ |
| At least $k$ trials | $X\ge k$ | $q^{k-1}$ |

“No success by trial $k$” means all first $k$ trials failed, which has probability $q^k$. Subtract that from 1 for the cumulative probability of success by trial $k$. The [relative frequency guide](https://learningfolio.de5.net/math/frequency-and-frequency-tables/) explains how model probabilities differ from observed shares.

## What are the mean, variance, and standard deviation?

For the trial-count convention, the mean, variance and standard deviation are

$$
E[X]=\frac1p,\qquad
\operatorname{Var}(X)=\frac{1-p}{p^2},\qquad
\sigma_X=\frac{\sqrt{1-p}}{p}.
$$

For $0<p<1$, the mean formula follows by adding $P(X>k)=q^k$ from $k=0$ onwards. This is a geometric series with sum $1/(1-q)=1/p$. At $p=1$ the mean is 1 directly. For the failure count $Y=X-1$, subtract one from the mean. Its variance and standard deviation stay the same, because subtracting a fixed number changes location without changing spread. The [geometric sequence guide](https://learningfolio.de5.net/math/formula/geometric-sequence-formulas/) explains the series rule. [OpenStax, Business Statistics Geometric Distribution](https://openstax.org/books/introductory-business-statistics-2e/pages/4-3-geometric-distribution)

## When is the geometric model a good fit?

Use it when you keep trying until the first success, each attempt has the same $p$, and previous outcomes do not change the next attempt’s probability. If the question fixes the number of trials and counts successes, a binomial model answers a different question.

A finite deck sampled without replacement changes the probabilities after each draw. A machine whose condition worsens after each failed start may also have a changing $p$. Neither situation follows the usual fixed-probability model. In a geometric model with $0<p<1$, five previous failures do not change the chance of success during the next three trials. This property is called **memorylessness**. [LibreTexts, Geometric Distribution](https://stats.libretexts.org/Bookshelves/Applied_Statistics/Business_Statistics_%28OpenStax%29/04%3A_Discrete_Random_Variables/4.03%3A_Geometric_Distribution)

## Six Worked Geometric Distribution Examples

### Example 1

Each independent attempt has success probability $1/3$. Find the probability the first success is attempt 3.

1. Two failures must come first, each with probability $2/3$.
2. The third attempt must succeed.
3. Multiply to get $(2/3)^2(1/3)=4/27$.

### Example 2

A fair coin is flipped repeatedly. Find the chance of getting at least one head by flip 4.

1. The complementary event is four tails.
2. Its probability is $(1/2)^4=1/16$.
3. The chance of a head by flip 4 is $15/16$.

### Example 3

An independent trial succeeds with probability 0.2. Find the probability that the first success requires at least five attempts.

1. “At least five” permits success on attempt 5.
2. Only the first four attempts must fail.
3. The chance is $0.8^4=0.4096$.

### Example 4

Find the mean and standard deviation of $X$ when $p=1/4$.

1. The mean is $1/(1/4)=4$ trials.
2. The variance is $(3/4)/(1/16)=12$.
3. The standard deviation is $\sqrt{12}=2\sqrt3$ trials.

### Example 5

A geometric model with $p=0.3$ has already registered four failures. What is the chance of success in the next two trials?

1. Each upcoming trial still has failure probability 0.7.
2. The chance both fail is $0.7^2=0.49$.
3. The chance of at least one success in those two trials is $0.51$.

### Example 6

Each independent trial succeeds with probability 0.4. Find the minimum number of attempts needed for at least a 90% chance of one success.

1. Require the chance of no success to be at most 0.10.
2. With four attempts it is $0.6^4=0.1296$. With five it is $0.6^5=0.07776$.
3. Five attempts are the first count that meets the target.

## Common Geometric Distribution Mistakes

### Mistake 1: Raising the failure probability to the trial number for an exact wait

For a first success on trial 5, only four preceding trials fail. The fifth is a success.

### Mistake 2: Treating “at least” as “more than”

At least five permits five. More than five requires the first five trials all to fail.

### Mistake 3: Using the formula when the success probability changes

Check independence and the fixed value of $p$ before computing. A problem about simple draws without replacement often fails those conditions.

## Try It Yourself

1. With $p=1/5$, what is the chance of first success on trial 2?
2. With $p=1/2$, what is the probability that more than three trials are needed?
3. With $p=1/5$, find the expected number of failures before success.

**Answers.** 1. $4/25$. 2. $1/8$. 3. $5-1=4$ failures.

## Conclusion

* Decide whether you count attempts or failures.
* Translate the exact event before choosing the exponent.
* Check that repeated trials have a fixed success probability and are independent.

## Read More

* [Compare geometric probabilities with other probability distributions](https://learningfolio.de5.net/math/probability-distribution/)
* [Calculate probabilities in a card experiment](https://learningfolio.de5.net/math/card-probability/)
* [Work with averages and variability](https://learningfolio.de5.net/math/formula/mean-median-mode-formula/)

## Research Behind This Article

1. OpenStax, *Introductory Statistics 2e: Geometric Distribution*. [OpenStax](https://openstax.org/books/introductory-statistics-2e/pages/4-4-geometric-distribution)
2. OpenStax, *Introductory Business Statistics 2e: Geometric Distribution*. [OpenStax](https://openstax.org/books/introductory-business-statistics-2e/pages/4-3-geometric-distribution)
3. OpenStax, *Introductory Statistics 2e: Chapter 4 Formula Review*. [OpenStax](https://openstax.org/books/introductory-statistics-2e/pages/4-formula-review)
4. OpenStax, *Business Statistics: Geometric Distribution*. [LibreTexts](https://stats.libretexts.org/Bookshelves/Applied_Statistics/Business_Statistics_%28OpenStax%29/04%3A_Discrete_Random_Variables/4.03%3A_Geometric_Distribution)
