NohanJoemon / Pi-value-using-Monte-Carlo-simulations

Estimation of the value of pi using Monte Carlo simulations

Home Page:https://pi-monte-carlo-simulation.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Estimation of Pi using Monte-Carlo simulation

image



This project is an illustration of finding the value of pi using Monte-Carlo simulation. Monte-Carlo simulation relies on repeated random sampling to obtain numerical results. In this case, we consider all points (x,y) that lie in the square marked by (-1,-1),(-1,1),(1,-1) and (1,1). Now. consider the unit circle centred at the origin. If we consider a random point inside the square, the probability that it lies inside the circle is given by π r2 / a2. Here, a=2 and r=1, hence the probability is π/4. To simulate this probability, we consider a large number of points inside the square and find the fraction of points that lie within the circle. This fraction is multiplied with 4 to give an estimate for pi. The accuracy of the estimate increases as we consider more points

Website preview:

https://pi-monte-carlo-simulation.herokuapp.com/

image

About

Estimation of the value of pi using Monte Carlo simulations

https://pi-monte-carlo-simulation.herokuapp.com/


Languages

Language:HTML 62.1%Language:Python 20.8%Language:CSS 16.8%Language:Procfile 0.3%