Inspiration

March 14 is celebrated as Pi Day. I decided to make this special project where I use a Raspberry Pi 4 to estimate and simulate the process of Monte Carlo Simulation.

_ A Monte Carlo method is a technique that uses random numbers and probability to solve complex problems. The Monte Carlo simulation, or probability simulation, is a technique used to understand the impact of risk and uncertainty in financial sectors, project management, costs, and other forecasting machine learning models. _

What it does

This project can estimate the value of Pi, the mathematical constant using the Monte Carlo Simulation.

How we built it

The process is as follows-

  1. Generate points within a square between -1 and 1 for both x and y
  2. Determine which points are also in the circle (radius is <= 1)
  3. Plot the points to visualize those points
  4. Plot the estimate for pi versus the iteration number, to see how quickly we converge on the true value of pi.

Challenges we ran into

I have never worked on the Turtle module of python. So, i had to learn it over the weekend. The whole process of making this project was very enjoyable for me.

Accomplishments that we're proud of

The value of Pi, estimated is very close to the real value of Pi.

What we learned

I learned Monte Carlo problems and also learned the Turtle module in Python.

What's next for PI ON A PI - Pi Day Project

I might improve it somehow and show the animation on a small display attached with the Raspberry Pi.

Built With

Share this project:

Updates