Skip to main content
Log in

An alias method for sampling from the normal distribution

Eine Alias-Methode zur Stichprobenentnahme aus Normalverteilungen

  • Published:
Computing Aims and scope Submit manuscript

Abstract

The most efficint algorithms for sampling from the standard normal distribution require long lists of constants. The size of these tables grows with the employed precision. By adapting A.J. Walker's “alias method” to the normal distribution a sampling procedure is developed which needs only three fixed tables of 128 bytes each. The new method is as fast as its competitors and easier to implement.

Zusammenfassung

Die effizientesten Algorithmen für Stichproben von der Standardnormalverteilung benötigen lange Listen von Konstanten. Die Größe dieser Tafeln wächst mit der verwendeten Präzision. Durch eine Anpassung der “Aliasmethode” von A.J. Walker an die Normalverteilung wird eine Stichprobenprozedur entwicklet, die nur drei feste Tafeln von je 128 Bytes braucht. Die neue Methode ist ebenso schnell wie ihre Konkurrenten und leichter zu implementieren.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Ahrens, J. H.: How to avoid logarithms in comparisons with uniform random variables. Computing41, 163–166 (1988).

    Google Scholar 

  2. Ahrens, J. H., Dieter, U.: Computer methods for sampling from the exponential and normal distributions. Comm. ACM15, 873–882 (1972).

    Article  Google Scholar 

  3. Ahrens, J. H., Dieter, U.: Extensions of Forsythe's method for random sampling from the normal distribution. Math. of Computation27, 927–937 (1973).

    Google Scholar 

  4. Ahrens, J. H., Dieter, U.: Efficient table-free sampling methods for the exponential, Cauchy and normal distributions. Comm. ACM31, 1330–1337 (1988).

    Article  Google Scholar 

  5. Box, G. E. P., Muller, M. E.: A note on the generation of random noomal deviates. Ann. Math. Statistics29, 610–611 (1959).

    Google Scholar 

  6. Dervoye, L.: Non-Uniform Random Variate Generation. New York-Berlin-Heidelberg-Tokyo: Springer-Verlag 1986.

    Google Scholar 

  7. Fishman, G. S.: Principles of Discrete Event Simulation. New York: Wiley 1978.

    Google Scholar 

  8. Forsythe, G. E.: Von Neumann's comparison method for random sampling from the normal and other distributions. Math. of Computation26, 817–826 (1972).

    Google Scholar 

  9. Kinderman, A. J., Monahan, J. F.: Computer generation of random varaibles using the ratio of uniform deviates. ACM Trans. Math. Software3, 257–260 (1977).

    Article  Google Scholar 

  10. Knuth, D. E.: The Art of Computer Programming, Vol. II: Seminumerical Algorithms. Reading, Mass.: Addison-Wesley 1969 and 1981.

    Google Scholar 

  11. Marsaglia, G.: Improving the polar method for generating a pair of normal random varaibles. Boeing Sci. Res. Labs. Seattle,. Washington, D1-82-0203, 1962.

    Google Scholar 

  12. Marsaglia, G.: The exact-approximation method for generating random varaibles in a computer. J. Amer. Statist. Assoc.79, 218–221 (1984).

    Google Scholar 

  13. Marsaglia, G., MacLaren, M. D., Bray, T. A.: A fast procedure for generating normal random varaibles. Comm. ACM7, 4–10 (1964).

    Article  Google Scholar 

  14. Neumann, J. v.: Various techniques used in connectoin with random digits. Monte Carlo methods. National Bureau of Standards AMS12, 36–38 (1951).

    Google Scholar 

  15. Walker, A. J.: New fast method for generating discrete random numbers with arbitrary frequency distributions. Electron. Lett.10, 127–128 (1974).

    Google Scholar 

  16. Walker, A. J.: Fast generation of uniformly distributed pseudo random numbers with floating point representation. Electron. Lett.10, 553–554 (1974).

    Google Scholar 

  17. Walker, A. J.: An efficient method for generating discrete random varaibles with general distributions. ACM Trans. Math. Software3, 253–256 (1977).

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ahrens, J.H., Dieter, U. An alias method for sampling from the normal distribution. Computing 42, 159–170 (1989). https://doi.org/10.1007/BF02239745

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02239745

AMS (MOS) Subject Classification

Key words

Navigation