Yahtzee is a traditional
game of chance. Other names of this game are Yam and Yatzy. It is
played with five dice. Any number can play and the goal is to get
the highest score on a score sheet. You throw the dice, decide
which ones to keep and throw the remaining dice again. After the
third roll at the latest you decide what box to fill in the score
card. There are as many rounds as scoring boxes. If there is no
suitable box to fill you will have to put a zero in one of the
empty slots. Different versions of the game have different boxes
but they all have a box for Yahtzee, getting five of a kind. This
is the hardest but most valuable box to fill.

How big is the
probability of Yahtzee? That is the question for this project. It
is illustrated by the java applet above.

The “Petals”
button leads to a quiz called “Petals of the Rose”. Its
only relation to the project is that it requires five dice. Roll
the dice and guess a number. Push check to check your answer.
Repeat until you figure it out.

Back to Yahtzee! The roll
and reset buttons rolls and resets the dice. To hold or release a
die push the symbol below the die. There are two ways to decide the
probability for getting Yahtzee with n throws at your disposal,
calculate or simulate. The statistics button does it the Monte
Carlo way, simulating 10.000 trials. Dice are rolled and hold until
they are all alike. The number of throws needed for Yahtzee is
registered and their relative frequencies are shown in a diagram. The
relative frequencies seem to approach certain values. The
computational task is to calculate these values.

Calculating probabilities for getting Yahtzee might seem like a
routine exercise in combinatorics but it can lead to all kinds of
interesting stuff. It will involve statistical theory and linear algebra.
There are also interesting parallels between Yahtzee probabilities
and the theory of quantum mechanics. The navigation bar leads to texts
on these subjects. The texts introduces concepts that are applicable to
the problem. They are very condensed so If you want to learn more about
any of the subjects I would recommend reading an introductory book.

The best option after each throw is to find the number that is most
frequent, keep those dice and throw the rest again. If there are more than
one number that is most frequent say 2,3,5,5,3 you could of course choose
to hold on to either 3’s or 5’s. If they are all different,
holding on to one or none is equivalent. The dice can be in one of
five different states after each throw.

Ψ_{1},Ψ_{2},Ψ_{3},Ψ_{4},Ψ_{5} : The most frequent number occurs 1, 2, 3, 4 or 5 times.

Throw the dice hold on to the most frequent number and throw again. The road to
Yahtzee could look like this:

A time series in discrete steps with Ψ(1)=Ψ_{2},
Ψ(2)=Ψ_{2},
Ψ(3)=Ψ_{3},
Ψ(4)=Ψ_{3}, and so on.

Duplicate yourself in a million copies and let all the copies perform the same
Yahtzee experiment. At t=1 some of you will be in state Ψ_{1}, others in
Ψ_{2}, and a few lucky ones in Ψ_{5}. Seen from above
you are in a combination of states:

Ψ(1)=
P_{1}Ψ_{1}+
P_{2}Ψ_{2}+
P_{3}Ψ_{3}+
P_{4}Ψ_{4}+
P_{5}Ψ_{5}
P_{i} is the probability of being in state Ψ_{i}

To get the state at t=2 or any later time we need transition probabilities P_{ji}
of going from state i to j. If you have two equal dice and throw the other
three dice then the probability of getting four equal is given by the conditional probability P_{42}.

Conditional probabilities:

Going

from

1

2

3

4

5

from

↓

↓

↓

↓

↓

To

12345

12345

12345

12345

12345

12345

→

1

P_{11}

P_{12}

P_{13}

P_{14}

P_{15}

12345

→

2

P_{21}

P_{22}

P_{23}

P_{24}

P_{25}

12345

→

3

P_{31}

P_{32}

P_{33}

P_{34}

P_{35}

12345

→

4

P_{41}

P_{42}

P_{43}

P_{44}

P_{45}

12345

→

5

P_{51}

P_{52}

P_{53}

P_{54}

P_{55}

The transition probabilities P_{ji} of going from i to j form a 5 by 5 matrix that operate
in a linear space where Ψ_{1},Ψ_{2},Ψ_{3},Ψ_{4} and Ψ_{5}
form an orthonormal basis. If this sounds like Greek try linearity in
the navigation bar. The number of equal dice will never decrease so
P_{ji} = 0 if j is less than i. The sum of each column
should be one. If we have state Ψ_{i} with i equal numbers
and throw the rest we will end up in another state Ψ.

Ψ_{i} is transformed into Ψ =
A general state_{ }
will be transformed into

This is a multiplication of the P-matrix with the a-vector.
The transformation Ψ_{a} → P(Ψ_{a})
can be written as a multiplication a → P·a.

The initial state after throwing all five dice is
Ψ(1). This vector shows the initial probability distribution.
After each round the distribution between states will change as
Ψ(n+1) = P∙y(n). After n rounds Ψ(n) = P^{n-1}∙Ψ(1).
A process where the probability distribution changes and the transitions from
one step to the next depend only on the previous state, not earlier
states and the transition is described by transition probabilities
is called a Markov process. Many problems in various fields can be
modelled with a Markov process.

The amplitude of the Ψ_{5}-component is the
probability of having five equal dice. With these hints it should
be possible to calculate the limiting values of the relative
frequencies in the statistical simulation above. If you don’t
reach the following result then at least one of us will have made
an error.