Art Kendall <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I tend to be more concerned with the "apparent randomness" of the results than with >the speed of the algorithm. > > As a thought experiment, what is the cumulative time difference in a run using the >fastest vs the slowest algorithm? A > whole minute? A second? A fractional second? > ======================================== I agree; the time to generate normal variates used in most simulations is a small part of the overall running time. More important are convenience and fit to the true distribution.
As for the latter, most methods are functions of the presumed uniform [0,1) variates U1,U2,... used in the generating process, and their fit to the underlying distribution is a direct consequence of the suitability of the U's. There have been few reported problems, except perhaps when integers from congruential RNGs are floated then used via polar coordinates to provide pairs of normal variates in the plane. The lattice structure of pairs of points from the congruential RNG may cause patterns in the resulting normal points in the plane. Most problems with integer RNG's arise from from their suitability as iid uniform---usually 32-bit---integers. After they are floated to [0,1), problems are much less frequent. Speed can be an important factor for exponential variates---for example, when using them to generate a large set of ordered uniform [0,1) variates or when providing points in a Poisson process. As long as methods are easy to use, (via libraries, downloads, etc.), and seem to produce the required distributions well within the limits of single precision, then one may as well make a choice based on elegance and speed, criteria for which there are wide variations and challenges for improvement. Assessing the two can be likened to pairs skating and the downhill. George Marsaglia ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ =================================================================