A certain computer contains a random number generator that generates random numbers with uniform relative frequencies (or

Question:

A certain computer contains a random number generator that generates random numbers with uniform relative frequencies (or probability density) on the interval \((0,1)\). Suppose, however, that it is desired to simulate trials of a random variable \(Z\) with density function \(p_{Z}(z)\) that is not uniform.

(a) If the values generated by the computer are represented by \(u\) with

\[ p_{U}(u)= \begin{cases}1 & 0

show that by means of a monotonic transformation \(z=g(u)\), it is possible to obtain the desired \(p_{Z}(z)\) and that if \(u=G(z)\) represents the inverse of \(g(\cdot)\), then \(G\) should be chosen to satisfy the integral

\[ G(z)= \pm \int_{g(0)}^{z} p_{Z}(\xi) d \xi= \pm\left[F_{Z}(z)-F_{Z}(g(0))\right] \]

where \(F_{Z}(z)\) is the probability distribution function of \(Z\).

(b) Show that to generate a random variable with probability density

\[ p_{Z}(z)= \begin{cases}e^{-z} & 0 \leq z<\infty \\ 0 & \text { otherwise }\end{cases} \]

either of the following transformations could be used:

\[ \begin{aligned} & z=-\ln u \\ & z=-\ln (1-u) \end{aligned} \]

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: