Ziggurat和Monty Python方法实现中的设计缺陷(以及对Matlab randn的一些评论)
Design Flaws in the Implementation of the Ziggurat and Monty Python methods (and some remarks on Matlab randn)
摘要:
{ \em Ziggurat}和{ \em Monty Python}是由Marsaglia和Tsang提出的两种快速而优雅的方法,用于将均匀随机变量转换为具有正态,指数和其他常见概率分布的随机变量。虽然所提出的方法在理论上是正确的,我们表明,有各种设计缺陷,在统一的伪随机数发生器(PRNG的),他们公布的实现正常和Γ分布\cite{Ziggurat,{Gamma},Monty}。这些缺陷会导致产生的伪随机数的不均匀性,从而导致其输出与所需分布的明显偏差。此外,我们表明,底层的均匀PRNG的Matlab的\texttt{randn},这也是基于Ziggurat方法的出版实施,是不均匀分布的连续对之间的相关性。此外,我们表明,在MATLAB的\texttt{randn}的寄存器的简单的线性初始化可能会导致输出序列初始化与不同的(相关的,甚至随机无关)种子之间的非平凡的相关性。这些,反过来,可能会导致随机模拟的错误结果。
英文摘要:
{\em Ziggurat} and {\em Monty Python} are two fast and elegant methods proposed by Marsaglia and Tsang to transform uniform random variables to random variables with normal, exponential and other common probability distributions. While the proposed methods are theoretically correct, we show that there are various design flaws in the uniform pseudo random number generators (PRNG's) of their published implementations for both the normal and Gamma distributions \cite{Ziggurat,{Gamma},Monty}. These flaws lead to non-uniformity of the resulting pseudo-random numbers and consequently to noticeable deviations of their outputs from the required distributions. In addition, we show that the underlying uniform PRNG of the published implementation of Matlab's \texttt{randn}, which is also based on the Ziggurat method, is not uniformly distributed with correlations between consecutive pairs. Also, we show that the simple linear initialization of the registers in matlab's \texttt{randn} may lead to non-trivial correlations between output sequences initialized with different (related or even random unrelated) seeds. These, in turn, may lead to erroneous results for stochastic simulations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。