# Probability of getting a Yahtzee...

OK, quick recap of what a Yahtzee is. You roll 5 regular cubic dice, and if all the dice score are the same it is a Yahtzee (e.g. 5 dice each showing 1). That said, you don't have to do it on the first go. You can have up to 3 attempts, and you can roll as many dice you choose. So if you wanted a Yahtzee in 1s you might roll 1,2,1,4,5.. You can keep the two 1s and roll the remaining 3 dice.

So now look at some of the mathematics. Let

p = probability of rolling a specific number on one dice (1/6)

q = the probability of not throwing the specific number (1-p) or (5/6)

I'm using p & q as it is easier than writing 1/6 and 5/6 each time. Additionally, there are some arithmetic simplifications that are easier to deal with using algebra, rather than hard numbers.

Some fundamental probability combinations. I will use these latter. Rolling 5,4,3,2 or 1 dice gives the following binomial permutations

..............0M ......1M.....2M........3M......4M.......5M

(p+q)^{5} = q^{5 }+^{ }5pq^{4} + 10p^{2}q^{3} + 10p^{3}q^{2} + 5p^{4}q+ p^{5} ... rolling all 5 dice^{}

(p+q)^{4 }= q^{4} + 4pq^{3} + 6p^{2}q^{2} + 4p^{3}q+ p^{4} ... rolling 4 dice^{}

(p+q)^{3} = q^{3} + 3pq^{2} + 3p^{2}q+ p^{3} ... rolling 3 dice

(p+q)^{2} = q^{2} + 2pq + q^{2} ... rolling 2 dice

(p+q)^{1} = q + p ... rolling just 1 dice

Note that each row adds to 1 (as p+q=1, and 1^{x} = 1), this fact will be used (lots) later on.

The top row (5M, 4M etc) shows the number of matching dice rolled (so Yahtze is 5M, 4 of the same number is 4M, and so on). Each row corresponds to throwing 5 dice, 4 dice etc. These permutations will be used latter on, and it is assumed that the reader is familiar with the concept of binomial permutations... if not .. sorry no tutorial here

Also below I will use some short hand to denote the way the dice were rolled. So 1M:3M:5M represents 3 attempts, 1^{st} attempt rolled 1 target number, the next attempt the remaining 4 dice were rolled and 3 target numbers (in total) were matched (or two new target numbers), and the last attempt gave a Yahtzee with 5 matching target numbers.

The last thing is that if you roll a target number, it is assumed you hold it, thus the following combination would not occur 4M:3M:5M, if you rolled 4 target numbers you would hold all four, so it would be impossible (stupid) to have less than 4 target numbers after the second roll.

## 1^{st} Attempt

Only 1 permutation to get Yahtzee, roll 5 dice & get it, the probability is

5M is **p**^{5}^{ }

## 2^{nd} Attempt

There a few permutations here, you could roll 4,3,2,1 or 0 matching dice, then throw a Yahtzee from the remaining, the combinations are listed below along with the probabilities.

- 4M:5M is 5p
^{4}q . p - 3M:5M is 10p
^{3}q^{2 }. p^{2 } - 2M:5M is 10p
^{2}q^{3} . p^{3} - 1M:5M is 5pq
^{4 } . p^{4} - 0M:5M is q
^{5} . p^{5}

Adding these up

p^{5} {5q + 10q^{2} + 10q^{3} + 5q^{4} + q^{5}}

The expression within the { } brackets is (1+q)^{5} – 1, so this simplifies further to

** p**^{5} {(1+q)^{5} – 1}

## 3^{rd} Attempt

There are lots of permutations here (as one might expect)

4M:4M:5M is 5p^{4}q . q . p

==> p^{5}{ 5q^{2} } ==>

**p**^{5} { 5q (( 1+q) -1)} (this complication will become apparent as the other terms are calculated)

- 3M:4M:5M is 10p
^{3}q^{2} . 2pq . p - 3M:3M:5M is 10p
^{3}q^{2} . q^{2} . p^{2}

So 3M:3-4M:5M is the sum of the above

==> p^{5}{ 10q^{2} ( 2q + q^{2} ) } == > (note that 2q + q^{2} == (1+q)^{2} -1, hence the above complication!)

**p**^{5} { 10q^{2} ((1+q)^{2} -1) }

- 2M:4M:5M is 10p
^{2}q^{3} . 3p^{2}q . p - 2M:3M:5M is 10p
^{2}q^{3} . 3pq^{2} . p^{2} - 2M:2M:5M is 10p
^{2}q^{3} . q^{3 } . p^{3}

So 2M:2-4M:5M is the sum of the above

==> p^{5}{ 10q^{3}( 3q + 3q^{2} + q^{3} ) } == > (again note 3q+3q^{2}+q^{3}=(1+q)^{3}-1)

**p**^{5} { 10q^{3}((1+q)^{3} -1) }

- 1M:4M:5M is 5pq
^{4} . 4p^{3}q . p - 1M:3M:5M is 5pq
^{4} . 6p^{2}q^{2} . p^{2} - 1M:2M:5M is 5pq
^{4} . 4pq^{3} . p^{3} - 1M:1M:5M is 5pq
^{4} . q^{4} . p^{4}

So 1M:1-4M:5M is the sum of the above

==> p^{5}{ 5q^{4}( 4q + 6q^{2} + 4q^{3} + q^{4}) } == > (you should be getting the idea now..)

**p**^{5} { 5q^{4}((1+q)^{4} -1) }

** **

- 0M:4M:5M is q
^{5 } . 5p^{4}q . p - 0M:3M:5M is q
^{5 } . 10p^{3}q^{2} . p^{2} - 0M:2M:5M is q
^{5 } . 10p^{2}q^{3} . p^{3} - 0M:1M:5M is q
^{5 } . 5pq^{4} . p^{4} - 0M:0M:5M is q
^{5 } . q^{5 } . p^{5 }

So 0M:0-4M:5M is the sum of the above

==> p^{5}{ q^{5}( 5q + 10q^{2} + 10q^{3} + 5q^{4 }+ q^{5}) } == >

**p**^{5} { q^{5}((1+q)^{5} -1) }

The 3^{rd} attempt can now be summed up and reduced (if that is the word!!) to

**p**^{5} { 5q(1+q) + 10q^{2}(1+q)^{2} + 10q^{3}(1+q)^{3} + 5q^{4}(1+q)^{4} + q^{5}(1+q)^{5} – [(1+q)^{5 }-1]}

## Adding it All Up

Adding together the 3 terms for 1^{st} attempt, 2^{nd} attempt and 3^{rd} attempt

- 5M is p
^{5 } - 1-4M:5M
** **is** **p^{5} {(1+q)^{5} – 1} - 1-4M:1-4M:5M is p
^{5} { 5q(1+q) + 10q^{2}(1+q)^{2} + 10q^{3}(1+q)^{3} + 5q^{4}(1+q)^{4} + q^{5}(1+q)^{5} – [(1+q)^{5 }-1]}

This simplifies as the bit in [...] cancels with 2^{nd} attempt expression, to

p^{5} { 1 + 5q(1+q) + 10q^{2}(1+q)^{2} + 10q^{3}(1+q)^{3} + 5q^{4}(1+q)^{4} + q^{5}(1+q)^{5}}

Replacing q(1+q) with x gives

p^{5} {1 + 5x + 10x^{2} + 10x^{3} + 5x^{4} + x^{5}}

The bit in the { } is a simple expansion of (1+x)^{5} becomes

p^{5} (1 + x)^{5}

Now as the above is a very simple expression (considering where we started), and back substituting x=q(1+q) gives the final result

Of probability of getting a specific Yahtzee in 3 attempts is

**p**^{5} [1+q(1+q)]^{5}

Putting in some numbers the result is 91^{5}/6^{15} or 0.01327. So to get any Yahtzee is 6 times this or

91^{5}/6^{14}, or 0.0796, or just under 8%. This is much larger than I had originally thought.

As each game has 13 sets, then one would expect to see 0.66 Yahtzees per game.

Max Score YahtzeeThe maximum score yopu can get in Yahtzee is 1575, and means not only you get 13 Yahtzees in a row, but you some are specific Yhatzees. Doing some more maths the first two yahtzees can be any type of yahtzee, then you have 8 specific Yahtzees and 3 any old yahtzees, this. So denoting p(ay) for any Yahtzee, and p(y) as a specific Yahtzee

p(ay).p(ay).[any order of 8 p(y), 3 p(ay)]

The way to arrange 11 things with 8 and 3 is 11*10*9/3*2 ==> 165

also p(ay) = 3.47*p(y) (see next blog, Double Maths (again!) )

so

(3.47)^{2} p(y)^{2} . 165 . p(y)^{8} . (3.47)^{3}p(y)^{3}

or

p(y)^{13}.(3.47)^{5}. 165

as above p(y) = 0.01327, doing some maths, if my computer can run 130 games per second, to have a relatively good chance of getting this I need to run the simulation for 7.4 billion years!