Thread: Help with Simple Probability Program

1. Help with Simple Probability Program

This probably isn't that difficult of a problem for most of you, but I am stuck on it. Can anyone help?

Question: What is the minimum number of times you must roll a number cube to have a 50% chance of getting a 6.

2. Originally Posted by november7
This probably isn't that difficult of a problem for most of you, but I am stuck on it. Can anyone help?

Question: What is the minimum number of times you must roll a number cube to have a 50% chance of getting a 6.

The probability that you get no six on first roll is 5/6. The probability that you get no sixes on two rolls is (5/6)(5/6). And in general the probability that you get no sixes on n rolls is (5/6)^n. Now if n=3 then that number is .578 (thus it is likely you get no sixes on 3 rolls), and if n=4 then that number is .482. Thus, it is unlikely to get no sixes after 4 rolls. That number is 4.

3. Hello, november7!

Same solution, different spin . . .

What is the minimum number of times you must roll a number cube
to have a 50% chance of getting a 6. ?

Consider rolling the die $\displaystyle n$ times and not getting a 6.

The probability of getting a number other than 6 is: $\displaystyle \frac{5}{6}$
Then: .$\displaystyle P(\text{no 6 in }n\text{ rolls}) \;=\;\left(\frac{5}{6}\right)^n$
And we want this probability to be less than 50%.

So we have . $\displaystyle \left(\frac{5}{6}\right)^n \:<\:0.5$

Take logs: .$\displaystyle \ln\left(\frac{5}{6}\right)^n \:<\:\ln(0.5)\quad\Rightarrow\quad n\cdot\ln\left(\frac{5}{6}\right) \:<\:\ln(0.5)$

Divide by $\displaystyle \ln\left(\frac{5}{6}\right)$ . . . a negative quantity.
. . $\displaystyle n \:> \:\frac{\ln(0.5)}{\ln\left(\frac{5}{6}\right)} \;=\;3.801784017$

Therefore, we must roll at least 4 times.