# 5.8  Pseudorandom Variates

In this section, we consider how to construct pseudorandom variates x[k] from pseudorandom numbers u[k]. We also consider how to construct joint-normal pseudorandom vectors x[k] from Un((0,1)n) pseudorandom vectors u[k]. We then consider how to use these with a crude Monte Carlo estimator.

Consider a random vector X with some specified distribution. Conceptually, we may construct pseudorandom vectors x[k] from pseudorandom vectors u[k] ~ Un((0,1)n) by selecting a function g: n → n that is probability preserving in the sense that X ~ g(U) for U ~ Un((0,1)n). We then set

[5.43]

###### 5.8.1 Inverse transform method

Suppose X has CDF Φ with inverse Φ–1. Then Φ–1 is probability preserving in the foregoing sense. We set g = Φ–1 and generate pseudorandom variates from pseudorandom numbers using [5.43]. This is called the inverse transform method of pseudorandom variate generation.

An N(0,1) pseudorandom variate x[k] can be obtained from a pseudorandom number u[k]  with this method. We apply the inverse standard normal CDF Φ–1 to a pseudorandom number u[k] to obtain x[k]. The transformation is illustrated in Exhibit 5.12 with evenly spaced values used as a proxy for pseudorandom numbers.

Exhibit 5.12: The inverse CDF of the standard normal distribution maps U(0,1) pseudorandom numbers into N(0,1) pseudorandom variates. Note how evenly spaced points are mapped into points that cluster around 0 and trail off in either direction.

By [3.95], an N(μ,σ2) pseudorandom variate y[k] can be obtained from an N(0,1) pseudorandom variate x[k] by setting

[5.44]

By definition, a random variable Y is lognormal if log(Y) is normal. Correspondingly, if X is normal, eX is lognormal. To generate a Λ(μ,σ2) pseudorandom variate y[k], we apply [3.105] and [3.106] to determine the mean m and standard deviation s of the corresponding N(m,s2) distribution. We generate an N(m,s2) pseudorandom variate x[k] and set y[k] = .

These techniques for constructing normal and lognormal variates are widely used. Because they require the evaluation of the inverse CDF of the standard normal distribution for each pseudorandom variate generated, they are computationally expensive. If a large number of pseudorandom variates are required, it is worth exploring computationally more efficient algorithms. See Fishman (1996).

###### 5.8.2 Joint-normal pseudorandom vectors

An Nn(0, I  ) pseudorandom vector x[k] can be obtained by generating n N(0,1) pseudorandom variates x[i], and setting each component  equal to one of them:

[5.45]

By [3.125], we can construct an Nn(μ,Σ) pseudorandom vector y[k] from an Nn(0, I  ) pseudorandom vector x[k] by setting

[5.46]

where k is the Cholesky matrix of Σ.

###### Exercises
5.5

Use pseudorandom number u[1] = .983467 to generate an N(1,4) pseudorandom variate x[1].

5.6

Use pseudorandom number u[1] = .762415 to generate a Λ(1,9) pseudorandom variate y[1].

5.7

Use U3((0,1)3) pseudorandom vector

[5.47]

to generate an N3(μ,Σ) pseudorandom vector, where

[5.48]