Question: stuck with last homework problem! Problem 5: Write a function to generate random variables from the Beta(a, ,6) distribution using the acceptancerejection method. You may
stuck with last homework problem!

Problem 5: Write a function to generate random variables from the Beta(a, ,6) distribution using the acceptancerejection method. You may use Unif(0, 1) as the envelop distribution. You mayseta=3and6=2. (a) Calculate M before coding. (b) Generate a random sample of size 100,000 from Uniform(0, 1), and plot the histogram for accepted data points. (c) Compute the empirical acceptance rate, and compare it with l/M
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
