### Chapter 4. Probability Distributions: Discrete Probability Distributions

### The Geometric Probability Distribution

Geometric Experiment

In a **geometric **experiment:

- We conduct an unknown number of independent Bernoulli trials.
- The probability of success #p# is the same for each trial.
- The variable of interest #X# is the total number of trials needed until we observe a success for the first time.

Geometric Distribution

Let #X# be the number of trials needed to observe the first success in a geometric experiment, then #X# is a **geometric random variable **with range: \[R(X)=\{1,2,\ldots\}\]

We say that #X# is **geometrically**** distributed **with parameter #p# and write this as: \[X \sim Geo(p)\]

Suppose we roll a regular six-sided die and define a success as rolling a #6#.

Let #X# be the number of attempts needed to roll a #6#.

Then #X# is *geometrically *distributed with #p=\mathbb{P}(\text{Roll a }6) = \cfrac{1}{6}#: \[X\sim Geo\bigg(\cfrac{1}{6}\bigg)\]

#\phantom{0}#

Computation of Geometric Probabilities with Statistical Software

Let #X# be a *geometric *random variable with parameter #p#.

To compute #\mathbb{P}(X=x)# in Excel, make use of the following function:

NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)

number_f: The number of failures.number_s: The number of successes.

NOTE:When using this function to perform geometric probability calculations, this argument will always be set to 1.probability_s: The probability of success for each trial.cumulative: A logical value that determines the form of the function.

- TRUE - uses the cumulative distribution (at most
number_ffailures)- FALSE - uses the probability mass function (exactly
number_ffailures)

To compute #\mathbb{P}(X=x)# in R, make use of the following function:

dgeom(x, prob)

x: The number of failures before a success occurs.prob: The probability of success for each trial.

*geometrically*distributed random variable with #p=0.4#.

Compute #\mathbb{P}(X = 7)#. Round your answer to #3# decimal places.

There are a number of different ways we can calculate #\mathbb{P}(X = 7)#. Click on one of the panels to toggle a specific solution.

To calculate #\mathbb{P}(X = 7)# in Excel, make use of the following function:

If we observe the first success on the seventh trial #(X = 7)#, then we will have observed #6# failures and #1# success.

NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)

number_f: The number of failures.number_s: The number of successes.probability_s: The probability of success for each trial.cumulative: A logical value that determines the form of the function.

- TRUE - uses the cumulative distribution (at most
number_ffailures)- FALSE - uses the probability mass function (exactly
number_ffailures)

Thus, to calculate #\mathbb{P}(X = 7)#, we run the following command:

\[= \text{NEGBINOM.DIST}(6, 1, 0.4, \text{FALSE})\]

This gives:

\[\mathbb{P}(X = 7) = 0.019\]

To calculate #\mathbb{P}(X = 7)# in R, make use of the following function:

If we observe the first success on the seventh trial #(X = 7)#, then we will have observed #6# failures.

dgeom(x, prob)

x: The number of failures before a success occurs.prob: The probability of success for each trial.

Thus, to calculate #\mathbb{P}(X = 7)#, we run the following command:

\[\text{dgeom}(x = 6, prob = 0.4)\]

This gives:

\[\mathbb{P}(X = 7) = 0.019\]

#\phantom{0}#

Computation of Cumulative Geometric Probabilities with Statistical Software

Let #X# be a *geometric *random variable with parameter #p#.

To calculate *cumulative *probabilities for a geometric distribution in Excel, make use of the following function:

NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)

number_f: The number of failures.number_s: The number of successes.

NOTE:When using this function to perform geometric probability calculations, this argument will always be set to 1.probability_s: The probability of success for each trial.cumulative: A logical value that determines the form of the function.

- TRUE - uses the cumulative distribution (at most
number_ffailures)- FALSE - uses the probability mass function (exactly
number_ffailures)

To calculate *cumulative *probabilities for a geometric distribution in R, make use of the following function:

pgeom(q, prob)

q: The number of failures before a success occurs.prob: The probability of success for each trial.

There are a number of different ways we can calculate #\mathbb{P}(X \leq 6)#. Click on one of the panels to toggle a specific solution.

To calculate #\mathbb{P}(X \leq 6)# in Excel, make use of the following function:

If we observe the first success on the sixth trial or ealier #(X \leq 6)#, then we will have observed at most #5# failures and #1# success.

NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)

number_f: The number of failures.number_s: The number of successes.probability_s: The probability of success for each trial.cumulative: A logical value that determines the form of the function.

- TRUE - uses the cumulative distribution (at most
number_ffailures)- FALSE - uses the probability mass function (exactly
number_ffailures)

Thus, to calculate #\mathbb{P}(X \leq 6)#, we run the following command:

\[= \text{NEGBINOM.DIST}(5, 1, 0.2, \text{TRUE})\]

This gives:

\[\mathbb{P}(X \leq 6) = 0.738\]

To calculate #\mathbb{P}(X \leq 6)# in R, make use of the following function:

If we observe the first success on the eighth trial or earlier #(X \leq 6)#, then we will have observed at most #5# failures.

pgeom(q, prob)

q: The number of failures before a success occurs.prob: The probability of success for each trial.

Thus, to calculate #\mathbb{P}(X \leq 6)#, we run the following command:

\[\text{pgeom}(q = 5, prob = 0.2)\]

This gives:

\[\mathbb{P}(X \leq 6) = 0.738\]

#\text{}#

Mean, Variance, and Standard Deviation of a Geometric Random Variable

The **expected value** of a geometric random variable is calculated with the following formula: \[\mu = \cfrac{1}{p}\]

The **variance **of a geometric random variable is calculated with the following formula:\[\sigma^2 = \cfrac{1-p}{p^2}\]

The **standard deviation **of a geometric random variable is calculated with the following formula:\[\sigma = \sqrt{\cfrac{1-p}{p^2}}\]

The

*expected value*of a geometric random variable #X\sim Geo(p)# is calculated as follows:

\[\begin{array}{rcl}

\mu&=& \cfrac{1}{p} \\\\

&=& \cfrac{1}{0.25} \\\\

&=& 4

\end{array}\]

**Pass Your Math**independent of your university. See pricing and more.

Or visit omptest.org if jou are taking an OMPT exam.