Dice simulation. The following code computes the exact probability distribution for the sum of two dice:
The value probabilities[k] is the probability that the dice sum to k. Run experiments that validate this calculation by simulating n dice throws, keeping track of the frequencies of occurrence of each value when you compute the sum of two uniformly random integers between 1 and 6. How large does n have to be before your empirical results match the exact results to three decimal places?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here