# Eli5: What is the Monte Carlo method?

233 views

Eli5: What is the Monte Carlo method?

In: Mathematics

Often probability problems are too complicated to find an exact answer. “What is the chance that a die rolls a 3” is easy, but if you have 100 dice and perform some complicated calculations with their results then it’s getting very difficult. So instead of trying to find an exact answer, you just roll these 100 dice and calculate the result, and repeat that a million times (not with real dice – but with a computer). You’ll get a pretty good idea how likely different outcomes are that way, what the maximum is that you can get, and similar.

All Monte Carlo methods follow that basic idea – instead of calculating everything exactly you use random numbers as input, check what that leads to, and repeat that many times.

Basically, it’s a way for computers to estimate the answer to a mathematical problem by taking a bunch of random samples.

For example, lets say you wanted to figure out the area of a circle. What you would do is draw a square around the circle that touches the edges and generate random points in that square. For each point, you calculate whether it is in the circle or not and then count the ones that are in the circle and not in the circle. If you generate enough samples, you should get that about 78.5% of the points are in the circle, so you can estimate that the area of the circle is 78.5% the area of the square.

Too lazy for wikipedia?

[https://en.wikipedia.org/wiki/Monte_Carlo_method](https://en.wikipedia.org/wiki/Monte_Carlo_method)