# The geometric distribution

*What is the probability that I make a free throw on my 4th attempt if my free throw percentage is 20? *The general question where X follows the geometric distribution is: *How many trials is needed before success?*

**On this page**hide

## Properties of the geometric distribution

The geometric distribution It is related to the binomial distribution and works also with discrete random variables.

The properties of the geometric distribution:

**2 possible outcomes**: success or failure**Independent**One result is not affected by the other.**Infinite number of trials**(“how many trials until success”)**Same probability**of each trial

## Binomial and geometric distributions

The geometric distribution works also with discrete random variables and is closely related to the binomial distribution:

## Geometric probability, mean and variance

## Statistics with the geometric distribution

We can conduct sample statistics with the geometric distribution answering questions like:

*How many trials do we need to get our first success?**What is the probability that we will need at least x number of trials before we observe a success?*

### The probability mass function (=)

The probability mass function (pmf) of the geometric distribution allows to calculate the probability that a discrete random variable is **exactly equal to** a given value for the number of trials that is needed before success is observed. For **example:**

*What exact number of trials do we need before we register the first success? *

Let’s go through **the** **free throw example** above to illustrate the calculation:

I’m trying to make a free throw, and my free throw percentage is 20.

*What is the probability that I will make my first free throw on the 4 ^{th} attempt? *

We express the following:

Making the first free throw on the fourth attempt is equal to failing the first 3 and succeeding on the fourth attempt:

The probability for me making my first free throw on 4th attempt is **10.24%**. In other words, the chance that I need 3 attempts before scoring is 10.24%

** **

### Cumulative geometric probability (≥ or ≤)

The cumulative geometric probability calculates the ‘greater than’ and the ‘less than’ probabilties:

### More-than example

Just like we answered for an exact value above, we can solve for a cumulative geometric probability, like for values “**greater than” or “less than**”.

Here a more-than example:

*What is the probability that we need at least 4 trials to succeed?*

In other words:

*What is the probability that we do more than 3 of trials before we observe our first success?*

The following example illustrates this:

Say that **Greta is registering the rate with which electrical vehicles (EV)** in a certain area of Southern Sweden pass by. Results from a similar experiment sets the probability of registering an EV to 0.10.

*What is the probability that Greta will register more than 4 non-EVs before she registers an EV?*

The probability that Greta registers more than 4 vehicles before registering an EV is the same as registering **non-EV in the first 4 registrations**. The probability of registering a non-EV is the probability of failure, which is 0.9, and we therefore have 0.9 four times = (0.9)^{4}:

Hence, the general formula for “more than” calculations in the geometric distribution:

Less-than example

*What is the probability that Greta will register less than 4 non-EVs before she registers an EV?*

This situation would be the probability that:

- the probability that the
**first**car that passes by Great is an EV + - the probability that the first EV is observed on the
**second**observation + - the probability that the first EV is observed on the
**third**observation:

Which can be written:

- Scenario 1: Success = 0.1 +
- Scenario 2: Failure, Success = 0.9×0.1 +
- Scenario 3: Failure, Failure, Success = 0.9x 0.9×0.1

Which also can be written:

** **

## Geometric distribution with MS Excel

The geometric distribution in Excel can be listed and calculated through subtracting, adding, multiplying and raising to exponents like shown in Excel screenshot below.

The 0.271 is marked to illustrate the result of the example above, where we calculate the probability that Greta will register less than 4 non-EVs before she registers an EV.

## Learning statistics

Some of my preferred material for learning about the geometric distribution:

- MIT OpenCourseWare: Geometric random variables
- Khan Academy video: Geometric random variables introduction
- Ahmed Yasser Souid: Geometric distribution

#### Carsten Grube

Freelance Data Analyst

##### Normal distribution

##### Confidence intervals

##### Simple linear regression, fundamentals

##### Two-sample inference

##### ANOVA & the F-distribution

+34 616 71 29 85

Call me

Spain: Ctra. 404, km 2, 29100 Coín, Malaga

...........

Denmark: c/o Musvitvej 4, 3660 Stenløse

**Drop me a line**

*What are you working on just now? Can I help you, and can you help me? *

**About me**

Learning statistics. Doing statistics. Freelance since 2005. Dane. Living in Spain. With my Spanish wife and two children.

**Connect with me**

**What they say**

20 years in sales, analysis, journalism and startups. See what my customers and partners say about me.

## 0 Comments