/* ---- Google Analytics Code Below */

## Thursday, August 04, 2022

### Monte Carlo Simulation

Good intro piece to a method we used for many purposes in the enterprise.   Even creating usable models for key processes that were used for decades.  Consider its similarities to Digital Twins.

Monte Carlo Simulation

Darío Weitz   in Towards Data Science, Engineer, Ms. Sc., Former Associate Professor at Ing. en Sistemas de Información, Fac. Reg. Rosario, Univ. Tecnológica Nacional, Argentina. Data Viz Consultant.

Part 1: The News Vendor Problem

In the first article of this series, we defined simulation as a numerical technique consisting of building a mathematical and/or logical model of the system under study and then experimenting with it, collecting data that allows us to obtain an estimator to help solve a complex decision problem.

In the same article, we defined a model as a simplified but valid representation of a real process or system, intending to gain some understanding of its behavior.

We also made a classification of models, distinguishing in particular between continuous models, those in which their behavior (state variables) changes continuously over time, and discrete models, those in which the state variables only change at separate points in time. Another important classification involves static models, those that are a representation of the system at a particular time, and dynamic models, those that evolve over time.

Related to the above classification there are three different types of simulations: continuous event simulation, discrete event simulation, and Monte Carlo simulation.

Principles and concepts about Discrete Event Simulation (DES) were provided in the previously indicated series. We coded several examples with SimPy, an object-oriented, process-based, discrete-event simulation framework based on pure Python. In future articles, we will develop concepts and principles related to continuous event simulation.

In this article (and probably in a couple of others) we are dealing with Monte Carlo Simulations.

Monte Carlo Methods

Monte Carlo Methods (MCM) is a collection of numerical methods for the solution of mathematical problems, where the use of random samples differentiates them from equivalent methods.

The term was coined by the Greek-American physicist Nicholas Metropolis when he was working at Los Alamos National Laboratory with John von Neumann and Stanislaw Ulam in the development of the first atomic bomb. The term gets its origin from the famous casino located in the Principality of Monaco.

The conceptual idea of the MCM consists in the estimation of certain quantities through repeated sampling from models represented in a computer. Two classes of mathematical problems are usually solved with these techniques: integration and optimization.

Concerning the contents described in this series of articles, when we refer to Monte Carlo Simulation models we are talking about static, discrete, stochastic models trying to solve an optimization problem.

From a methodological point of view, a Monte Carlo simulation is a sampling experiment whose aim is to estimate the distribution of a quantity of interest that depends on one or more stochastic input variables. We are particularly interested in calculating point estimates and confidence intervals for that quantities. Inevitably, our estimator will have a sampling error and our first task will be to determine the number of replications to improve the degree of certainty in the value of the estimator.  .... '