You start with a fair 6-sided die and roll it six times, recording the results of each roll. You then write these numbers on the six faces of another, unlabeled fair die. For example, if your six rolls were 3, 5, 3, 6, 1 and 2, then your second die wouldn’t have a 4 on it; instead, it would have two 3s.
Next, you roll this second die six times. You take those six numbers and write them on the faces of yet another fair die, and you continue this process of generating a new die from the previous one.
Eventually, you’ll have a die with the same number on all six faces. What is the average number of rolls it will take to reach this state?
Extra credit: Instead of a standard 6-sided die, suppose you have an N-sided die, whose sides are numbered from 1 to N. What is the average number of rolls it would take until all N sides show the same number?
Functions to build the simulation
There are two functions that I will use to accomplish the required tasks. First, we need to build the new die from the old die
Then we will play the die game for a generic N sided die:
Results for N=6
Let’s play the game 10000 times and find an average!
The average number of rolls to end the game for a 6-sided die is: 9.611 ± 0.058.
Results for more N values
Let’s check out some trends for different numbers of die sides to explore the trend. I will begin by doing a power law regression to see if the relationship is indeed linear.
It looks like the relationship between the average number of rolls and the number of sides on the die is linear. (Note that the slope of the previous regression is: 1.0892) Performing a linear regression, we see that there is a small offset.