Some Problems on Dice, their Mathematical Treatments and Simulations

Undergraduate project on solutions and simulations of some events based on throwing of dice.
Authors

Debartha Paul

Ahel Kundu

Published

November 19, 2022

Introduction

This is a project from my undergraduate days in 2022, along with my friend Ahel Kundu. In here, we try to find some answers to some experiments made by throwing one (or more) dice. We made use of statistical properties and mathematics to solve the problems, followed by verifying them using simulation.

Problems

We tried to answer the following problems in our work:

  1. On an average, how many times must a 6-sided die be rolled until a 6 turns up?
  2. On an average, how many times must a 6-sided die be rolled until a 6 turns up twice a row?
  3. On average, how many times must a 6-sided die be rolled until the sequence 65 appears (that is a 6 followed by a 5)?
  4. On average, how many times must a 6-sided die be rolled until there are two rolls in a row that differ by 1(such as a 2 followed by a 1 or 3, or a 6 followed by a 5)? What if we roll until there are two rolls in a row that differ by no more than 1(so we stop at a repeated roll, too)?
  5. We roll 6-sided die n times. What is the probability that all faces have appeared?
  6. We roll a 6-sided die n times. What is the probability that all faces have appeared in order, in some six consecutive rolls (i.e., what is the probability that the sub-sequence 123456 appears among the rolls)?
  7. Person A rolls n dice and person B rolls m dice. What is the probability that they have a common face showing (e.g., person A rolled a 2 and person B also rolled a 2, among all their dice)?
  8. On average, how many times must a pair of 6-sided dice be rolled until all sides appear at least once?
  9. Suppose we can roll a 6-sided die up to n times. At any point we can stop, and that roll becomes our “score”. Our goal is to get the highest possible score, on average. How should we decide when to stop?
  10. Suppose we roll a fair dice 10 times. What is the probability that the sequence of rolls is non-decreasing?

Simulations

All the simulations for each part were done using the R Project for Statistical Computing.

               _                                
platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          2.1                              
year           2022                             
month          06                               
day            23                               
svn rev        82513                            
language       R                                
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname       Funny-Looking Kid

All the codes, along with the full mathematical treatment is available on my GitHub. This article was also published on R-bloggers.