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...


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.

Nov 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here