Revision as of 02:13, 9 June 2024 by Bot (Created page with "<div class="d-none"><math> \newcommand{\NA}{{\rm NA}} \newcommand{\mat}[1]{{\bf#1}} \newcommand{\exref}[1]{\ref{##1}} \newcommand{\secstoprocess}{\all} \newcommand{\NA}{{\rm NA}} \newcommand{\mathds}{\mathbb}</math></div> A long needle of length <math>L</math> much bigger than 1 is dropped on a grid with horizontal and vertical lines one unit apart. We will see (in Exercise \ref{sec 6.3}.) that the average number <math>a</math> o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
BBy Bot
Jun 09'24

Exercise

[math] \newcommand{\NA}{{\rm NA}} \newcommand{\mat}[1]{{\bf#1}} \newcommand{\exref}[1]{\ref{##1}} \newcommand{\secstoprocess}{\all} \newcommand{\NA}{{\rm NA}} \newcommand{\mathds}{\mathbb}[/math]

A long needle of length [math]L[/math] much bigger than 1 is

dropped on a grid with horizontal and vertical lines one unit apart. We will see (in Exercise \ref{sec 6.3}.) that the average number [math]a[/math] of lines crossed is approximately

[[math]] a = \frac{4L}\pi\ . [[/math]]

To estimate [math]\pi[/math] by simulation, pick an angle [math]\theta[/math] at random between 0 and [math]\pi/2[/math] and compute [math]L\sin\theta + L\cos\theta[/math]. This may be used for the number of lines crossed. Repeat this many times and estimate [math]\pi[/math] by

[[math]] \bar \pi = \frac{4L}a\ , [[/math]]

where [math]a[/math] is the average number of lines crossed per experiment. Write a program to simulate this experiment and run your program for the number of experiments equal to 100, 1000, and 10,00. Compare your results with the methods of Laplace or Buffon for the same number of experiments. (Use [math]L = 100[/math].) \medbreak The following exercises involve experiments in which not all outcomes are equally likely. We shall consider such experiments in detail in the next section, but we invite you to explore a few simple cases here.