## Geometric distribution

To continue with the detailed study of discrete probability distributions we will focus our lesson of today on the geometric probability distribution. You will notice that this type of discrete distribution shares many of its characteristics with the binomial distribution, so make sure to pay attention to the different details of them so you can distinguish and solve accordingly when working on assignments and in your independent studies.

#### Geometric probability distribution

A geometric distribution is that which describes the probability distribution of the number of trials in an experiment needed for the expected event (that which we are looking for, or that which we call success) to occur. In simple words, we define geometric distribution as that which expresses the probability of an expected outcome to occur within a range of a particular amount of trials, and once it does, the experiment stops (he experiment is only looking for the first success, afterwards, no more trials are needed).

Since we will be performing a number of trials before an outcome defined as success occurs, there is no limit on how many trials can occur before the success arrives. The number of trials run up to a first success (all the ones resulting in failures, plus the one resulting in the first success) is what we call the geometric random variable $n$ (see equation 1).

It is important to mention that each individual trial has the same probability of producing a success. This means that every trial is run with all of the possible outcomes inside, or what is usually called with replacement; meaning that no matter how many trials are performed, every single time one is done, if its result was a failure, this value is thrown back (or remains) in the pool of possible outcomes for the next trial to work with it again.

The easiest example of this is an experiment with a fair die: since every time you roll a die you have a $\frac{1}{6}$ of probability of obtaining any of the 6 numbers of its faces; no matter how many times you roll the die, if the first attempt resulted in a 2, the value of 2 is possible once again in the next roll with exactly the same probability on that particular trial as in the one before because there is no way to take away the value of 2 from the possible outcomes pool without destroying or modifying the die.

Another thing worth nothing is that the geometric distribution has a memoryless property, which means that you can do the experiment until you obtain a success, and then re-do the entire experiment once again without taking into account the failures that occurred on the first experiment (they do not affect the second experiment or its geometric function at all) and the system is taken as if it has no memory of the first experiment ever happening. How? Well since every experiment is defined as running trials until a success occurs, once you redo the experiment again there hasnt been any successes yet, therefore, the scenario for the observation of the probability distributions behaviour is reseted and is as if the failures and the one success from the first experiment had never happened. This may sound as something we could take as a given, but in reality only two probability distributions share this characteristic, and the other one is a continuous distribution: the exponential distribution.

And so, we focus on finding how many trials are needed to obtain a success, for that, the probability distribution formula for a geometric distribution, or the mathematical expression for the probability of getting a first success in the nth trial, is defined as:

Where:

$n$ = number of trials until the first success

$p$ = probability of success in each trial

$P(n)$ = probability of getting your first success in the $n^{th}$ trial

**$\quad$ Binomial vs geometric**

You will see similar sharing of characteristics within the other discrete probability distributions in our past lessons, but as always, these discrete distributions have been classified as different given the approach they use to solve for the probabilities of an expected event (or success).

Between the binomial and the geometric distribution, the difference lies in that the binomial distribution looks for the probability of obtaining an $x$ amount of successes out of an n amount of trials, while the geometric distribution focuses on the amount of trials needed to obtain a success.

The fact that a binomial distribution can count more than one success in a certain amount of trials without restarting the experiment makes it impossible for it to have the memoryless property, like the geometric distribution.

#### Geometric distribution examples

Now let us work on a few examples to understand in a deeper way what the geometric distribution is:

__Example 1__

Identify which of the following experiments below are geometric distributions:
**1. $\quad$ Flip a coin until it comes up heads. What is the probability that this will take 5 flips?**

**2. $\quad$ Flip a coin 5 times. What is the probability that you will get 1 head?**

**3. $\quad$ An urn contains 7 red balls and 5 white balls. Balls are drawn out of the urn without replacement until a white ball is drawn, what is the probability that the first white ball will be drawn after the 3rd draw?**

**4. $\quad$ There is a certain machine that produces knick-knacks. This machine produces a defective knick-knack with probability 0.1. What is the probability that this machine will produce its first defective knick-knack on the 8th knick knack it produces?**

__Example 2__

Let us use the last case from example problem 1 and solve for the probabilities:
There is a certain machine that produces knick-knacks. This machine produces a defective knick-knack with probability 0.1. What is the probability that this machine will produce its first defective knick-knack on the 8th knick knack it produces?

On this case $p=0.1=\frac{1}{10}$ and $n=8$. Using the geometric distribution formula shown in equation 1 for the probability of a first success at an nth trial, we calculate:

Therefore, there is a 4.78% chance that the machine will produce a defective knick-knack on the 8th knick-knack produced.

__Example 3__

In the game Dungeons and Dragons a fair 20 sided die (icosahedron, plural: icosahedra) is used. A critical hit is when a 20 is rolled.
**1. $\quad$ What is the probability that a critical hit is thrown on the first roll?**

**2. $\quad$ What is the probability that it takes less than 3 rolls to roll your first critical hit?**

__Example 4__

Balls are drawn with replacement from an urn containing 9 black balls, and 1 golden ball.
**1. $\quad$ What is the probability that the golden ball is drawn on the 1st draw?**

And so, we can observe once more that since this question is focused on the first trial, the probability is equal to the simple probability of success in each trial $P(1)=\frac{1}{10}=p$.

**2. $\quad$ What is the probability that the golden ball is drawn on the 2nd draw?**

Notice how the probability reduces as trials go by because of the nature of the experiment where balls are drawn with replacement.

**3. $\quad$ What is the probability that the golden ball is drawn on the 3rd draw?**

**4. $\quad$ What is the probability that the golden ball is first drawn on one of the first 5 draws?**

So far we already have the first three numbers, since we got them in part 1 through 3 of this problem, therefore, let us calculate $P(4)$ and $P(5)$:

Therefore, the total probability of finding the golden ball in any of the first five attempts is:

Check the videos on this lesson where you can see the process of calculating these probabilities using the calculator.

This has been all for the lesson of today, we hope you enjoyed it and will see you in the next one!

• $P(n)=(1-p)^{n-1}p$

$n$: number of trials until the first success

$p$: probability of success in each trial

$P(n)$: probability of getting your first success in the $n^{th}$ trial

$n$: number of trials until the first success

$p$: probability of success in each trial

$P(n)$: probability of getting your first success in the $n^{th}$ trial