O'Reilly logo

Stochastic Simulation by Brian D. Ripley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3

Random Variables

The ∝ scope of this chapter is the generation of independent random variables X1 X2, ...with a given distribution function F or probability density function (pdf) f. We assume that we have access to a supply (Ui) of random numbers, independent samples from the uniform distribution on (0, 1). Our task is to transform (Ui) into (Xi). In most cases we will have the choice of several algorithms for doing so. Usually there will be no universal best choice; different methods might be recommended for once-off use and for adding to a computer center’s mathematical library.

When choosing algorithms we will consider the following points.

(a)   The method should be easy to understand and to program. It is all too easy to make mistakes while implementing sophisticated methods.

(b)   The programs produced should be compact. This may only be important on small machines but can considerably reduce overheads in interpreted languages.

(c)   The final code should execute reasonably rapidly. This point has been emphasized in the literature almost to the exclusion of the other two. Andrews (1976) cites a study in which generating the random variables cost 0.2% of the total computer usage of a simulation study. It is rarely important to save generation costs.

(d)   The algorithms will be used with pseudo-random numbers and should not accentuate their deficiencies.

Experience has shown that the relative speeds of different algorithms vary surprisingly little across different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required