The Monty Python method for generating random variables

Citation
G. Marsaglia et Ww. Tsang, The Monty Python method for generating random variables, ACM T MATH, 24(3), 1998, pp. 341-350
Citations number
6
Language
INGLESE
art.tipo
Article
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE
ISSN journal
0098-3500 → ACNP
Volume
24
Issue
3
Year of publication
1998
Pages
341 - 350
Database
ISI
SICI code
0098-3500(199809)24:3<341:TMPMFG>2.0.ZU;2-M
Abstract
We suggest an interesting and fast method for generating normal, exponentia l, t, von Mises, and certain other important random variables used in Monte Carlo studies. The right half of a symmetric density is cut into pieces, t hen, using simple area-preserving transformations, reassembled into a recta ngle from which the x-coordinate-or a linear function of the x-coordinate-o f a random point provides the required variate. To illustrate the speed and simplicity of the Monty Python method, we provide a small C program, self- contained, for rapid generation of normal (Gaussian) variables. It is self- contained in the sense that required uniform variates are generated in-line , as pairs of 16-bit integers by means of the remarkable new multiply-with- carry method.