This book provides an introduction to the theory and practice of Monte Carlo and
Simulation methods. It arises from a 20 hour course given simultaneously to two groups
of students. The first are final year Honours students in the School of Mathematics at the
University of Edinburgh and the second are students from Heriot Watt and Edinburgh
Universities taking the MSc in Financial Mathematics.
The intention is that this be a practical book that encourages readers to write and
experiment with actual simulation models. The choice of programming environment,
Maple, may seem strange, perhaps even perverse. It arises from the fact that at Edinburgh
all mathematics students are conversant with it from year 1. I believe this is true of many
other mathematics departments. The disadvantage of slow numerical processing in Maple
is neutralized by the wide range of probabilistic, statistical, plotting, and list processing
functions available. A large number of specially written Maple procedures are available
on the website accompanying this book (www.wiley.com/go/dagpunar_simulation). They
are also listed in the Appendices.1
The content of the book falls broadly into two halves, with Chapters 1 to 5 mostly
covering the theory and probabilistic aspects, while Chapters 6 to 8 cover three application
areas. Chapter 1 gives a brief overview of the breadth of simulation. All problems at the
end of this chapter involve the writing of Maple procedures, and full solutions are given
in Appendix 1. Chapter 2 concerns the generation and assessment of pseudo-random
numbers. Chapter 3 discusses three main approaches to the sampling (generation) of
random variates from distributions. These are: inversion of the distribution function, the
envelope rejection method, and the ratio of uniforms method. It is recognized that many
other methods are available, but these three seem to be the most frequently used, and
they have the advantage of leading to easily programmed algorithms. Readers interested
in the many other methods are directed to the excellent book by Devroye (1986) or an
earlier book of mine (Dagpunar, 1988a). Two short Maple procedures in Appendix 3
allow readers to quickly ascertain the efficiency of rejection type algorithms. Chapter 4
deals with the generation of variates from standard distributions. The emphasis is on
short, easily implemented algorithms. Where such an algorithm appears to be faster
than the corresponding one in the Maple statistics package, I have given a listing in
Appendix 4. Taken together, I hope that Chapters 3 and 4 enable readers to understand
how the generators available in various packages work and how to write algorithms for
distributions that either do not appear in such packages or appear to be slow in execution.
Chapter 5 introduces variance reduction methods. Without these, many simulations are
incapable of giving precise estimates within a reasonable amount of processing time.
Again, the emphasis is on an empirical approach and readers can use the procedures in