Problem

Suppose that we roll a die until a 6 comes up.

a. What is the probability that we roll the die n times?

b. What is the expected number of times we roll the die?

(Rosen - Discrete Mathematics and Its Appplications, 6th ed., pg. 440 (6.4.12))


Solution

a. If we roll the die n times (assuming n ≥ 1 and the dice is 6-sided and fair), then we must roll n-1 "not 6" rolls followed by 1 "6" roll. The probability of that is:

$ (\frac{5}{6})^{n-1} (\frac{1}{6})^1 $


b. We could roll the die any number of times from 1 to infinite. Consider a random variable R which is the number of rolls to roll a 6. We could determine the expected number in two ways:

i. We could say that R is a geometric RV with a chance of success of $ \frac{1}{6} $, so $ E(R) = \frac{1}{(\frac{1}{6})} = 6 $

ii. We could show i. explicitly, using the formula for expected value:

$ E(R) = \sum_{s \in S} R(s) p(s) $

$ = \sum_{i=1}^\infty (i) ((\frac{5}{6})^{i-1} (\frac{1}{6})^1) $

$ = \frac{1}{6} \sum_{i=1}^\infty (i) ((\frac{5}{6})^{i-1}) $

This summation takes the form $ \sum_{i=1}^\infty (i) (r^{i-1}), \text{ where } |r| < 1 $

$ \sum_{i=1}^\infty (i) (r^{i-1}) = \sum_{i=1}^\infty \frac{d}{dr} (r^i) $

$ = \frac{d}{dr} \sum_{i=1}^\infty (r^i) $

$ = \frac{d}{dr} \frac{1}{1-r} $ (since |r| < 1)

$ = \frac{1}{(1-r)^2} $

Let $ r= \frac{5}{6} \ \ (|r| = \frac{5}{6} < 1.) $. Then,

$ E(R) = \frac{1}{6} (\frac{1}{(1-\frac{5}{6})^2}) $

$ \Rightarrow E(R) = 6 $

Either way, we get the same answer: 6 rolls.

--Thomas34 12:55, 16 October 2008 (UTC)

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang