Docsity

The Geometric Distribution - Lecture Notes | MATH 329, Study notes of Probability and Statistics

Toggle sidebar
bg1
Dr. Neal, WKU
MATH 329 The Geometric Distribution
Suppose we have a fixed probability
p
of having a “success” on any single attempt,
where p>0. We continue to make independent attempts until we succeed. Then the
geometric random variable, denoted by X~geo(p), counts the total number of attempts
needed to obtain the first success. Its range is the set of natural numbers {1, 2, 3, . . . }.
Probability Distribution Function
The probability of having a “success” on the first attempt is
p
. In general, to succeed
for the first time on the
k
th attempt, there would have to be
k−1
“failures”
beforehand. By independence, any sequence having
k−1
failures followed by a success
occurs with probability q
k−1p
, where q=1−p is the probability of “failure” on any
attempt. Thus, the probability of succeeding for the first time on the
k
th attempt is given
by
P X =k
( )
= q
k−1p
, for
k
≥ 1.
We can use the geometric series formula to verify that the probability distribution
sums to 1:
P(X=k)
k=1
∞
∑=qk−1p
k=1
∞
∑=p qk
k=0
∞
∑=p×1
1−q=1.
Mode
Because the pdf is a decreasing function of
k
, the mode is
k=1
. That is, the most likely
number of attempts needed to succeed is 1, and P X =1
( )
=p. (Because p>0, then q<1.
So for
k
≥ 2, q
k−1p
<
p
; thus, P X =k
( )
< P X
=1
( )
.) So if you are going to succeed,
then you are most likely to succeed on the first try, which is better known as
“beginner's luck.”
Cumulative Distribution Function
There is a useful closed-form formula for the cumulative distribution function (cdf)
P X ≤k
( )
. The event {
X≤k
} means that the first success occurs within
k
attempts. Its
complement is the event that there are no successes in any of the first
k
attempts, which
has probability q
. So the cdf of the geometric distribution is given by
P X ≤k
( )
= 1−q
k
, for
k
≥ 1.
Example 1. Roll a fair six-sided die over and over until you roll a 3. Count the number
of rolls needed. What is the probability that it takes
(a) exactly 6 rolls (b) at most 5 rolls (c) at least 4 rolls (d) from 4 to 8 rolls
(e) at least 9 rolls given that it takes at least 4 rolls (f) an odd number of rolls?
pf3
pf4
pf5

Partial preview of the text

Download The Geometric Distribution - Lecture Notes | MATH 329 and more Study notes Probability and Statistics in PDF only on Docsity!

MATH 329 The Geometric Distribution

Suppose we have a fixed probability p of having a “success” on any single attempt, where p > 0. We continue to make independent attempts until we succeed. Then the geometric random variable, denoted by X ~ geo ( p ) , counts the total number of attempts needed to obtain the first success. Its range is the set of natural numbers {1, 2, 3,... }.

Probability Distribution Function

The probability of having a “success” on the first attempt is p. In general, to succeed for the first time on the k th attempt, there would have to be k − 1 “failures” beforehand. By independence, any sequence having k − 1 failures followed by a success

occurs with probability qk −^1 p , where q = 1 − p is the probability of “failure” on any attempt. Thus, the probability of succeeding for the first time on the k th attempt is given by

P X (^ = k )^ = qk −^1 p , for k ≥ 1.

We can use the geometric series formula to verify that the probability distribution sums to 1:

P ( X = k ) k = 1

∞

∑ =^ q

k − (^1) p k = 1

∞

∑ =^ p^ q

k k = 0

∞

∑ =^ p^ ×^

1 − q

Mode

Because the pdf is a decreasing function of k , the mode is k = 1. That is, the most likely number of attempts needed to succeed is 1, and P X (^ = 1 ) = p. (Because p > 0 , then q < 1.

So for k ≥ 2, qk −^1 p < p ; thus, P X (^ = k )^ < P X (^ = 1 ).) So if you are going to succeed, then you are most likely to succeed on the first try, which is better known as “beginner's luck.”

Cumulative Distribution Function

There is a useful closed-form formula for the cumulative distribution function (cdf) P X (^ ≤ k ). The event { X ≤ k } means that the first success occurs within k attempts. Its complement is the event that there are no successes in any of the first k attempts, which

has probability qk^. So the cdf of the geometric distribution is given by

P X (^ ≤ k )^ = 1 − qk^ , for k ≥ 1.

Example 1. Roll a fair six-sided die over and over until you roll a 3. Count the number of rolls needed. What is the probability that it takes

(a) exactly 6 rolls (b) at most 5 rolls (c) at least 4 rolls (d) from 4 to 8 rolls

(e) at least 9 rolls given that it takes at least 4 rolls (f) an odd number of rolls?

Solution. The probability of rolling a 3 on any roll is p = 1/ 6 > 0. Let X ~ geo (1 / 6) count the number of rolls needed to roll the first 3. Letting q = 5 / 6, we have

(a) P X (^ = 6 ) =

5 ×

≈ 0.06698 (b) P X (^ ≤ 5 ) = 1 −

5 ≈ 0.

(c) To take at least 4 rolls to succeed means we must have failed on the first three tries;

so P X (^ ≥ 4 ) =

3 ≈ 0.5787. In general, we have

P X (^ ≥ k ) = 1 − P X (^ ≤ k − 1 ) = 1 − (1− qk −^1 ) = qk −^1.

(d) Using the cdf of X , we have

P (^4 ≤ X ≤ 8 ) = P X (^ ≤ 8 ) − P X (^ ≤ 3 ) = 1 −

^8

^3

3 −

8 ≈ 0.346.

(e) Using the properties of conditional probability and the general result from (c), we have

P X ( ≥ 9 X ≥ 4 ) =

P X ( ≥ 9 ∩ X ≥ 4 )

P X (^ ≥ 4 )^

P X ( ≥ 9 )

P X (^ ≥ 4 )

(5 / 6)^8

(5 / 6)^3

= (5/ 6)^5 ≈ 0..

In other words, given that we have already failed 3 times in a row so that X ≥ 4 , what is the probability that we fail 8 times in a row so that X ≥ 9? It is equivalent to starting all over and simply failing 5 times in a row.

(f) Finally, the probability that it takes an odd number of rolls to roll a 3 is

P X ( ∈{1, 3, 5, 7,. ..}) = p + qq p + q q q q p + q q q q q q p +...

= p ( ( q^2 )^0 + ( q^2 )^1 + ( q^2 )^2 + ( q^2 )^3 ) +...

= p ( q^2 ) k k = 0

∞

∑ =^ p^ ×^

1 − q^2

= p ×

(1 − q )(1 + q )

1 + q

=

The Law of Try Try Again

The probability of succeeding within k attempts is P X (^ ≤ k )^ = 1 − qk^. Because 0 ≤ q < 1 this probability increases to 1 as k increases to ∞. So by choosing k large enough, we can make our probability of succeeding within k attempts as high as we like.

Proposition. Let 0 < p < 1 be the fixed probability of success on any single independent attempt. Let 0 < R < 1. In order to have probability of at least R of succeeding within k attempts, the minimum number of attempts needed is

k =

ln(1 − R ) ln q

If p = 1 , then we only need 1 attempt.

Note: The expression (^)  x  means to round x up to the nearest integer.)

Proof. The result is obvious for p = 1. For 0 < p < 1 , we simply solve for k in the inequality R ≤ P ( X ≤ k ). Note that because 0 < q < 1 when 0 < p < 1 , we have ln q < 0. Thus we have

R ≤ P ( X ≤ k ) iff R ≤ 1 − qk^ iff qk^ ≤ 1 − R iff k ln q ≤ ln(1 − R )

iff k ≥

ln(1 − R ) ln q

iff k =

ln(1 − R ) ln q

Example 2. Qualified applicants have a 20% chance of being accepted into graduate school in top-notch programs. Assume a student's evaluations at differing schools are independent of each other.

(a) On average, how many applications does it take for a qualified applicant to be accepted?

(b) What is the probability that the number of required applications is within a standard deviation of average?

(c) You want your chance of acceptance to be at least 98%. How many applications should you send out?

Solution. Let X ~ geo (0.2) model the number of applications needed for an acceptance.

(a) On average, it takes E [ X ] = 1/ p = 1/ 0.2 = 5 applications for an acceptance.

(b) With (^) X = 1 − p / p = 0.8 / 0.2 ≈ 4.47 , we have

P ( − ≤ X ≤ − ) = P (5 − 4.77 ≤ X ≤ 5 + 4.77)

= P (1 ≤ X ≤ 9)

= P ( X ≤ 9)

= 1 − 0.8^9

(c) To make P ( X ≤ k ) ≥ 0.98 , the minimum number of applications needed is

k =

ln(0.02) ln(0.80)

So we need 18 applications.

Exercise (Give solutions , not just answers)

Draw cards from a shuffled deck one at a time, each time with replacement and re- shuffling. Count the number of draws needed to draw a Heart.

  1. What is the probability that it takes

(a) exactly 4 draws (b) at most 3 draws (c) at least 5 draws (d) from 2 to 6 draws

(e) at least 7 draws given that it takes at least 3 draws (f) an even number of draws?

  1. What are the average number of draws needed and the standard deviation in the number of draws needed?
  2. You bet someone that you can draw a Heart within k draws. You want your chance of winning this bet to be at least 51%. What is the minimum value of k needed?