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:
- On an average, how many times must a 6-sided die be rolled until a 6 turns up?
- On an average, how many times must a 6-sided die be rolled until a 6 turns up twice a row?
- 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)?
- 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)?
- We roll 6-sided die n times. What is the probability that all faces have appeared?
- 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)?
- 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)?
- On average, how many times must a pair of 6-sided dice be rolled until all sides appear at least once?
- 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?
- 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.
_ -w64-mingw32
platform x86_64
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status 4
major 2.1
minor 2022
year 06
month 23
day 82513
svn rev
language R 4.2.1 (2022-06-23 ucrt)
version.string R version -Looking Kid nickname Funny
All the codes, along with the full mathematical treatment is available on my GitHub. This article was also published on R-bloggers.