Some excerpts or summaries about this subject are presented from
Ravindran et al. [1987] |
Ecker et al. [1988] |
Computer programs are available (to the IST Unix Alfa users) for verification of some of the proposed algorithms. See also "Monte Carlo" in the calculations page.
Uniform random numbers
[Hillier et al., 1995] The random numbers initially generated by a
computer usually are random integers. However, if desired, each of
these numbers can immediately be converted to a
(** continuous)
uniform random number as follows.
For a given random integer number in the range 0 to n,
dividing this number by n yields (approximately) a uniform random
number. If n is small, this approximation should be improved
by adding ½ to the random integer number and then dividing by
n + 1 instead
(** recommended).
Generating random variables (general case, nonuniform random
numbers)
[Wagner, 1972, p 901] The following
(** "inverse transform method")
is the simplest and most fundamental technique for simulating random draws from
an arbitrary single-variable probability distribution. Let the
distribution function for the random variable be denoted by
Now, 0 ≤ F(x) ≤ 1, and suppose F(x) is continuous and strictly increasing. Then, given a value r, where 0 ≤ r ≤ 1, there is a unique value for x such that F(x) = r. This value is
(** This simple yet elegant sampling rule was first suggested by von Neumann in a letter to Ulam in 1947 [Los Alamos Science, p. 135, June 1987]. It is sometimes called the "Golden Rule for Sampling".)
The technique is to generate a sequence of uniform random
decimal numbers ri, i = 1..n, and
from these, determine the associated values of
xi = F−1(ri).
(** The following correction may be necessary.)
Suppose the random numbers ri are in the range .000 to
.999 (three digits). Then, .0005 can be added to the value of each of the
ri. This would obviously be convenient for the
Gauss distribution. (See the "lens".)
For a discrete variable, x = 0..n
(** not forcibly from 0), with
F(x) =
∑i=0x pi, then
the inverse function can be written as
where we let F(−1) = 0. See an example in Excel.
Conventions:
†: indicates a questionable statement;
**: a note.
References:
• Ecker, Joseph G., Michael Kupferschmid, 1988, "Introduction to
Operations Research", John Wiley & Sons, New York, NY, USA
• Hillier, Frederick S., Gerald J. Lieberman, 1995, "Introduction
to Operations Research", 6.th ed., McGraw-Hill, New York, NY, USA
• Ravindran, A., Don T. Phillips, James J. Solberg, 1987,
"Operations Research: principles and practice", 2.nd ed., John Wiley &
Sons, New York, NY, USA
• Wagner, Harvey M., 1972,
"Principles of Operations Research (with applications to managerial
decisions)", Prentice-Hall International, Inc., London, UK
Created: 12-Oct-2003 — Last update: 13-Oct-2003 |