Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

The Monty Python method for generating random variables

Published: 01 September 1998 Publication History

Abstract

We suggest an interesting and fast method for generating normal, exponential, t, von Mises, and certain other important random variables used in Monte Carlo studies. The right half of a symmetric density is cut into pieces, then, using simple area-preserving transformations, reassembled into a rectangle from which the x-coordinate—or a linear function of the x-coordinate—of a random point provides the required variate. To illustrate the speed and simplicity of the Monty Python method, we provide a small C program, self-contained, for rapid generation of normal (Gaussian) variables. It is self-contained in the sense that required uniform variates are generated in-line, as pairs of 16-bit integers by means of the remarkable new multiply-with-carry method.

References

[1]
DEVROYE, L. 1986. Non-Uniform Random Variate Generation, Springer-Verlag, New York.
[2]
MARSAGLIA, G. 1984. The exact-approximation method for generating random variables. J. Am. Stat. Assoc. 79, 218-221.
[3]
MARSAGLIA, G. 1996. The Marsaglia Random Number CDROM, with the DIEHARD Battery of Tests of Randomness. Department of Statistics, Florida State University. Available by ftp through the Department of Computer Science, Univ. of Hong Kong: http://www.cs.hku.hk/ ftp.html
[4]
MARSAGLIA, G. AND TSANG, W.W. 1984. A fast, easily implemented method for sampling from decreasing or symmetric unimodal density functions. SIAM J. Sci. Stat. Comput. 5, 349-359.
[5]
MINH, D.L. 1988. Generating gamma variates. ACM Trans. Math. Softw. 14, 261-266.
[6]
ZECHNER, g. AND STADLOBER, E. 1993. Generating beta variates via patchwork rejection. Computing 50, 1-18.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Mathematical Software
ACM Transactions on Mathematical Software  Volume 24, Issue 3
Sept. 1998
95 pages
ISSN:0098-3500
EISSN:1557-7295
DOI:10.1145/292395
  • Editor:
  • Ronald Boisvert
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 September 1998
Published in TOMS Volume 24, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Monty Python method
  2. normal variates
  3. t variates
  4. von Mises variates
  5. von mises variates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)287
  • Downloads (Last 6 weeks)32
Reflects downloads up to 16 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Super-efficient exact Hamiltonian Monte Carlo for the von Mises distributionApplied Mathematics Letters10.1016/j.aml.2024.109284159(109284)Online publication date: Jan-2025
  • (2024)Generation of normal distributions revisitedComputational Statistics10.1007/s00180-024-01468-339:7(3907-3921)Online publication date: 1-Dec-2024
  • (2023)Antithetic Power Transformation in Monte Carlo Simulation: Correcting Hidden Errors in the Response VariableMathematics10.3390/math1109209711:9(2097)Online publication date: 28-Apr-2023
  • (2022)Gamma Pseudo Random Number GeneratorsACM Computing Surveys10.1145/352715755:4(1-33)Online publication date: 21-Nov-2022
  • (2019)On Runtime and Classification Performance of the Discretize-Optimize (DISCO) Classification ApproachACM SIGMETRICS Performance Evaluation Review10.1145/3308897.330896546:3(167-170)Online publication date: 25-Jan-2019
  • (2018)Influence of Monte Carlo generations applied for modelling of measuring instruments on maximum distance errorTransactions of the Institute of Measurement and Control10.1177/014233121775306241:1(74-84)Online publication date: 26-Feb-2018
  • (2017)History of random variate generationProceedings of the 2017 Winter Simulation Conference10.5555/3242181.3242196(1-12)Online publication date: 3-Dec-2017
  • (2017)Merging in the Horn FragmentACM Transactions on Computational Logic10.1145/304370018:1(1-32)Online publication date: 16-Mar-2017
  • (2017)Abstract Program SlicingACM Transactions on Computational Logic10.1145/302905218:1(1-58)Online publication date: 22-Feb-2017
  • (2017)Datalog Queries Distributing over ComponentsACM Transactions on Computational Logic10.1145/302274318:1(1-35)Online publication date: 22-Feb-2017
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media