Monte Carlo Simulation

Estimated Pi: ?

What is a Monte Carlo Simulation?

A Monte Carlo simulation is a statistical technique that uses random sampling and mathematical modeling to estimate the outcomes of various scenarios. It is named after the Monte Carlo Casino in Monaco, known for games of chance and randomness.

In this simulation, we estimate the value of Pi (π) by randomly generating points within a unit square and checking if they fall inside a unit circle. The ratio of points inside the circle to the total number of points generated provides an approximation of Pi.

How It Works

The formula used for this estimation is:

π ≈ 4 * (Number of Points Inside the Circle) / (Total Number of Points Generated)

The purpose of this simulation is to demonstrate the power of randomness and the use of Monte Carlo methods in solving complex problems in various fields, including finance, engineering, and science.