Question: 5.15 Starting with a U(0, 1) random variable, the transformations of Problem 5.14 will not get us normal random variables, or gamma random variables with
5.15 Starting with a U(0, 1) random variable, the transformations of Problem 5.14 will not get us normal random variables, or gamma random variables with noninteger shape parameters. One way of doing this is to use the Accept-Reject Algorithm (Ripley 1987, Section 3.2), an algorithm for simulating X ∼ f (x):
(i) Generate Y ∼ g(y), U ∼ U(0, 1), independent.
(ii) Calculate ρ(Y ) = 1 M f (Y )
g(Y ) where M = supt f (t)/g(t).
(iii) If U<ρ(Y ), set X = Y , otherwise return to i).
(a) Show that the algorithm will generate X ∼ f (x).
(b) Starting with Y ∼ exp(1), show how to generate X ∼ N(0, 1).
(c) Show how to generate a gamma random variable with a noninteger shape parameter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
