ABSTRACT

Physicists often find it useful to generate sets of random numbers to simulate experimental data or to carry out otherwise difficult integrals. This chapter shows physicists the basics of random number generation. Physicists should realize that computer generated "random" numbers are not actually random. Rather, random numbers are generated in a way that samples the space in which certain kinds of "events" can happen. Monte Carlo simulations will generally require that the random numbers be generated according to some probability distribution. The Physics Example makes use of a "random walk", which might be adapted to any number of applications. The chapter focuses on the two functions "RandomReal", which generates a pseudo random real number, and "RandomInteger", for generating integers. It discusses how to generate random numbers according to given probability distributions. It is straightforward in Mathematica to generate arbitrary amounts of integer, real, or complex random numbers.