You cannot simulate 10000 values of U, where U ∼ Unif[0, 1].
The only thing you can do is simulate 10000 values of Y where Y ∼ f(y|θ) and f(y|θ) = 1/θ * e-y/θ .
Is there any way you can simulate 10000 observations of X, where X is the number of heads in 3 flips of a coin where P(H) = .7 using only the simulated values of Y you have?
The following images contain the complete solution and the algorithm to generate the final simulations:
Get Answers For Free
Most questions answered within 1 hours.