Question: Python please P1: Exercise 8.14. Probabilities of throwing two dice Make a computer program for throwing two dice a large number of times. Record the

Python please

Python please P1: Exercise 8.14. Probabilities of throwing two dice Make a

P1: Exercise 8.14. Probabilities of throwing two dice Make a computer program for throwing two dice a large number of times. Record the sum of the eves 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 programi file: freq_2dice.py. Hint: use numpy's random module rand

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!