prob.part30.61_62 - 2.1. SIMULATION OF CONTINUOUS...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2.1. SIMULATION OF CONTINUOUS PROBABILITIES 53 7 For Buffon’s needle problem, Laplace 9 considered a grid with horizontal and vertical lines one unit apart. He showed that the probability that a needle of length L ≤ 1 crosses at least one line is p = 4 L- L 2 π . To simulate this experiment we choose at random an angle θ between 0 and π/ 2 and independently two numbers d 1 and d 2 between 0 and L/ 2. (The two numbers represent the distance from the center of the needle to the nearest horizontal and vertical line.) The needle crosses a line if either d 1 ≤ ( L/ 2) sin θ or d 2 ≤ ( L/ 2) cos θ . We do this a large number of times and estimate π as ¯ π = 4 L- L 2 a , where a is the proportion of times that the needle crosses at least one line. Write a program to estimate π by this method, run your program for 100, 1000, and 10,000 experiments, and compare your results with Buffon’s method described in Exercise 6. (Take L = 1.) 8 A long needle of length L much bigger than 1 is dropped on a grid with horizontal and vertical lines one unit apart. We will see (in Exercise 6.3.28) that the average number a of lines crossed is approximately a = 4 L π ....
View Full Document

Page1 / 2

prob.part30.61_62 - 2.1. SIMULATION OF CONTINUOUS...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online