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,

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} \]

Step by Step Solution

3.34 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Statistical Optics Questions!