



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




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
∞
k − (^1) p k = 1
∞
k k = 0
∞
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 −
3 −
8 ≈ 0.346.
(e) Using the properties of conditional probability and the general result from (c), we have
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 ( q^2 ) k k = 0
∞
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
(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.
(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?