Simulating dice rolls


Given two standard dice (each spanning from 1-6) the expected value of any given roll is 7. This means, if we toss the dice a large number of times, the mean value of a roll should converge towards 7. Write a simulation that will roll the dice 500 times and plot the mean of all prior rolls along the way.


Access restricted

Subscribe to premium account to see the solution.

Get premium now