The **geometric distribution** describes the probability of experiencing a certain amount of failures before experiencing the first success in a series of Bernoulli trials.

A

Bernoulli trialis an experiment with only two possible outcomes – “success” or “failure” – and the probability of success is the same each time the experiment is conducted.

An example of a Bernoulli trial is a coin flip. The coin can only land on two sides (we could call heads a “success” and tails a “failure”) and the probability of success on each flip is 0.5, assuming the coin is fair.

If a random variable *X* follows a geometric distribution, then the probability of experiencing *k *failures before experiencing the first success can be found by the following formula:

**P(X=k) = (1-p) ^{k}p**

where:

**k:**number of failures before first success**p:**probability of success on each trial

For example, suppose we want to know how many times we’ll have to flip a fair coin until it lands on heads. We can use the formula above to determine the probability of experiencing 0, 1, 2, 3 failures, etc. before the coin lands on heads:

**Note: **The coin can experience 0 “failures” if it lands on heads on the first flip.

**P(X=0) **= (1-.5)^{0}(.5) = **0.5**

**P(X=1) **= (1-.5)^{1}(.5) = **0.25**

**P(X=2) **= (1-.5)^{2}(.5) = **0.125**

**P(X=3) **= (1-.5)^{3}(.5) = **0.0625**

We can calculate the probability for any number of coin flips up to infinity. We create then create a simple histogram to visualize this probability distribution:

**Calculating Cumulative Geometric Probabilities**

The **cumulative probability** that we experience *k *or less failures until the first success can be found by the following formula:

**P(X≤k) = 1 – (1-p) ^{k+1}**

where:

**k:**number of failures before first success**p:**probability of success on each trial

For example, suppose we want to know the probability that it will take three or less “failures” until the coin finally lands on heads. We would use the following formula to calculate this probability:

**P(X≤3)** = 1 – (1-.5)^{3+1} = **0.9375**

We can calculate each cumulative probability using a similar formula:

**P(X≤0)** = 1 – (1-.5)^{0+1} = **0.5**

**P(X≤1)** = 1 – (1-.5)^{1+1} = **0.75**

**P(X≤2)** = 1 – (1-.5)^{2+1} = **0.875**

We can calculate these cumulative probabilities for any number of coin flips up to infinity. We can then create a histogram to visualize this cumulative probability distribution:

**Properties of the Geometric Distribution**

The geometric distribution has the following properties:

The mean of the distribution is** (1-p) / p**.

The variance of the distribution is ** (1-p) / p ^{2}**.

For example:

The mean number of times we would expect a coin to land on tails before it landed on heads would be (1-p) / p = (1-.5) / .5 = **1**.

The variance in the number of flips until it landed on heads would be (1-p) / p^{2} = (1-.5) / .5^{2} = **2**.

**Geometric Distribution Practice Problems**

Use the following practice problems to test your knowledge of the Geometric distribution.

**Note: **We will use the Geometric Distribution Calculator to calculate the answers to these questions.

**Problem 1**

**Question: **A researcher is waiting outside of a library to ask people if they support a certain law. The probability that a given person supports the law is p = 0.2. What is the probability that the fourth person the researcher talks to is the first person to support the law?

**Answer:** The number of “failures” until the first success – i.e. the number of people who don’t support the law until the first person supports it – is 3. Thus, using the Geometric Distribution Calculator with p =0.2 and x = 3 failures, we find that P(X=3) = **0.10240**.

**Problem 2**

**Question: **A researcher is waiting outside of a library to ask people if they support a certain law. The probability that a given person supports the law is p = 0.2. What is the probability that the researcher will have to talk to *more *than four people to find someone who supports the law?

**Answer:** Using the Geometric Distribution Calculator with p =0.2 and x = 4 failures, we find that P(X>4) = **0.32768**.

**Problem 3**

**Question: **A researcher is waiting outside of a library to ask people if they support a certain law. The probability that a given person supports the law is p = 0.2. What is the expected number of people the researcher will have to talk to until she finds someone who supports the law?

**Answer:** Recall that the mean of the geometric distribution is **(1-p) / p**. In this situation, the mean would be (1-.2) / .2 = **4**.