Consider the problem of generating samples from (Y sim operatorname{Gamma}(2,10)). (a) Direct simulation: Let (U_{1}, U_{2} sim)

Question:

Consider the problem of generating samples from \(Y \sim \operatorname{Gamma}(2,10)\).

(a) Direct simulation: Let \(U_{1}, U_{2} \sim\) idd \(\mathscr{U}(0,1)\). Show that \(-\ln \left(U_{1}\right) / 10-\ln \left(U_{2}\right) / 10 \sim\) Gamma \((2,10)\). [Hint: derive the distribution of \(-\ln \left(U_{1}\right) / 10\) and use Example C.1.]

(b) Simulation via MCMC: Implement an independence sampler to simulate from the Gamma \((2,10)\) target pdf \[ f(x)=100 x \mathrm{e}^{-10 x}, x \geqslant 0 \]
using proposal transition density \(q(y \mid x)=g(y)\), where \(g(y)\) is the pdf of an \(\operatorname{Exp}(5)\) random variable. Generate \(N=500\) samples, and compare the true cdf with the empirical cdf of the data.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Science And Machine Learning Mathematical And Statistical Methods

ISBN: 9781118710852

1st Edition

Authors: Dirk P. Kroese, Thomas Taimre, Radislav Vaisman, Zdravko Botev

Question Posted: