ELI5: Explain Like I'm 5

Second-order Monte Carlo simulation

Okay, so imagine you have a big box filled with pieces of candy. Some candies are sweet, some are sour. Now, you want to know how many sweet candies are inside the box, but you can't count them all one by one because there are too many.

So, you come up with a way to estimate the number of sweet candies using a game. You draw a candy from the box at random and taste it. If it's sweet, you put it aside. If not, you put it back in the box. You do this several times, maybe 100 or 200, and count how many sweet candies you found. Then, you divide that number by the total number of candies you tasted (including sour ones) to get an estimate of the proportion of sweet candies in the box.

But wait, you're not done yet! You know that your estimate is not perfect because you only tasted a small sample of the candies in the box. There could be some random variation in the candies you picked that affects your estimate. So, you want to know how uncertain your estimate is.

To do this, you repeat the game many times (let's say 1000 times) and get 1000 estimates of the proportion of sweet candies. Then, you calculate the average of those estimates and the standard deviation (a measure of variability) of those estimates. This gives you an idea of how confident you are in your estimate.

Congratulations, you just did a first-order Monte Carlo simulation! You used random sampling to estimate a value and then repeated the simulation many times to get an idea of its uncertainty.

But what if you want to estimate something more complicated, like the probability of winning a game where you roll two dice? This involves more than one random variable (the result of two dice rolls) and you might need to use some mathematical formulas to calculate the probability.

This is where a second-order Monte Carlo simulation comes in. Instead of simulating the outcome of each roll, you simulate the probability distribution of the outcome. This means that you create a big list of all possible combinations of dice rolls and their associated probabilities. Then, you randomly sample from that list to simulate the rolls.

After many simulations, you can use the results to estimate the probability of winning the game and to get an idea of its uncertainty.

So, a second-order Monte Carlo simulation is a way to estimate something more complex by simulating the probability distribution of its underlying variables. It involves creating a big list of probabilities and using it to simulate random events.