# Conditional probability question?

## A game is played with one standard die. On a turn, if a player rolls a 1, he gets two more rolls. If he rolls a 2, he gets one more roll. If he rolls anything else, his turn ends. His score is the sum of all the rolls on his turn (up to 3 rolls). If a player scores 5 points on a turn, what is the probability that it took 2 rolls?

Dec 13, 2016

We use our good friend Bayes' rule to help us deduce:
$P r \left(\text{took 2 rolls"|"score is 5}\right) = \frac{2}{15.}$

#### Explanation:

One form of Bayes' rule states the following:

$P r \left(B | A\right) = \frac{P r \left(A B\right)}{P r \left(A\right)} = \frac{P r \left(A | B\right) \cdot P r \left(B\right)}{P r \left(A\right)}$

This allows us to write a conditional probability of "B given A" in terms of "A given B", which may be easier to calculate. In this question,

B = "die rolled twice", and
A = "score is 5".

Let's write this into the equation:

Pr("2 rolls"|"score is 5")=(Pr("score is 5"|"2 rolls")*Pr("2 rolls"))/(Pr("score is 5"))

The numerator on the RHS is easy to deduce; however, the denominator, in its current state, is not. But we can make it easier. We recall that, if $A$ can be partitioned into $k$ disjoint events $A \cap {C}_{1} , A \cap {C}_{2} , \ldots , A \cap {C}_{k}$ (where none of these intersected regions overlap, and together they all form $A$), then

$P r \left(A\right) = {\sum}_{i = 1}^{k} P r \left(A | {C}_{i}\right) \cdot P r \left({C}_{i}\right)$

We actually have that here; the ${C}_{i}$'s will be the number of possible rolls on a turn. What we're saying is that

$P r \left(\text{score is 5")=Pr("score is 5"|"1 roll")*Pr("1 roll}\right)$
color(white)"XXXXXXXXX"+Pr("score is 5"|"2 rolls")*Pr("2 rolls")
color(white)"XXXXXXXXX"+Pr("score is 5"|"3 rolls")*Pr("3 rolls")

Kind of a "the whole is equal to the sum of its parts" thing.

From hereon, let's use the shorthand ${S}_{5}$ for "the score was 5" and ${R}_{n}$ for "$n$ number of rolls". Putting this all together, we have

$P r \left({R}_{2} | {S}_{5}\right) = \frac{P r \left({S}_{5} | {R}_{2}\right) P r \left({R}_{2}\right)}{P r \left({S}_{5} | {R}_{1}\right) P r \left({R}_{1}\right) + P r \left({S}_{5} | {R}_{2}\right) P r \left({R}_{2}\right) + P r \left({S}_{5} | {R}_{3}\right) P r \left({R}_{3}\right)}$
$= \frac{P r \left({S}_{5} \cap {R}_{2}\right)}{P r \left({S}_{5} \cap {R}_{1}\right) + P r \left({S}_{5} \cap {R}_{2}\right) + P r \left({S}_{5} \cap {R}_{3}\right)}$

Now, we do the calculations!

$P r \left({S}_{5} \cap {R}_{1}\right) = P r \left(\text{roll a 5}\right)$
$= \frac{1}{6}$
$P r \left({S}_{5} \cap {R}_{2}\right) = P r \left(\text{roll a 2, then a 3}\right) = \frac{1}{6} \cdot \frac{1}{6}$
$= \frac{1}{36}$
$P r \left({S}_{5} \cap {R}_{3}\right) = P r \left[\text{roll a 1; then (1,3), (2,2), or (3,1)}\right] = \frac{1}{6} \cdot \frac{3}{36}$
$= \frac{1}{72}$

Finally, we place these values back into the equation for $P r \left({R}_{2} | {S}_{5}\right) :$

$P r \left({R}_{2} | {S}_{5}\right) = \frac{\frac{1}{36}}{\frac{1}{6} + \frac{1}{36} + \frac{1}{72}} \textcolor{b l u e}{\cdot \frac{72}{72}}$

$\textcolor{w h i t e}{P r \left({R}_{2} | {S}_{5}\right)} = \frac{2}{12 + 2 + 1}$

$\textcolor{w h i t e}{P r \left({R}_{2} | {S}_{5}\right)} = \frac{2}{15}$

For completeness, $P r \left({R}_{1} | {S}_{5}\right) = \frac{12}{15} = \frac{4}{5} ,$ and $P r \left({R}_{3} | {S}_{5}\right) = \frac{1}{15.}$ These three probabilities sum to 1, which is what we'd expect, since if the player's score was 5, it had to take either 1, 2, or 3 rolls.

## Bonus:

There's a great Numberphile video on YouTube discussing Bayes' rule here:

Dec 13, 2016

Alternate explanation to the long version I previously posted.
We still get $P \left(\text{2 rolls"|"scored 5}\right) = \frac{2}{15.}$

#### Explanation:

What are the different ways to score 5 points, and what are their probabilities? Well, we could roll:

• a 5 right away;
• a 2, then a 3;
• a 1, then a 1, then a 3;
• a 1, then a 2, then a 2; or
• a 1, then a 3, then a 1.

$\underline{\text{One roll:}}$
$P \left(5\right) = \frac{1}{6}$

$\underline{\text{Two rolls:}}$
$P \left(2 , 3\right) = \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36}$

$\underline{\text{Three rolls:}}$
$P \left(1 , 1 , 3\right) = \frac{1}{6} \cdot \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{216}$
$P \left(1 , 2 , 2\right) = \frac{1}{6} \cdot \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{216}$
$P \left(1 , 3 , 1\right) = \frac{1}{6} \cdot \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{216}$

So the probability of scoring 5 points is simply the sum of the probabilities above. The final answer we seek is the fraction of this sum belonging to the two-roll method—in other words, the relative probability of "scoring 5 in two rolls" to "scoring 5 in any way".

Using conditional probability, we get:

P("2 rolls"|"scored 5")=[P("2 rolls"nn"scored 5")]/[P("scored 5")]

$= \frac{P \left(2 , 3\right)}{P \left(5\right) + P \left(2 , 3\right) + P \left(1 , 1 , 3\right) + P \left(1 , 2 , 2\right) + P \left(1 , 3 , 1\right)}$

$= \frac{\frac{1}{36}}{\frac{1}{6} + \frac{1}{36} + \frac{1}{216} + \frac{1}{216} + \frac{1}{216}} \textcolor{b l u e}{\cdot \frac{216}{216}}$

$= \frac{6}{36 + 6 + 1 + 1 + 1}$

$= \frac{6}{45} = \frac{2}{15}$

which is the same answer as before.

This method is easier in this case; however, the Bayesian method is more general and has much broader applicability.