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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa512d76596_81266fa512cceff6.jpg)
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
Get step-by-step solutions from verified subject matter experts
