Question: 2. (9 marks) Gamma random variables can be used to simulate chi-square, t, F, beta, and Dirichlet distributions, as well as being useful in their

 2. (9 marks) Gamma random variables can be used to simulate

2. (9 marks) Gamma random variables can be used to simulate chi-square, t, F, beta, and Dirichlet distributions, as well as being useful in their own right. Hence it is important to be able to generate gamma r.v.s as efficiently as possible. In this assignment we investigate a popular algorithm due to Marsaglia and Tsang, for o 2 1. (1) If X ~ Gamma(a, 1) then X/> ~ Gamma(a, 1). Note that Gamma(a, 3) has the pdf Box f(x) = T(a) 2-1exp (-Bx) . (2) Assume that h(x) is strictly increasing and maps the range of a onto [0, co). If X has density h(x)-le-h(@h'(x)/T(a) then Y = h(X) ~ Gamma(a, 1). (3) Given a 2 1 put d = 0 - 1/3 and c = 1/v9d and then define h : [-1/c, co) - [0, 20) by h(x) = d(1 + cr)3. Then, h(x)-le "(@)h'(x) x exp(g(x)) where g(x) = dlog((1 + cx)3) - d(1 + cx)3 + d and exp(g(x)) g g plot (qgamma (1 : 1000/1001, 1.2, 3), sort(g)) > abline (0, 1, col="red") 2

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!