Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board

Authors: George Marsaglia, Wai Wan Tsang, Jingbo Wang
Title: [download]
(11654)
Fast Generation of Discrete Random Variables
Reference: Vol. 11, Issue 3, Jul 2004
Submitted 2004-06-05, Accepted 2004-07-12
Type: Article
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.

Paper: [download]
(11654)
Fast Generation of Discrete Random Variables
(application/pdf, 215.9 KB)
Supplements: [download]
(934)
5tbls.c: C implementation of 'Condensed table-lookup' method
(application/zip, 3.3 KB)
[download]
(803)
TplusSQ.c: C implementation of 'Table plus Square Histogram' method
(application/zip, 3.3 KB)
Resources: BibTeX | OAI
Creative Commons License
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)
Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board