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?

2 Answers
Dec 13, 2016

We use our good friend Bayes' rule to help us deduce:
Pr("took 2 rolls"|"score is 5")=2/15.Pr(took 2 rollsscore is 5)=215.

Explanation:

Warning: Long answer ahead!

One form of Bayes' rule states the following:

Pr(B|A)=(Pr(AB))/(Pr(A))=(Pr(A|B)*Pr(B))/(Pr(A))Pr(BA)=Pr(AB)Pr(A)=Pr(AB)Pr(B)Pr(A)

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"))Pr(2 rollsscore is 5)=Pr(score is 52 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 AA can be partitioned into kk disjoint events AnnC_1, AnnC_2, ..., AnnC_kAC1,AC2,...,ACk (where none of these intersected regions overlap, and together they all form AA), then

Pr(A)=sum_(i=1)^kPr(A|C_i)*Pr(C_i)Pr(A)=ki=1Pr(ACi)Pr(Ci)

We actually have that here; the C_iCi's will be the number of possible rolls on a turn. What we're saying is that

Pr("score is 5")=Pr("score is 5"|"1 roll")*Pr("1 roll")Pr(score is 5)=Pr(score is 51 roll)Pr(1 roll)
color(white)"XXXXXXXXX"+Pr("score is 5"|"2 rolls")*Pr("2 rolls")XXXXXXXXX+Pr(score is 52 rolls)Pr(2 rolls)
color(white)"XXXXXXXXX"+Pr("score is 5"|"3 rolls")*Pr("3 rolls")XXXXXXXXX+Pr(score is 53 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_5S5 for "the score was 5" and R_nRn for "nn number of rolls". Putting this all together, we have

Pr(R_2|S_5)=(Pr(S_5|R_2)Pr(R_2))/(Pr(S_5|R_1)Pr(R_1)+Pr(S_5|R_2)Pr(R_2)+Pr(S_5|R_3)Pr(R_3))Pr(R2S5)=Pr(S5R2)Pr(R2)Pr(S5R1)Pr(R1)+Pr(S5R2)Pr(R2)+Pr(S5R3)Pr(R3)
=[Pr(S_5nnR_2)]/[Pr(S_5nnR_1)+Pr(S_5nnR_2)+Pr(S_5nnR_3)]=Pr(S5R2)Pr(S5R1)+Pr(S5R2)+Pr(S5R3)

Now, we do the calculations!

Pr(S_5nnR_1)=Pr("roll a 5")Pr(S5R1)=Pr(roll a 5)
=1/6=16
Pr(S_5nnR_2)=Pr("roll a 2, then a 3")=1/6*1/6Pr(S5R2)=Pr(roll a 2, then a 3)=1616
=1/36=136
Pr(S_5nnR_3)=Pr["roll a 1; then (1,3), (2,2), or (3,1)"]=1/6*3/36Pr(S5R3)=Pr[roll a 1; then (1,3), (2,2), or (3,1)]=16336
=1/72=172

Finally, we place these values back into the equation for Pr(R_2|S_5):Pr(R2S5):

Pr(R_2|S_5)=(1/36)/(1/6+1/36+1/72)color(blue)(*72/72)Pr(R2S5)=13616+136+1727272

color(white)(Pr(R_2|S_5))=(2)/(12+2+1)Pr(R2S5)=212+2+1

color(white)(Pr(R_2|S_5))=2/15Pr(R2S5)=215

For completeness, Pr(R_1|S_5)=12/15=4/5,Pr(R1S5)=1215=45, and Pr(R_3|S_5)=1/15.Pr(R3S5)=115. 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("2 rolls"|"scored 5")=2/15.P(2 rollsscored 5)=215.

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.

ul("One roll:")
P(5)=1/6

ul("Two rolls:")
P(2, 3)=1/6*1/6=1/36

ul("Three rolls:")
P(1, 1, 3)=1/6*1/6*1/6=1/216
P(1, 2, 2)=1/6*1/6*1/6=1/216
P(1, 3, 1)=1/6*1/6*1/6=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")]

=[P(2,3)]/[P(5)+P(2,3)+P(1,1,3)+P(1,2,2)+P(1,3,1)]

=(1/36)/(1/6+1/36+1/216+1/216+1/216)color(blue)(*216/216)

=6/(36+6+1+1+1)

=6/45=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.