Question: Beta random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.html Triangular random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.triang.html In[ In[ In[ Problem 2 In this exercise, we will proceed in steps to perform rejection sampling

Beta random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.html

Triangular random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.triang.html

Beta random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.htmlTriangular random variable: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.triang.html In[ In[ In[ Problem 2

In[ In[ In[ Problem 2 In this exercise, we will proceed in steps to perform rejection sampling of a beta random variable using a triangular random variable as candidate. 2.1 Plot an overlay of a beta PDF and a triangular PDF with the following parameters: . For the beta PDF, a=2, b=2, Ioc=0, scale=1. . For the triangular PDF, c=0.50, |oc=0, scale=1. 2.2 We will perform 10,000 trials of the rejection sampling procedure. Simulate and store 10,000 random variables distributed as Uniform[0, 1] using random state 436. Simulate and store 10,000 triangular random variables from the specified triangular distribution using random state 636. 2.3 Let f be the beta PDF and g the triangular PDF. Using 1.50 as an estimate of sup f/g, generate samples from the beta distribution by rejection sampling. Store your samples. Print the number of samples you obtain. 2.4 Plot a density histogram of your samples overlaid with the beta and triangular PDFs. Use 100 bins

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 Mathematics Questions!