rng_330_1 - Random Number Generation 1 Introduction Anyone...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Random Number Generation 1 Introduction Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin. This famous statement concerning the use of sequences of numbers generated using recursive formulas as random sequences is attributed to John von Neumann (1951). To generate a random number u from the Uniform (0,1) distribution, one must randomly select an integer x (0 , m ) and set u = x m . Machine-generated sequences of real numbers depend on recursions of the form: x j = f ( x j- 1 , x j- 2 , . . . , x j- k ) , or more expeditiously, x j = f ( x j- 1 ) . Such sequences are obviously deterministic . We want to be able to generate sequences whose properties closely resemble those of random sequences in important ways. In addition, since such sequences are also necessarily periodic , we want such generators to have long periods, as well. 2 Linear Congruential Generators Linear Congruential Generators are defined by the recursion x i +1 ( a x i + c ) mod m where x , x 1 , . . . is a sequence of integers and depends upon x : a seed a : a multiplier c : a shift m : a modulus all of which are also integers defines an equivalence relation. Two numbers a and b are said to be congruent modulo m or a b mod m where m is an integer, if their difference is exactly divisible by m . If 0 a < m and a b mod m , then a is said to be a residue of b modulo m . a can be easily calculated using a = b b/m m , where the floor function x computes the greatest integer less than x . The pseudo-random sequence { u i } is obtained by setting u i = x i /m for i = 1, 2, . . . . If c = 0, the above defines a multiplicative congruential generator (MCG). Some theoretical discussions on MCGs are given in Ripley(1987), Gentle(1998, 2003) and Fishman(2006). A typical choice for m on binary computers is 2 k where k is the typical machine length 1 for integer type storage. In early generators this was thought to be a good choice because then the modulo reduction can be achieved simply via standard fixed-point overflow in the integer multiplication operation ( a x i ). Recall that if fixed-point overflow is not trapped, the result of an integer arithmetic multiplication is modulo reduced by 2...
View Full Document

This note was uploaded on 02/01/2012 for the course STAT 330B taught by Professor Zhou during the Spring '11 term at Iowa State.

Page1 / 4

rng_330_1 - Random Number Generation 1 Introduction Anyone...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online