Question: Buffon's Needle refers to a simple Monte Carlo method for the estimation of the value of Pi. The idea is very simple. Suppose you have

 Buffon's Needle refers to a simple Monte Carlo method for the

Buffon's Needle refers to a simple Monte Carlo method for the estimation of the value of Pi. The idea is very simple. Suppose you have a tabletop with a number of parallel lines drawn on it, which are equally spaced at 2 inch apart. Suppose you also have a needle which is one inch long. If you drop the needle on the table, you will find that one of two things happens: (1) the needle hits a line, or (2) the needle does not hit a line. The idea now is to keep dropping this needle over and over on the table, and to record the statistics. Namely, we want to keep track of both the total number of times that the needle is dropped on the table (call this d), and the number of times that it hits a line (call this h). If you keep dropping the needle, eventually you will find that the value d/h approaches the value of Pi! Write a Monte Carlo simulation that estimates Pi using Buffon's Needle in Python 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!