Simulating and visualizing rolls of a die

Question

Given a standard die spanning from 1-6 the expected value of any given dice roll is 3.5. Therefore, if we toss a die a large # of times, the mean value should converge towards 3.5. Write a quick simulation rolling the die 1000 times and plotting the mean of all prior rolls along the way.

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now