0% found this document useful (0 votes)
11 views12 pages

Estimating Pi with Monte Carlo Simulation

The document explains the Monte Carlo Simulation method for estimating the value of π using random sampling within a circle inscribed in a square. It outlines the steps to generate random points, count those inside the circle, and calculate π based on their ratio, emphasizing that larger sample sizes yield better accuracy. Additionally, it discusses the advantages and limitations of the method and provides software tools for implementation.

Uploaded by

kapilkaushik073
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

Estimating Pi with Monte Carlo Simulation

The document explains the Monte Carlo Simulation method for estimating the value of π using random sampling within a circle inscribed in a square. It outlines the steps to generate random points, count those inside the circle, and calculate π based on their ratio, emphasizing that larger sample sizes yield better accuracy. Additionally, it discusses the advantages and limitations of the method and provides software tools for implementation.

Uploaded by

kapilkaushik073
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Monte Carlo Simulation

Estimating Pi Using Circle Simulation


Kruthi Jayaram
June 2025
Introduction
• Monte Carlo Simulation uses random sampling
to estimate results.
• A famous example is estimating the value of π
(Pi) using points in a circle.
Circle Simulation Example
• Imagine a square with a circle inscribed in it.
• Generate random (x, y) points in the square.
• If (x² + y²) < 1, point lies inside the circle.
• Pi ≈ 4 × (Points in circle / Total points)
Steps to Estimate Pi
• 1. Generate N random (x, y) points in [-1, 1]
• 2. Count points inside the unit circle
• 3. Use the ratio to approximate π

• Repeat thousands of times for better accuracy.


Python Code Example
• import random
• inside = 0
• total = 10000
• for _ in range(total):
• x, y = [Link](-1, 1),
[Link](-1, 1)
• if x**2 + y**2 <= 1:
• inside += 1
• pi_estimate = 4 * inside / total
Visualization Concept
Circle inside a square:
• Red dots = points outside circle
• Blue dots = points inside circle

The ratio of blue to total approximates π / 4.


Accuracy with Simulation Size
• With 1,000 samples: π ≈ 3.1
• With 10,000 samples: π ≈ 3.14
• With 1,000,000 samples: π ≈ 3.1415

• Larger simulations give better results.


Advantages
• - Simple concept, powerful estimation
• - Works for complex integrals
• - No need for exact formulas
Limitations
• - Needs large number of points
• - Randomness affects precision
• - Slower convergence compared to analytical
methods
Software Tools
• - Python (random, numpy)
• - MATLAB
• - Excel (with VBA)
• -R
Conclusion
• Monte Carlo Simulation effectively models
randomness.
• The circle example shows the power of
random sampling.
• Pi can be estimated with surprising accuracy.
Q&A
• Any Questions?

You might also like