Simulating a coin with irrational bias using rational arithmetic
Communications in statistics. Simulation and computation (Commun. Stat. - Simul. Comput.), 2020
Abstract
An algorithm is presented that, taking a sequence of independent Bernoulli random variables with parameter as inputs and using only rational arithmetic, simulates a Bernoulli random variable with possibly irrational parameter . It requires a series representation of with positive, rational terms, and a rational bound on its truncation error that converges to . The number of required inputs has an exponentially bounded tail, and its mean is at most . The number of arithmetic operations has a tail that can be bounded in terms of the sequence of truncation error bounds. The algorithm is applied to two specific values of , including Euler's constant, for which obtaining a simple simulation algorithm was an open problem.
View on arXivComments on this paper
