Results 1 - 10
of
25
TestU01: A C library for empirical testing of random number generators
- ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE
, 2007
"... We introduce TestU01, a software library implemented in the ANSI C language, and offering a collection of utilities for the empirical statistical testing of uniform random number generators (RNGs). It provides general implementations of the classical statistical tests for RNGs, as well as several ot ..."
Abstract
-
Cited by 85 (3 self)
- Add to MetaCart
We introduce TestU01, a software library implemented in the ANSI C language, and offering a collection of utilities for the empirical statistical testing of uniform random number generators (RNGs). It provides general implementations of the classical statistical tests for RNGs, as well as several others tests proposed in the literature, and some original ones. Predefined tests suites for sequences of uniform random numbers over the interval (0, 1) and for bit sequences are available. Tools are also offered to perform systematic studies of the interaction between a specific test and the structure of the point sets produced by a given family of RNGs. That is, for a given kind of test and a given class of RNGs, to determine how large should be the sample size of the test, as a function of the generator’s period length, before the generator starts to fail the test systematically. Finally, the library provides various types of generators implemented in generic form, as well as many specific generators proposed in the literature or found in widely-used software. The tests can be applied to instances of the generators predefined in the library, or to user-defined generators, or to streams of random numbers produced by any kind of device or stored in files. Besides introducing TestU01, the paper provides a survey and a classification of statistical tests for RNGs. It also applies batteries of tests to a long list of widely used RNGs.
Random Number Generators: Selection Criteria and Testing
, 1998
"... this paper, we shall assume that the sequence is purely periodic, in the sense that the initial state s 0 is always revisited. In other words, the sequence has no transient part. The goal is to make it hard to distinguish between the output of the generator and a typical realization of an i.i.d. uni ..."
Abstract
-
Cited by 18 (8 self)
- Add to MetaCart
this paper, we shall assume that the sequence is purely periodic, in the sense that the initial state s 0 is always revisited. In other words, the sequence has no transient part. The goal is to make it hard to distinguish between the output of the generator and a typical realization of an i.i.d. uniform sequence over U . In
A compact and accurate Gaussian variate generator
- IEEE Trans. Very Large Scale Integr. (VLSI) Syst
, 2008
"... Abstract—A compact, fast, and accurate realization of a digital Gaussian variate generator (GVG) based on the Box–Muller al-gorithm is presented. The proposed GVG has a faster Gaussian sample generation rate and higher tail accuracy with a lower hard-ware cost than published designs. The GVG design ..."
Abstract
-
Cited by 16 (10 self)
- Add to MetaCart
(Show Context)
Abstract—A compact, fast, and accurate realization of a digital Gaussian variate generator (GVG) based on the Box–Muller al-gorithm is presented. The proposed GVG has a faster Gaussian sample generation rate and higher tail accuracy with a lower hard-ware cost than published designs. The GVG design can be readily configured to achieve arbitrary tail accuracy (i.e., with a proposed 16-bit datapath up to 15 times the standard deviation) with only small variations in hardware utilization, and without degrading the output sample rate. Polynomial curve fitting is utilized along with a hybrid (i.e., combination of logarithmic and uniform) seg-mentation and a scaling scheme to maintain accuracy. A typical instantiation of the proposed GVG occupies only 534 configurable slices, two on-chip block memories, and three dedicated multipliers of the Xilinx Virtex-II XC2V4000-6 field-programmable gate array (FPGA) and operates at 248 MHz, generating 496 million Gaussian variates (GVs) per second within a range of 6 66. To accurately achieve a range of 9 4, the GVG uses 852 configurable slices, three block memories, and three on-chip dedicated multipliers of the same FPGA while still operating at 248 MHz, generating 496 million GVs per second. The core area and performance of a GVG implemented in a 90-nm CMOS technology are also given. The statistical characteristics of the GVG are evaluated and confirmed using multiple standard statistical goodness-of-fit tests. Index Terms—Box–Muller (BM) algorithm, field-programmable gate array (FPGA), Gaussian noise generator (GNG), low bit-error rate simulation, random number generation. I.
Close-Point Spatial Tests And Their Application To Random Number Generators
"... this article, we study statistical tests based on nearest-neighbor distances between the points formed by vectors of uniform random numbers. Such tests are relevant and necessary, because Monte Carlo simulation is often used to estimate the (complicated) distribution of certain statistics related to ..."
Abstract
-
Cited by 10 (5 self)
- Add to MetaCart
(Show Context)
this article, we study statistical tests based on nearest-neighbor distances between the points formed by vectors of uniform random numbers. Such tests are relevant and necessary, because Monte Carlo simulation is often used to estimate the (complicated) distribution of certain statistics related to nearest-neighbor distances. The contribution of this paper is to provide an empirical study of these spatial tests from three viewpoints. Firstly, the distributions of most of these test statistics are known only asymptotically, and we evaluate, by simulation, the approximation error of the exact distribution by its asymptotic counterpart. Secondly, we investigate practical implementation issues for the tests. Thirdly, we study how certain classes of commonly used random number generators behave with respect to these tests. Linear congruential generators fail spectacularly when the sample size gets close to the square root of the period length. Since a sample size of 2
Uniform Random Number Generators: A Review
- Proc. Of Winter Simulation Conference, IEEE
, 1997
"... ABSTRACT This paper summarizes the current state-of-the-art on uniform random number generation for stochastic simulation. It recalls the basic ideas, discusses some linear methods and their theoretical analysis, and provides pointers to further details and to recommended implementations. WHAT IS A ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
(Show Context)
ABSTRACT This paper summarizes the current state-of-the-art on uniform random number generation for stochastic simulation. It recalls the basic ideas, discusses some linear methods and their theoretical analysis, and provides pointers to further details and to recommended implementations. WHAT IS A GOOD RNG? Without a good random number generator (RNG), simulation results are often meaningless. And questionable generators are still all over the place, so many experiments rest on shaky foundations. Why this problem was not solved long ago? Because it is not so easy. A so-called RNG actually produces a totally deterministic and periodic sequence of numbers, once its initial state (or seed) is chosen. This is in total contradiction with the assumption of a sequence of independent and identically distributed (i.i.d.) random variables, and there is no clean way to completely reconcile these two opposite aspects. Therefore, everything we do in this context is heuristic. This being said, the heuristic arguments lead to criteria that need theory to be analyzed. A RNG has a state that evolves in a finite state space S, according to a recurrence of the form s n = f(s n−1 ), n ≥ 1, where the initial state s 0 ∈ S is called the seed, and f : S → S is the transition function. At step n, the generator outputs u n = g(s n ), where g : S → [0, 1] is the output function. The output sequence of the RNG is thus {u n , n ≥ 0}. The output space could be more general, but we shall assume here that it is the real interval [0, 1]. Since S is finite, the sequence must be periodic (possibly after some initial transient). Let ρ be the period length. Typically, one has ρ near |S|, that is, ρ ≈ 2 b if the state is represented over b bits, otherwise there is a waste of computer memory. We now momentarily forget the deterministic nature of the RNG and view the u n as random variables. This could make sense if, for example, the seed s 0 and/or some parameters of the functions f and g are chosen at random. Define the null hypothesis H 0 : "The u n are i.i.d. U(0, 1) (i.e., uniform over the interval (0, 1)) random variables". This hypothesis H 0 means that for each n and t, the vector u n = (u n , . . ., u n+t−1 ) is uniformly distributed over the t-dimensional unit hypercube I t = [0, 1] t . Of course, this cannot hold, due to the finiteness of S. But for small t, a discretized version of it could hold, as follows. Replace the interval [0, 1] by the finite set Z Z m = {0, 1/m, 2/m, . . ., (m − 1)/m} for some large integer m, and suppose that s 0 is random, uniformly distributed over S, which is assumed to be of cardinality ρ. Consider the hypothesis H 0 : "u 0 (and therefore each u n ) is uniformly distributed over the set Z Z t m ". The hypothesis H 0 can hold exactly only if ρ is a multiple of m t . In practice, ρ is often slightly smaller than a multiple of m t , and H 0 can hold approximately. For t such that m t ρ, the set Ψ = {u n , 1 ≤ n ≤ ρ} is only a small fraction of Z Z t m . In this case, which points of Z Z t m should be in Ψ? Our opinion is that the points of Ψ should be uniformly spread over Z Z t m , for all t up to some reasonably large value determined by our analysis capabilities. This is our main criterion for discriminating among generators and for constructing what we call "good ones". As a realistic illustration, let m = 2 30 and ρ ≈ 2 210 . Then, H 0 can hold approximately, if the generator is well designed, for t ≤ 7. For t > 7, the fraction of Z Z t m that can be covered by Ψ is approximately 2 −30(t−7) . As t increases, this fraction quickly becomes extremely tiny, and nothing can be done against this, aside from increasing ρ. Note that our reasoning makes sense only if s 0 is random and if ρ is huge. One may argue that the points of Ψ should look like random points over Z Z t m instead of being too evenly distributed. But if Ψ is viewed as a sample space from which points are taken
Tests Based on Sum-Functions of Spacings for Uniform Random Numbers
, 1997
"... : We examine the idea of testing uniform random number generators via two goodness-of-fit statistics: the sum of the logarithms and the sum of squares of overlapping m- spacings. The first statistic is related to an estimator of the entropy of a density and is good to detect clustering, whereas the ..."
Abstract
-
Cited by 7 (5 self)
- Add to MetaCart
: We examine the idea of testing uniform random number generators via two goodness-of-fit statistics: the sum of the logarithms and the sum of squares of overlapping m- spacings. The first statistic is related to an estimator of the entropy of a density and is good to detect clustering, whereas the second one, known as Greenwood's statistic for m = 1, is optimal in terms of Pitman efficiency, in certain setups, among sum-functions of m-spacings. These statistics are asymptotically normally distributed. We evaluate the distance between the standard normal distribution and that of the standardized statistics, as a function of m and of the sample size, when standardization is done using either the asymptotic or the exact (for finite sample size) mean and variance. We then report on experiments with these statistics to detect defects in some popular random number generators. Key Words: Random number generators; statistical tests; spacings. 1 Introduction Let U 1 ; : : : ; U n be a seq...
Parallel Streams of Linear Random Numbers in the Spectral Test
- in High Dimensions, Monte Carlo Methods and Applications
, 1998
"... ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, N ..."
Abstract
-
Cited by 5 (4 self)
- Add to MetaCart
ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, NY 10036 USA fax +1 (212) 869-0481, or permissions@acm.org. Parallel Streams of Linear Random Numbers in the Spectral Test Karl Entacher Austrian Science Fund (FWF projects no. P11143-MAT and P12441-MAT) This paper reports analyses of subsequences of linear congruential pseudorandom numbers by means of the spectral test. Such subsequences occur in particular simulation setups or as methods to obtain parallel streams of pseudorandom numbers for parallel and distributed simulation. Especially in the latter case, two kinds of sub-streams are of special interest: lagged random numbers with step sizes k, and consecutive streams of random numbers of length l. We show how to analyze correlations ...
Random Number Generators and Empirical Tests
"... We recall some requirements for "good" random number generators and argue that while the construction of generators and the choice of their parameters must be based on theory, a posteriori empirical testing is also important. We then give examples of tests failed by some popular generato ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
We recall some requirements for "good" random number generators and argue that while the construction of generators and the choice of their parameters must be based on theory, a posteriori empirical testing is also important. We then give examples of tests failed by some popular generators and examples of generators passing these tests.
Entropy Tests for Random Number Generators
, 1997
"... : Uniformity tests based on a discrete form of entropy are introduced and studied in the context of empirical testing of uniform random number generators. Comparisons are made with tests based on the Pearson chi-square statistic. Numerical results are provided and several currently used generators f ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
: Uniformity tests based on a discrete form of entropy are introduced and studied in the context of empirical testing of uniform random number generators. Comparisons are made with tests based on the Pearson chi-square statistic. Numerical results are provided and several currently used generators fail the tests. The linear congruential and nonlinear inversive generators with power-of-two modulus perform especially badly. CR Categories and Subject Descriptors: G.3 [Probability and Statistics]: Random Number Generation General Terms: Algorithms, statistics Additional Key Words and Phrases: Random number generators; statistical tests; goodness-of-fit; entropy. Authors' Addresses: P. L'Ecuyer and J.-F. Cordeau, D'epartement d'Informatique et de Recherche Op'erationnelle (IRO), Universit'e de Montr'eal, C.P. 6128, Succ. Centre-Ville, Montr'eal, H3C 3J7, Canada; e-mail: lecuyer@iro.umontreal.ca A. Compagner, Faculty of Applied Physics, Delft University of Technology, P.O. Box 5046, 2600...