Fast Generation of Discrete Random Variables

George Marsaglia, Wai Wan Tsang, Jingbo Wang

Main Article Content

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.

Article Details

Article Sidebar