Question: Using the accept-reject algorithm, generate observations from the binomial distribution as target distribution and the uniform distribution as proposal distribution. Reverse the roles and carry

Using the accept-reject algorithm, generate observations from the binomial distribution as target distribution and the uniform distribution as proposal distribution. Reverse the roles and carry out the simulation and note the differences, if any.


Data is  accept-reject algorithm

Simulation from an Arbitrary Distribution using Accept-Reject Algorithm. Suppose that X is a discrete RV which assumes values 1 to 10 with respective probabilities 0.05, 0.17, 0.02, 0.14, 0.11, 0.06, 0.05, 0.04, 0.17, and 0.19. Naturally, simulation from a discrete uniform distribution with N = 10 can serve here as the proposal density. It is immediately clear in this problem that c = 0.19∕0.1 = 1.9. Thus, an accept-reject sampling technique here first requires us to generate a random number between 1 and 10, say i. Next, a number in the unit interval is generated and if this number is less than pi∕(0.1 × 1.2), i will be selected as a random observation for X. A small program is given next, which implements the accept-reject technique for the problem in hand.

> p_prob q_prob

> p_prob q_prob

Step by Step Solution

3.34 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution The observation from above entails that the accep... View full answer

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 A Course In Statistics With R Questions!