Chapter 10
A First Course in Probability · 17 exercises
Problem 1
The random variable \(X\) has probability density function
$$
f(x)=C e^{x} \quad 0
2 step solution
Problem 1
The following algorithm will generate a random permutation of the elements \(1,2, \ldots, n\). It is somewhat faster than the one presented in Example 1 but is such that no position is fixed until the algorithm ends. In this algorithm, \(P(i)\) can be interpreted as the element in position \(i\). Step 1. Set \(k=1\). Step 2. 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 setthat \(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, t_{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} \\ &\quad=\frac{1}{k !} \quad \text { by the induction hypothesis } \end{aligned} $$
4 step solution
Problem 2
Give an approach for simulating a random variable having probability density
function
$$
f(x)=30\left(x^{2}-2 x^{3}+x^{4}\right) \quad 0
4 step solution
Problem 2
Develop a techniquèfor simulating a random variable having density function
$$
f(x)= \begin{cases}e^{2 x} & -\infty
6 step solution
Problem 3
Give an efficient algorithm to simulate the value of a random variable with probability mass function $$ p_{1}=.15 \quad p_{2}=.2 \quad p_{3}=.35 \quad p_{4}=.30 $$
3 step solution
Problem 3
Give a technique for simulating a random variable having the probability
density function
$$
f(x)= \begin{cases}\frac{1}{2}(x-2) & 2 \leq x \leq 3 \\\
\frac{1}{2}\left(2-\frac{x}{3}\right) & 3
5 step solution
Problem 5
Let \(X\) and \(Y\) be independent standard normal random variables. (a) Explain how we could use simulation to estimate \(E\left[e^{X Y}\right]\). (b) Show how to improve the estimation approach in part (a) by using a control variate. (c) Show how to improve the estimation approach in part (a) by using antithetical variables.
3 step solution
Problem 5
Use the inverse transformation method to present an approach for generating a random variable from the Weibull distribution $$ F(t)=1-e^{-a t^{\beta}} \quad t \geq 0 $$
3 step solution
Problem 6
Give a method for simulating a random variable having failure rate function (a) \(\lambda(t)=c ;\) (b) \(\lambda(t)=c t_{3}\) (c) \(\lambda(t)=c t^{2}\) (d) \(\lambda(t)=c t^{3}\).
4 step solution
Problem 7
In the following, \(F\) is the distribution function
$$
F(x)=x^{n} \quad 0
3 step solution
Problem 8
Suppose it is relatively easy to simulate from \(F_{i}\) for each \(i=1, \ldots, n\). How can we simulate from (a) \(F(x)=\prod_{i=1}^{n} F_{i}(x)\) (b) \(F(x)=1-\prod_{i=1}^{n}\left[1-F_{i}(x)\right]\).
2 step solution
Problem 9
Suppose we have a method to simulate random variables from the distributions \(F_{1}\) and \(F_{2}\). Explain how to simulate from the distribution $$ F(x)=p F_{1}(x)+(1-p) F_{2}(x) \quad 0
1\end{cases} $$
7 step solution
Problem 10
In Example 2c we simulated the absolute value of a unit normal by using the rejection procedure on exponential random variables with rate 1 . This raises the question of whether we could obtain a more efficient algorithm by using a different exponential density-that is, we could use the density \(g(x)=\lambda e^{-\lambda x}\). Show that the mean number of iterations needed in the rejection. scheme is minimized when \(\lambda=1\).
3 step solution
Problem 11
Use the rejection method with \(g(x)=1,0
2 step solution
Problem 12
Explain how you could use random numbers to approximate \(\int_{0}^{1} k(x) d x\) where \(k(x)\) is an arbitrary function, HINT: If \(U\) is uniform on \((0.1)\), what is \(E[k(U) 1 ?\)
6 step solution
Problem 13
Let \((X, Y)\) be uniformly distributed in the circle of radius 1 centered at the origin. Its joint density is thus $$ f(x, y)=\frac{1}{\pi} \quad 0 \leq x^{2}+y^{2} \leq 1 $$ Let \(R=\left(X^{2}+Y^{2}\right)^{1 / 2}\) and \(\theta=\tan ^{-1}(Y / X)\) denote its polar coordinates. Show that \(R\) and \(\theta\) are independent with \(R^{2}\) being uniform on \((0,1)\) and \(\theta\) being uniform on \((0,2 \pi)\).
6 step solution
Problem 16
Let \(X\) be a random variable on \((0,1)\) whose density is \(f(x)\). Show that we can estimate \(\int_{0}^{1} g(x) d x\) by simulating \(X\) and then taking \(g(X) / f(X)\) as our estimate. This method, called importance sampling, tries to choose \(f\) similar in shape to \(g\) so that \(g(X) / f(X)\) has a small variance.
3 step solution