Chapter 11: Problem 8
Consider the technique of simulating a gamma \((n, \lambda)\) random variable by using the rejection method with \(g\) being an exponential density with rate \(\lambda / n\). (a) Show that the average number of iterations of the algorithm needed to generate a gamma is \(n^{n} e^{1-n} /(n-1) !\) (b) Use Stirling's approximation to show that for large \(n\) the answer to part (a) is approximately equal to \(e[(n-1) /(2 \pi)]^{1 / 2}\) (c) Show that the procedure is equivalent to the following: Step 1: Generate \(Y_{1}\) and \(Y_{2}\), independent exponentials with rate \(1 .\) Step 2: If \(Y_{1}<(n-1)\left[Y_{2}-\log \left(Y_{2}\right)-1\right]\), return to step 1 . Step 3: \(\quad\) Set \(X=n Y_{2} / \lambda\) (d) Explain how to obtain an independent exponential along with a gamma from the preceding algorithm.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.