Monte Carlo Method
part 1.
“God doesn’t play dice with the universe…”.
The origin of the Monte Carlo method is usually linked with the birth of computers and in particular with the researches done by Fermi, Ulam and Von Neumann, after World War II, on the processes of diffusion of neutrons. I was doubtful that the method, given the high number of replications required, could only assert itself with the spread of faster and cheaper computers. It is surprising that a probabilistic technique, such as this method, has proved useful in deterministic problems of numerical computation such as the estimation of non-computable integrals in closed form.
The Monte Carlo method plays an important role among the stochastic simulation methods which, together with dynamic simulation, constitutes one of the most important chapters of computer simulation. In this blog we will go trough this method we will understand deeply us utility in real life.
Gambling, dice and odds
The name Monte Carlo was introduced by Nicholas Constantine Metropolis in reference to the well-known tradition in gambling games played in the casino of the homonymous mini-state. It may seem superficial to refer to these games, but the calculation of probabilities came out precisely from problems discussed and based on the outcome of the roll of the dice.
The main four concepts or probability are for :
Classical (Pascal-Laplace): relationship between favourable cases and possible cases (considered equiprobable).
Frequentist (Von Mises): limit (to infinity) of the ratio between favourable and total cases.
Subjectivistic (De Finetti): subjective estimate of the probability of success of an event.
Axiomatics (Kolmogorov): any number between 0–1 that respects defined properties.
The first three definitions are “constructivist” that is, they indicate a way to calculate probabilities, the fourth is not, but indicates the axioms to which a coherent system of probability calculation must undergo.
Throwing one die:
Let’s start with the roll of a dice. The faces of the cube are six therefore the probability of each number coming out is 1/6 = 16,666…%. Observe that to calculate the probability they implicitly applied the Classical definition of probability: favourable case 1 possible cases 6.
Throwing two dies:
In the roll of two dice the possible results (1 obviously cannot come out, because the sum is considered) vary from two to twelve. Many people believe that even in this case the probability distribution is uniform, as in the roll of a dice. This is not the case, and to be convinced of this, just look at the table below which shows all the possible outcomes:
Throwing three dies:
It is said that a friend of Galileo Galilei, a lover of gambling, was troubled by the following problem: although with a single throw of three dice it is possible to obtain a total of 9 or 10 with the same number (6) of combinations (for example, 9 = 4 + 3 + 2 and 10 = 4 + 4 + 2), experience showed him that 10 was a slightly more probable result than 9. Galileo’s correct answer was that of the 6 ^ 3 = 216 possible ways in three dice could fall, a slightly higher number of them gave 10 compared to 9. In practice, the friend neglected the permutations that can be had within each combination. Today deserving middle school students have retraced the list of 216 possibilities computed by Galilei (see Bibliography). In the following we will report the possible results with the density function and the cumulative:
Throwing four dies:
If the dice are 4, the possibilities become 6 ^ 4 = 1296, definitely a bit too many to enumerate by hand, perhaps Galileo’s patience would not be enough. However, something can immediately be said about the possible outcomes of the sum of the dice rolled: minimum 4, maximum 6 × 4 = 24, furthermore since they are always symmetrical distributions (mean, median and mode coincide), the most probable result is: (4 +24) / 2 = 28/2 = 14 which can happen in 146 different ways; therefore its probability is 146/1296 = 11.265%.
After this due preliminary introduction of probability, in the next blog we will go into practical examples of the Monte Carlo simulation and we will understand its utilities in real life. Stay tuned!