Chapter 5

Simulation

# 5.1 Introduction

Simulation is one of the most commonly used techniques to gain information about complicated systems, but the term simulation is used to convey many different meanings. According to the Merriam-Webster Online Dictionary, simulation is “the imitative representation of the functioning of one system or process by means of the functioning of another.” We probably think of simulation as something involving computers, but it does not have to be so. For example, airplanes flying in specific parabolic patterns are used in astronaut training to simulate weightless conditions in space. Even when we restrict our attention to computer simulation, there are many different meanings. For example, an airline pilot in training sits in a flight simulator, and a mathematician may simulate a numerical solution to a differential equation by plugging in different starting values in an algorithm. For us, however, simulation will always mean “imitating randomness,” and for this reason the term stochastic simulation is often used. The term Monte Carlo simulation is also common.

The main use of stochastic simulation is to approximate quantities that are difficult to obtain analytically. To take a frivolous example from the world of gambling, in roulette it is easy to specify a probability model and compute probabilities of winning, expected gains, and so on. But what about the game of blackjack? This is a card game played against a dealer where you are dealt cards ...

Get Probability, Statistics, and Stochastic Processes, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.