I got a question on Facebook about probability when rolling dice. It was my friend son who had this in his home task.
The case was as follow:
Use two dice
What is the probability to get to equal values?
Second, what is the probability that the the dies is equal and that both are 1.
To test if the calculation was correct, I made a simulation in JavaScript.
To get statistically significant data I found that I had to run 2000 tosses.
To be able to follow the progress I am using the 'setInterval()' set to run every 20 milliseconds.
It confirmed the theory.