Assignment 4
Due Monday 9th December 2024 at noon in Gradescope
The Exponential distribution has probability density function (pdf):
\[ \tilde{f}(y \,|\, \lambda) = \begin{cases} \lambda e^{-\lambda y} & \mbox{if } y \in [0,\infty) \\ 0 & \mbox{otherwise} \end{cases} \]
where \(\lambda > 0\).
Simulate three values (pen-and-paper, not R) from this pdf via inverse transform sampling using the following values simulated from the Uniform\((0,1)\) distribution:
\[ 0.56, \ \ 0.85, \ \ 0.26 \]
Let the random variable \(X\) have pdf:
\[ f(x \,|\, \mu) = \begin{cases} \mu^2 x e^{-\mu x} & \mbox{if } x \in [0,\infty) \\ 0 & \mbox{otherwise} \end{cases} \]
where \(\mu > 0\).
Show that the Exponential distribution can be used as a proposal distribution in a rejection sampler to generate simulations of \(X\). Ensure you state any conditions on \(\lambda\) and \(\mu\).
For any choice of \(\mu\), what is the optimal \(\lambda\) to choose as the parameter in the proposal distribution?
Show that when the optimal \(\lambda\) is used the expected number of iterations required to produce a single simulation of \(X\) is approximately 1.47 for all \(\mu.\)
🏁🏁 Done, end of assignment! 🏁🏁