Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (30 points) Suppose that X and Y have joint p.m.f. (a) Generate n=104 random variables Y1,,Yn using a rejection sampling. You can use a

image text in transcribed

2. (30 points) Suppose that X and Y have joint p.m.f. (a) Generate n=104 random variables Y1,,Yn using a rejection sampling. You can use a Bernoulli distribution with parameter 1/2 as a candidate (proposal) distribution. Provide the (empirical) marginal p.m.f. of Y based on your random numbers and compare it with the (exact) marginal p.m.f. of Y. (b) Generate n=104 pairs of random variables {(Xi,Yi)}i=1n using a method of composition with P(X=xY=y) and P(Y=y). Provide your estimates of P(X=x),x=0,1,2 (the empirical marginal p.m.f. of X based on your random numbers) and compare them with the exact values of P(X=x) (the exact marginal p.m.f. of X ). (c) Generate n=104 pairs of random variables {(Xi,Yi)}i=1n using a Gibbs sampler. Provide your estimates of P(X=x,Y=y),P(X=x), and P(Y=y),x=0,1,2 and y=0,1 and compare them with the exact values. 2. (30 points) Suppose that X and Y have joint p.m.f. (a) Generate n=104 random variables Y1,,Yn using a rejection sampling. You can use a Bernoulli distribution with parameter 1/2 as a candidate (proposal) distribution. Provide the (empirical) marginal p.m.f. of Y based on your random numbers and compare it with the (exact) marginal p.m.f. of Y. (b) Generate n=104 pairs of random variables {(Xi,Yi)}i=1n using a method of composition with P(X=xY=y) and P(Y=y). Provide your estimates of P(X=x),x=0,1,2 (the empirical marginal p.m.f. of X based on your random numbers) and compare them with the exact values of P(X=x) (the exact marginal p.m.f. of X ). (c) Generate n=104 pairs of random variables {(Xi,Yi)}i=1n using a Gibbs sampler. Provide your estimates of P(X=x,Y=y),P(X=x), and P(Y=y),x=0,1,2 and y=0,1 and compare them with the exact values

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

Company Audit In A Budget Internal Audit For Financial Managers

Authors: Pramod Kesav N

1st Edition

B09QXF42M2

More Books

Students also viewed these Accounting questions

Question

What were your most important educational experiences?

Answered: 1 week ago

Question

Which personal relationships influenced you the most?

Answered: 1 week ago