Associated Topics || Dr. Math Home || Search Dr. Math

### Yahtzee Probabilities and a State Matrix

```
Date: 12/30/98 at 21:26:47
From: Bruce A Ryan
Subject: Rolling dice

In playing the game Yahtzee, what are the odds of rolling 5 of a kind
within three rolls of the dice?
```

```
Date: 01/01/99 at 04:54:08
From: Doctor Pat
Subject: Re: Rolling dice

I'll start by making some assumptions. First, the goal is only to get
five of a kind. If we get two or three or four of a kind we pick up the
remaining dice and roll to improve our position, and for two pair or
full house we pick up (randomly) the best of two or the best hand, and
so on.

Given that I think the probabilities on the first roll are :

P(5 of a kind) = 1/6^4
P(4 of a kind) = 25/1296
P(3 of a kind) = 125/648
P(2 of a kind) = 75/108
P(no two alike) = 5/54 (here we pick up all five and roll again)

This gives a transition matrix from roll to roll equal to the matrix
below:

from   to    1          2          3          4           5

1          5/54      75/108    125/648     25/1296      1/6^4

2           0         5/9*      10/27**    15/6^3       1/6^3

3           0          0        25/36       5/18        1/6^2

4           0          0          0         5/6         1/6

5           0          0          0          0           1

* If all three of the other dice come up the the same value,
that's a transition from state 2 to state 3:
p = 125/216 - 5/216 = 120/216 = 5/9.

** If all three of the other dice come up with the same value,
that's a transition from state to to state 3... but with a
different value:  p = 75/216 + 5/216 = 80/216 = 10/27

Taking the third power of this matrix gives us the probability of
ending in any of the five states. I got the following probabilities
for the result after three rolls:

P(no two alike) = .00079
P(two alike)    = .256
P(three alike)  = .4524
P(four alike)   = .2447
P(five alike)   = .046

If those don't add up to exactly one, the reason is roundoff error. In
all, there is only about a 5% probability of getting a "Yahtzee."

Probability Transition Matrices
http://mathforum.org/library/drmath/view/54265.html

- Doctor Pat, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 01/01/99 at 17:45:47
From: Bruce Ryan
Subject: Re: Rolling dice

Dear Dr. Pat,

Yahtzee, what are the odds of rolling five of a kind within three rolls
of the dice? However, I think I misled you. My question actually
pertains more to just rolling 5 dice for 5 of a kind.

I probably should have written that in a game we have at our social
quarters, we are allowed to roll 5 dice just 3 times for a quarter. If
you roll 5 of a kind you win the built up jackpot. You are only allowed
to roll the dice using all 5 dice each time you roll. In other words,
if you roll 3 of a kind on your first roll, that doesn't count. You
have to pick up all 5 dice and roll again. What are the odds of rolling
5 of a kind out of these 3 rolls?

Thank you very much for your time.

Bruce A. Ryan
```

```
Date: 01/02/99 at 02:22:48
From: Doctor Pat
Subject: Re: Rolling dice

Bruce,

Boy, that is a lot easier. I'm glad you didn't ask that first or I
would not have had the fun of doing all the other stuff. But now about
the new situation:

The probability, as I said in my first response, is 1/6^4 or about
.00077 that you will succeed on any roll. This means that in three
tries the probability is 770 out of a million that you will win on the
first try. The probability that you will win on the second and third
try is almost exactly the same (actually minutely less.) This means
the overall probability is about two chances out of a thousand roughly
(3*.00077). If it happens to someone more than once, be very
suspicious.

Good luck,

- Doctor Pat, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 01/12/99 at 10:16:14
From: Florian
Subject: Dice probability - Yahtzee

Hi,

I'm sorry but I cannot follow your thoughts completely. How did you
get the transition matrix? How does it work? How can you get the
probability from this matrix?

Sincerely,
Florian
```

```
Date: 01/12/99 at 16:25:04
From: Doctor Pat
Subject: Re: Dice probability - Yahtzee

Florian,

The matrix is called a state matrix, and it gives the probability that
you will move from any "state" to the same or another state. In your
problem the "states" would be the maximum number of dice showing the
same number after each roll. If you draw five circles in sort of a
pentagon and put the numbers one to five in them, you can draw a graph
of what the matrix shows. If you think of the one as the position of no
two alike, this is where you are before you roll. On the first roll,
five things may happen:

1. You may roll five different numbers. This would be indicated on your
graph by a line from (1) looping back to (1). The probability of this
event is given in row 1 (from 1) column 1 (to 1) of the matrix.

2-5. You may have two alike of one or more numbers. This would be
indicated on your graph by a line from (1) to (2). The probability of
this event is given in row 1, column 2. The same thing happens for
three of a kind (from (1) to (3)) - row 1 column 3, etc.

After the first roll you may be at any one of the positions. Of course
if you are at five, you quit and win. This means the circle (5) only
has a loop back to itself, and the probability in row 5 is all zero
except for column 5 which has probability of one.

On any subsequent roll, the probability that you will move from, say,
circle (3) to circle (4) is given by the matrix row 3, column 4. The
matrix first row, then, gives you the probability of being in any state
after one roll. A great Russian mathematician named Markov showed that
if you multiply this matrix times itself, you get the probabilities for
positions after two rolls, and if you raise it to the third power, you
get the probabilities after three rolls.

To get the actual values in each cell, I drew out a tree diagram of
every possible position after three rolls and computed individual
probabilities, but once I had the transition matrix, all else was easy.
You can look this up using the search engine at the Math Forum. Try
the search words:

Markov matrix

Good luck,

- Doctor Pat, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 05/01/2002 at 21:39:17
From: Phil Lindsey
Subject: Yahtzee Odds

Specifically, I think that line 2 in the Transition Matrix should be
as follows:

To                  1         2         3         4        5

From 2              0      125/216    75/216    15/216    1/216

I will be able to sleep better if I know I am not going crazy!
Thank you.
Phil Lindsey
```

```
Date: 05/02/2002 at 14:38:40
From: Doctor Ian
Subject: Re: Yahtzee Odds

Hi Phil,

The first difference is that you get 125/216 for the probability of
going from 2 of a kind back to 2 of a kind, while Dr. Pat gets 5/9.

I think your reasoning is that we already have two of some value, so
the next three dice all have to be different from this value:
(5/6)^3 = 125/216.

However, this doesn't take into account that if all three of the dice
come up with the same value, you're no longer going from state 2 to
state 2, but from state 2 to state 3. So you have to exclude the
possibility that the three dice come up with the same value.

That can happen in 5 ways, so the probability is

125/216 - 5/216 = 120/216 = 5/9

The second difference is that you get 75/216 for the probability of
going from 2 of a kind to 3 of a kind.

I think your reasoning is that we already have two of some value, so
one of the next three dice has to be the same, and the other two have
to be different. That can happen in three ways, so:

(1/6 * 5/6 * 5/6) + (5/6 * 1/6 *5/6) + (5/6 * 5/6 * 1/6)

= 3(1/6 * 5/6 * 5/6)

= 75/216

However, suppose that all three dice turn up the same? Then we've also
moved into state 3... but with a different value!

The probability of rolling 3 of a kind with three dice is 1/216, and
we have five possible values to choose from, so the transition
probability is

75/216 + 5/216 = 80/216 = 10/27

Does this help?

- Doctor Ian, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
College Probability
High School Probability

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search