Question: Exercise 7. (PROGRAMMING EXERCISE, 10 POINTS) Consider a discrete PMF px(k)=[0.3 0.1 0.15 0.25 0.1 0.08 0.02]. Write a Python function that takes this PMF

Exercise 7. (PROGRAMMING EXERCISE, 10 POINTS) Consider a discrete PMF px(k)=[0.3 0.1 0.15 0.25 0.1 0.08 0.02]. Write a Python function that takes this PMF and generates N 100,000 realizations of X. Your function can only use the uniform random number generator numpy.random.rand and no other random number generators. Submit your code and the empirical histogram of X Exercise 7. (PROGRAMMING EXERCISE, 10 POINTS) Consider a discrete PMF px(k)=[0.3 0.1 0.15 0.25 0.1 0.08 0.02]. Write a Python function that takes this PMF and generates N 100,000 realizations of X. Your function can only use the uniform random number generator numpy.random.rand and no other random number generators. Submit your code and the empirical histogram of X
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
