WEEK 5 : Monte Carlo Method and Applications 23IT006
1] Introduction to the Monte Carlo Method
The Monte Carlo method is a statistical technique that uses
random sampling to estimate mathematical results. It relies on
repeated random sampling to compute results for problems that
might be deterministic in nature but are difficult or impossible to
solve directly. The key idea is to simulate a large number of random
inputs and use statistical analysis to estimate the outcome.
In simplest terms:
1. Random Sampling: Generate random values based on the
problem's conditions.
2. Statistical Estimation: Use the results from these random
values to make an estimate or solve for a quantity of interest.
WEEK 5 : Monte Carlo Method and Applications 23IT006
2]Explanation of the implemented problems
The implementation uses the Monte Carlo method to estimate π.
Here's the breakdown:
1. Random Sampling: Generate random points within a 1x1 unit
square.
2. Quarter-Circle Check: Check if the point lies inside a quarter
circle (radius 1).
3. Estimate π: The ratio of points inside the circle to total points,
multiplied by 4, gives an estimate for π.
4. Multiple Sample Sizes: The program runs simulations for different
sample sizes (10,000, 100,000, 1,000,000) to see how the
estimate improves with more points.
5. Plotting: Results are plotted to show the convergence of the
estimate towards the actual value of π as sample size increases.
3]Python code and results:
WEEK 5 : Monte Carlo Method and Applications 23IT006