ACM Home Page
Please provide us with feedback. Feedback
The Monty Python method for generating random variables
Full text PdfPdf (106 KB)
Source ACM Transactions on Mathematical Software (TOMS) archive
Volume 24 ,  Issue 3  (September 1998) table of contents
Pages: 341 - 350  
Year of Publication: 1998
ISSN:0098-3500
Authors
George Marsaglia  The Florida State Univ., Tallahassee
Wai Wan Tsang  The Univ. of Hong Kong
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 18,   Downloads (12 Months): 160,   Citation Count: 3
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/292395.292453
What is a DOI?

ABSTRACT

We suggest an interesting and fast method for generating normal, exponential, 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, then, using simple area-preserving transformations, reassembled into a rectangle from which the x-coordinate—or a linear function of the x-coordinate—of 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.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
DEVROYE, L. 1986. Non-Uniform Random Variate Generation, Springer-Verlag, New York.
 
2
MARSAGLIA, G. 1984. The exact-approximation method for generating random variables. J. Am. Stat. Assoc. 79, 218-221.
 
3
MARSAGLIA, G. 1996. The Marsaglia Random Number CDROM, with the DIEHARD Battery of Tests of Randomness. Department of Statistics, Florida State University. Available by ftp through the Department of Computer Science, Univ. of Hong Kong: http://www.cs.hku.hk/ ftp.html
 
4
MARSAGLIA, G. AND TSANG, W.W. 1984. A fast, easily implemented method for sampling from decreasing or symmetric unimodal density functions. SIAM J. Sci. Stat. Comput. 5, 349-359.
5
 
6
ZECHNER, g. AND STADLOBER, E. 1993. Generating beta variates via patchwork rejection. Computing 50, 1-18.


Collaborative Colleagues:
George Marsaglia: colleagues
Wai Wan Tsang: colleagues