Question: #You do not need to write a complete program, all you need is to complete this code using (python/probability). Calculate the probability of rolling a

#You do not need to write a complete program, all you need is to complete this code using (python/probability).

#You do not need to write a complete program, all you need

Calculate the probability of rolling a sum equal to 30 if you roll 10 dice Note: You should not generate a huge container for the sample space as you did before, you should write a simulation. Answer: (penalty regime: 0 %) Reset answer i import random as rnd 2 3. def drawSample(): 4 # return true if sample belongs to event space, false otherwise 5 # this must be implemented by you 6 return True 7 8 numRuns = # decided by you 9 numHits = 0 10 for i in range(numRuns): 11 12 # generate random sample from sample space 13 # this must be generated by if(drawSample()): 15 numHits += 1 16 17 myAnswer = 14

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!