Estimating Using The Monte Carlo Simulation

Northfield Mount Hermon School
Sep 7, 2025

Raymond Sui, David Zhang

This paper explores the application of the Monte Carlo simulation method to estimate the mathematical constant π\piπ in two-, three-, and four-dimensional spaces. The Monte Carlo technique uses repeated random sampling to approximate the ratio between the area or volume of a geometric figure (such as a circle, sphere, or hypersphere) and its corresponding bounding region (a square, cube, or hypercube). In two dimensions, we estimate π\piπ by generating random points within a square and calculating the ratio of points that fall inside the inscribed circle, scaling the result by four. Extending this approach to three dimensions, we compare the number of random points within a unit sphere to those within a unit cube, multiplying the ratio by six to estimate π\piπ. Finally, in four dimensions, we derive the relationship between the volume of a 4D hypersphere and a 4D hypercube, and implement a Python program to generate random points and evaluate the ratio as the number of points approaches infinity. Across all dimensions, results show that as the number of samples increases, the estimated value converges toward the true digits of π\piπ, demonstrating the versatility and accuracy of Monte Carlo simulations in higher-dimensional spaces.