๐ฒ Monte Carlo Simulation
Use randomness to solve problems that are too complex for exact math. Named after the famous Monaco casino.
๐ก The Core Idea
๐ฏ
1. Define
Set up a problem with uncertain inputs
๐
2. Randomize
Sample thousands of random scenarios
๐
3. Aggregate
Average results to find the answer
๐ด Live Demo: Estimating ฯ with Random Darts
Drop random points in a square. Count how many land inside the circle. The ratio approximates ฯ/4.
Total Points
0
Inside Circle
0
Estimated ฯ
โ
Accuracy vs true ฯ (3.14159โฆ)
โ
๐ The Math Behind It
A unit circle inside a 2ร2 square has area ฯ. The square has area 4.
ฯ โ 4 ร (points inside circle) / (total points)
As you increase the number of points, the estimate converges to the true value of ฯ through the Law of Large Numbers.