You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of $\pi$ can be obtained using the ratio of area of circle and area of square. Let, a circle with radius $a$ is inscribed inside a square (side = $2a$).
Area of square = $4a^2$
Area of circle = $\pi r^2$
Here, Monte carlo sampling comes handy to approximate the area. We will randomly throw darts aiming a square board which contains a circle. When, we have enough samples, then the area will be proportional to the number of darts on that region. So, $\pi$ can be expressed as following,