# Predict the likelihood of multiple future occurrences based on probability

diceprobability

I'm analyzing the game Yahtzee in which a player can roll five dice three times and at each interval can choose to roll/not roll certain dice or stop rolling altogether. The goal is to get different combinations like four-of-a-kind, a straight (1-2-3-4-5 or 2-3-4-5-6), etc.

I found that binomial probability was exactly what I needed. Using the formula P(X=r) = nCr * pʳ * (1-p)ⁿ⁻ʳ I could basically say "if I roll five dice, what are the chances 3 of them match" and that formula gives me a percentage chance. That works great!

However, referencing the research done here, your chances of getting a Yahtzee (five of a kind) is about 4% if you use all three rolls. Your chances of rolling a Yahtzee in your first roll is 0.08% but the probability of doing it over three rolls is much higher because you could set aside some matches and only roll the remaining dice you need to match.

But how can you calculate this at each interval?

Example: Say I want a four-of-a-kind and I roll a 4 5 3 4 2. A smart player would re-roll the 5 3 2 in hopes of getting more 4's. Binomial probability tells us you have a 6.94% chance of getting two 4's in the next roll. So how can I calculate the chance I get two 4's in either the next roll or the one after that?

Here's a representation of how you can accomplish this feat. If you need 2 4's, are rolling three dice, and can roll twice, you have the following win possibilities:

1. (1) 4 X X – (2) 4 X
2. (1) X X X – (2) 4 4 X
3. (1) 4 4 X

I can use binomial probability to calculate the chances of getting each of these. Should I average them to get what I need? I feel like I'm so close, hopefully one of you guys knows a formula or can help me out.

Take $$E$$ as the event of getting at least two more fours in the next roll or the one after that, $$X$$ as the number of fours in the first roll, and $$Y$$ as the number of fours in the second roll.
Using total law of probability, $$\begin{eqnarray*}\mathbb{P}(E)=\mathbb{P}(E|X=0)\mathbb{P}(X=0)+\mathbb{P}(E|X=1)\mathbb{P}(X=1)+\mathbb{P}(E|X\geq 2)\mathbb{P}(X\geq 2)\end{eqnarray*}$$ Since $$\mathbb{P}(E|X\geq 2)=1$$ and $$X\sim \text{Binomial}(3,1/6)$$ the aforementioned reduces to $$\mathbb{P}(E)=\frac{125}{216}\mathbb{P}(E|X=0)+\frac{25}{72}\mathbb{P}(E|X=1)+\frac{2}{27}$$ Now for $$x=0,1$$ $$\mathbb{P}(E|X=x)=\sum_{y=0}^{3-x}\mathbb{P}(E|X=x,Y=y)\mathbb{P}(Y=y|X=x)$$ Because $$\mathbb{P}(E|X=x,Y=y)=1_{\{x+y\geq 2\}}$$ and $$Y|X\sim \text{Binomial}(3-X,1/6)$$ we have $$\mathbb{P}(E|X=0)=\mathbb{P}(Y\geq 2|X=0)=\frac{2}{27}$$ Furthermore, $$\mathbb{P}(E|X=1)=\mathbb{P}(Y\geq 1|X=1)=\frac{11}{36}$$ Putting all this together, $$\mathbb{P}(E)=\frac{5203}{23328}\approx 0.22$$