Skip to main content

Efficient Algorithm for Generating Maxwell Random Variables

Abstract

A fast, easily implemented and high efficiency algorithm is derived for sampling from the Maxwell distribution. The algorithm is derived from the rejection-acceptance sampling method using the simple exponential decay function as an envelope function for the Maxwell distribution. The derived algorithm requires less number of random numbers per iteration, consumes less number of random numbers per sample and requires less expensive computation functions than the direct and Johnk’s algorithms. The speed of the proposed algorithm is about 1.6 times that of the direct algorithm and is about 1.5 times that of Johnk’s algorithm. Since the proposed algorithm for sampling from Maxwell distribution verified high efficiency and speed, Watt random variables can be generated by transforming Maxwell random variables generated by the proposed algorithm. The speed of generating Watt random variables using the proposed algorithm is about 1.1 times that generated from Kalos’s algorithm.

This is a preview of subscription content, access via your institution.

References

  1. Lamarch, J.R.: Introduction to Nuclear Engineering. Addison-Wesley, Reading (1983)

    Google Scholar 

  2. X-5 Monte Carlo Team. MCNP—A general Monte Carlo N-particle transport code, version 5. Los Alamos National Laboratory (2003)

  3. Devroye, L.: Non-uniform Random Variate Generation. Springer, Berlin (1986)

    MATH  Google Scholar 

  4. Bielajew, A.F.: Fundamentals of the Monte Carlo Method for Neutral and Charged Particle Transport. The University of Michigan, Ann Arbor (2001)

    Google Scholar 

  5. Kalos, M.H., Whitlock, P.A.: Monte Carlo Methods. Wiley, New York (1986)

    Book  MATH  Google Scholar 

  6. Thomas, D.B., Luk, W.: Efficient hardware generation of random variates with arbitrary distributions. In: 14th Annual IEEE Symposium on Field-Programmable Custom Computing Machines (FCCM’06). IEEE, New York (2006)

    Google Scholar 

  7. Wichura, M.J.: Algorithm AS 241: The percentage points of the normal distribution. Appl. Statist. 37(3), 477–484 (1988)

    Article  Google Scholar 

  8. Fog, A.: Sampling methods. http://www.agner.org/random (2008)

  9. Sun, Q., Fan, J., Boyd, I.D.: Improved sampling techniques for the direct simulation Monte Carlo method. Comput. & Fluids 38, 475–479 (2009)

    Article  Google Scholar 

  10. Everett, C.J., Cashwell, E.D.: A third Monte Carlo sampler, LA-9721-MS. Los Alamos National Laboratory (1983)

  11. Walck, C.: Handbook on Statistical Distributions for Experimentalists. University of Stockholm, Stockholm (2007)

    Google Scholar 

  12. Box, G.E.P., Muller, M.E.: A note on the generation of random deviates. Ann. Math. Statist. 29, 610 (1956)

    Article  Google Scholar 

  13. Brown, F.B.: Lecture: Monte Carlo advances & challenges. In: The 2005 Frederic Joliot/Otto Hahn Summer School, Karlsruhe, Germany, August 24–September 2, 2005

  14. Watt, B.E.: Energy spectrum of neutrons from thermal fission of U235. Phys. Rev. 87(6), 1037–1041 (1952)

    Article  ADS  MathSciNet  Google Scholar 

  15. Kalos, M.H., Naksche, R., Celnik, J.: Monte Carlo Methods in Reactor Computations, Computing Methods in Reactor Physics. Gordon and Breach, New York (1968)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nader M. A. Mohamed.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Mohamed, N.M.A. Efficient Algorithm for Generating Maxwell Random Variables. J Stat Phys 145, 1653–1660 (2011). https://doi.org/10.1007/s10955-011-0364-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10955-011-0364-y

Keywords

  • Rejection-acceptance sampling
  • Generating Maxwell random variables