Compute a probability. What is the probability of getting a number between 0.5 and 0.6 when drawing uniformly distributed random numbers from the interval [0, 1)? To answer this question empirically, let a program draw N such random numbers using Python’s standard random module, count how many of them, M, that fall in the interval (0.5, 0.6), and compute the probability as M/N. Run the program with the four values N = 10i for i = 1, 2, 3, 6. Name of program file: compute_prob.py
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here