Published by the Foundation for Open Access Statistics
Editors-in-chief: Bettina GrĂ¼n, Edzer Pebesma & Achim Zeileis    ISSN 1548-7660; CODEN JSSOBK
Fast Generation of Discrete Random Variables | Marsaglia | Journal of Statistical Software
Authors: George Marsaglia, Wai Wan Tsang, Jingbo Wang
Title: Fast Generation of Discrete Random Variables
Abstract: We describe two methods and provide C programs for generating discrete random variables with functions that are simple and fast, averaging ten times as fast as published methods and more than five times as fast as the fastest of those. We provide general procedures for implementing the two methods, as well as specific procedures for three of the most important discrete distributions: Poisson, binomial and hypergeometric.

Page views:: 15774. Submitted: 2004-06-05. Published: 2004-07-12.
Paper: Fast Generation of Discrete Random Variables     Download PDF (Downloads: 15765)
Supplements: 5tbls.c: C implementation of \'Condensed table-lookup\' method Download (Downloads: 1148; 3KB) TplusSQ.c: C implementation of \'Table plus Square Histogram\' method Download (Downloads: 998; 3KB)

DOI: 10.18637/jss.v011.i03

This work is licensed under the licenses
Paper: Creative Commons Attribution 3.0 Unported License
Code: GNU General Public License (at least one of version 2 or version 3) or a GPL-compatible license.