Question: 140 marks, 25 marks for Grads] This Assignment requires you to write a Python script file called sol2.py. 2.1. [10 marks, 5 marks for Grads]

 140 marks, 25 marks for Grads] This Assignment requires you to

140 marks, 25 marks for Grads] This Assignment requires you to write a Python script file called sol2.py. 2.1. [10 marks, 5 marks for Grads] Write a program that rolls two dice (randomly selects a number 2. between 1 and 6 inclusive for each die). Repeat rolling dice 20 times. For each trial, you should add the two numbers that appear on each die and save it in a vector. Plot a histogram of the values you have gathered in the vector. Based on this histogram, what are the estimates for the probabilities of each number? 2.2. [10 marks, 5 marks for Grads] Run your code for 1000 times. What is your estimation now? 2.3. [20 marks, 10 marks for Grads] Change your program and assume that you have one fake die and one correct die. The fake die has 0 instead of 2. This means when you roll this defect die, a random number should be chosen among (1,0,3,4,5, and 6). Plot histogram of the values you have gathered in the vector Calculate the probability of getting a 7 as the sum of the numbers appeared on the dice. What is the probability of getting 3

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!