EconPapers    
Economics at your fingertips  
 

The Ziggurat Method for Generating Random Variables

George Marsaglia and Wai Wan Tsang

Journal of Statistical Software, 2000, vol. 005, issue i08

Abstract: We provide a new version of our ziggurat method for generating a random variable from a given decreasing density. It is faster and simpler than the original, and will produce, for example, normal or exponential variates at the rate of 15 million per second with a C version on a 400MHz PC. It uses two tables, integers ki, and reals wi. Some 99% of the time, the required x is produced by: Generate a random 32-bit integer j and let i be the index formed from the rightmost 8 bits of j. If j

Date: 2000-10-02
References: View complete reference list from CitEc
Citations: View citations in EconPapers (24)

Downloads: (external link)
https://www.jstatsoft.org/index.php/jss/article/view/v005i08/ziggurat.pdf
https://www.jstatsoft.org/index.php/jss/article/do ... e/v005i08/rnorrexp.c

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:jss:jstsof:v:005:i08

DOI: 10.18637/jss.v005.i08

Access Statistics for this article

Journal of Statistical Software is currently edited by Bettina Grün, Edzer Pebesma and Achim Zeileis

More articles in Journal of Statistical Software from Foundation for Open Access Statistics
Bibliographic data for series maintained by Christopher F. Baum ().

 
Page updated 2025-03-19
Handle: RePEc:jss:jstsof:v:005:i08