Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Calculus

Authors: Carla C Morris, Robert M Stark

1st Edition

1119015367, 9781119015369

More Books

Students also viewed these Mathematics questions