exercise:2e06e933e2: Difference between revisions

From Stochiki
(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...")
 
No edit summary
 
Line 1: Line 1:
<div class="d-none"><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  
\newcommand{\NA}{{\rm NA}}
(in [[exercise:8582afa4e3|Exercise]]) that the average number <math>a</math> of lines crossed is approximately
\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 [[guide:E5be6e0c81#exer 6.3.29 |6.3}.]]) that the average number <math>a</math> of lines crossed
is approximately


<math display="block">
<math display="block">
Line 24: Line 16:
experiments equal to 100, 1000, and 10,00.  Compare your results with the
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>.)
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.

Latest revision as of 22:28, 12 June 2024

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) 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].)