Cody

Problem 44951. Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,...N. For example, the expected value of a 6-sided die is 3.5.

Given N, simulate 1e8 N-sided dice rolls by creating a vector of 1e8 uniformly distributed random integers. Return the difference between the mean of this vector and the mean of integers from 1 to N.

Solution Stats

29.19% Correct | 70.81% Incorrect
Last solution submitted on Oct 23, 2019

Problem Comments

Problem Recent Solvers49

Suggested Problems

More from this Author7

Problem Tags