## Introduction to Monte Carlo Methods

A Monte Carlo method is a technique that involves using random numbers and probability to solve problems. Suppose for example that events 1, 2, 3 and 4 occur with probabilities 0.2, 0.1, 0.05 and 0.65 respectively, as in the following table

 X 1 2 3 4 p(X=x) 0.2 0.1 0.05 0.65

We can simulate a sequence of occurrences of the event 1 to 4 by generating a sequence of random numbers using the digits 0 to 9. From this sequence we then take the numbers two at a time. Done in this way there are 100 possible random numbers 0 to 99. We can assign the numbers to each possible outcome so that

0 – 19 imply outcome 1

20 – 29 imply outcome 2

30 – 34 imply outcome 3

35 – 99 imply outcome 4

With the assignations above, each possible outcome occurs with the probability given in the table. The sequence of random numbers 25 76 63 99 45 90 11 04 57 03 82 generates the list of outcomes 2 4 4 4 4 4 1 1 4 1 4.

Many situations can be modelled in this way, possibly with modifications, including dice, Fair dice have a probability of 1 over 6 for each outcome. We cannot properly distribute all the numbers 0 – 9 so that each possible outcome is assigned one sixth of the digits, but if we restrict the digits to be 0 – 5 then we can make the assignation

0 implies a score of 1

1 implies a score of 2

2 implies a score of 3

3 implies a score of 4

4 implies a score of 5

5 implies a score of 6

Any random number 6, 7, 8, 9 is discarded. The list of random numbers 0 4 7 5 6 3 9 2 1 8 generates the list of scores 1 5 6 4 3 2. Notice that the 7 6 9 and 8 are not considered to generate these scores.