Loading...
Loading...
Discrete Math · Axiom Academy
REAL WORLD Monte Carlo Methods Using randomness to solve deterministic problems: Estimate π by throwing virtual darts at a square containing a circle Imagine you have a square dart board with a circle perfectly inscribed inside it. If you throw darts randomly at this board, what can the pattern of hits tell you about π? Square board: Side length = 2 units (area = 4 square units) Inscribed circle: Radius = 1 unit (area = π square units) Random darts: Each dart lands uniformly at random on the square Key insight: The ratio of hits inside vs. outside tells us about π! This is a Monte Carlo method – a technique that uses random sampling to estimate numerical results. It's named after the famous Monte Carlo casino because of its reliance on probability and randomness. Let's work through the probability that a randomly thrown dart lands inside the circle: If we throw N darts and count that M land inside the circle, then: As we throw more darts, the ratio M/N converges to the true probability π/4. This is the Law of Large Numbers in action – with enough random samples, our experimental ratio approaches the theoretical probability. Now let's throw some virtual darts! Watch as each dart lands randomly on the board. Green darts land inside the circle, red darts land outside. Notice how your estimate becomes more accurate as you throw more darts. With just a few darts, the estimate can be quite far from π ≈ 3.14159. But with hundreds or thousands of darts, it gets remarkably close!
This is the written version of the interactive lesson above. See the full Discrete Math course.