Monte Carlo

Consider the following game: you have ten cards, with the following numbers written on them:

Untitled

You draw 5 cards at random, which will divide the list of numbers.

What is the probability that the average of Part 1, minus the average of part 2, is greater than 1?

One way is to divide the number of splits with average(1)-average(2)>1 by the total number of possible splits. This would be the exact answer to our problem.

We could do this, but in many practical situations this is not possible: what if we have infinitely many possible solutions? Then, we need to find an approximation. Monte Carlo is one method to find such approximation.

The idea is to repeat the game very often, and see how often we get the events we are interested in. For example:

Untitled

We repeat this process a lot of times:

Untitled

Our probability will then be $\frac{24302}{100000}=0.24302$. In other words, the statement holds for 24% of the data:

Untitled

But, is it a good approximation?

<aside> ℹ️ Monte Carlo Simulation. It a method for approximation the probability of a certain event, e.g., in a game of chance:

  1. Repeat the game very often.
  2. Count how often the event occurs (frequency).
  3. The probability is estimated by the frequency divided by the total amount of games played (relative frequency). </aside>

Sampling distribution

Monte Carlo consisted of calculating a single number which approximates an unknown probability, quite restrictive. Let’s try to find approximations to entire distributions.

Say you have a sample of duration in seconds of Old Faithful eruptions:

$289, 110, 258, 225, 112, 294, 149, 262, 126$.