Probabilities of throwing two dice. Make a computer program for throwing two dice a large number of times. Record the sum of the eyes each time and count how many times each of the possibilities for the sum (2, 3, . . ., 12) appear. A dictionary with the sum as key and count as value is convenient here. Divide the counts by the total number of trials such that you get the frequency of each possible sum. Write out the frequencies and compare them with exact probabilities. (To find the exact probabilities, set up all the 6×6 possible outcomes of throwing two dice, and then count how many of them that has a sum s for s = 2, 3, . . . , 12.) Name of program file: freq_2dice.py.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here