Chapter 11: Problem 3
Give a method for simulating a hypergeometric random variable.
Chapter 11: Problem 3
Give a method for simulating a hypergeometric random variable.
All the tools & learning materials you need for study success - in one app.
Get started for freeSuppose we are able to simulate independent random variables \(X\) and \(Y .\) If
we simulate \(2 k\) independent random variables \(X_{1}, \ldots, X_{k}\) and
\(Y_{1}, \ldots, Y_{k}\), where the \(X_{i}\) have the same distribution as does
\(X\), and the \(Y_{j}\) have the same distribution as does \(Y\), how would you use
them to estimate \(P(X
Consider the following algorithm for generating a random permutation of the elements \(1,2, \ldots, n .\) In this algorithm, \(P(i)\) can be interpreted as the element in position \(i\) Step 1: \(\quad\) Set \(k=1\). Step 2: \(\quad\) Set \(P(1)=1\). Step 3: If \(k=n\), stop. Otherwise, let \(k=k+1\). Step 4: Generate a random number \(U\), and let $$ \begin{aligned} P(k) &=P([k U]+1), \\ P([k U]+1) &=k . \end{aligned} $$ Go to step 3 . (a) Explain in words what the algorithm is doing. (b) Show that at iteration \(k\) -that is, when the value of \(P(k)\) is initially set-that \(P(1), P(2), \ldots, P(k)\) is a random permutation of \(1,2, \ldots, k\). Hint: Use induction and argue that $$ \begin{aligned} &P_{k}\left\\{i_{1}, i_{2}, \ldots, i_{j-1}, k, i_{j}, \ldots, i_{k-2}, i\right\\} \\ &\quad=P_{k-1}\left\\{i_{1}, i_{2}, \ldots, i_{j-1}, i, i_{j}, \ldots, i_{k-2}\right\\} \frac{1}{k} \end{aligned} $$ \(=\frac{1}{k !}\) by the induction hypothesis The preceding algorithm can be used even if \(n\) is not initially known.
Verify that if we use the hazard rate approach to simulate the event times of a nonhomogeneous Poisson process whose intensity function \(\lambda(t)\) is such that \(\lambda(t) \leqslant \lambda\), then we end up with the approach given in method 1 of Section \(11.5\).
If \(U_{1}, U_{2}, U_{3}\) are independent uniform \((0,1)\) random variables, find \(P\left(\prod_{i=1}^{3} U_{i}>0.1\right)\) Hint: Relate the desired probability to one about a Poisson process.
The Discrete Hazard Rate Method: Let \(X\) denote a nonnegative integer valued random variable. The function \(\lambda(n)=P\\{X=n \mid X \geqslant n\\}, n \geqslant 0\), is called the discrete hazard rate function. (a) Show that \(P\\{X=n\\}=\lambda(n) \prod_{i=0}^{n-1}(1-\lambda(i))\) (b) Show that we can simulate \(X\) by generating random numbers \(U_{1}, U_{2}, \ldots\) stopping at $$ X=\min \left\\{n: U_{n} \leqslant \lambda(n)\right\\} $$ (c) Apply this method to simulating a geometric random variable. Explain, intuitively, why it works. (d) Suppose that \(\lambda(n) \leqslant p<1\) for all \(n\). Consider the following algorithm for simulating \(X\) and explain why it works: Simulate \(X_{i}, U_{i}, i \geqslant 1\) where \(X_{i}\) is geometric with mean \(1 / p\) and \(U_{i}\) is a random number. Set \(S_{k}=X_{1}+\cdots+X_{k}\) and let $$ X=\min \left\\{S_{k}: U_{k} \leqslant \lambda\left(S_{k}\right) / p\right\\} $$
What do you think about this solution?
We value your feedback to improve our textbook solutions.