Monte Carlo sampling of probability distributions: How to make the computer roll dice.

NewsEtc., September, 1998. Steven Jacques, Oregon Medical Laser Center

A common and well-known technique in modeling of physical processes is to use the computer for simulation. For example, we use computer simulations to mimic the movement of photons, modeled as discrete particles, through light-scattering tissues. Such modeling involves the computer drawing from a probability density function that describes the possible values of a particular parameter, such as the step size of a photon between scattering events or the angle of scattering at each scattering event. How does the computer "draw" a value? This article presents a simple discussion of the so-called "Monte Carlo" method, the name implying that the computer throws dice to draw from a probability density function in a non-biased manner.

The following three sections discuss more fully the Monte Carlo technique:

The above example of a Gaussial laser beam (w = 1 mm) is summarized by the following figure depicting how a random number rnd1 selects a choice of radial position r1 (mm). A choice of launch position is described by a radius r1 and an angle phi as in the following figure showing a top view of photon launch down into the tissue:


The Monte Carlo method of choosing r1 is summarized by the figure:



eqn0-1 and eqn-2

The random number rnd1 selects a choice of radial position r1 such that a histogram of many r1 values will recreate the function p(r) = 2pir exp(-r2)/(piw2). These choices of r1 are appropriate choices for the radial position of launching photons to approximate a Gaussian beam.

Once one has chosen the radial position r1, one must choose the radial angle (phi) of the photon launch point. The angle phi can be relative to some reference line such as the x-axis. This choice is achieved by randomly selecting an angle between 0 and 2pi radians:

phi = 2pi(rnd)

then converting the r1 and phi values into x, y coordinates on the tissue surface where the photon should enter the tissue:

x = r1cos(phi)
y = r1sin(phi)

For the interested reader, here are some references on the Monte Carlo method:

Sept issue
NewsEtc. Index
OMLC home page