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]

Here is another way to pick a chord at random on the circle of unit radius. Imagine that we have a card table whose sides are of

length 100. We place coordinate axes on the table in such a way that each side of the table is parallel to one of the axes, and so that the center of the table is the origin. We now place a circle of unit radius on the table so that the center of the circle is the origin. Now pick out a point [math](x_0,y_0)[/math] at random in the square, and an angle [math]\theta[/math] at random in the interval [math](-\pi/2,\pi/2)[/math]. Let [math]m = \tan\theta[/math]. Then the equation of the line passing through [math](x_0,y_0)[/math] with slope [math]m[/math] is

[[math]] y = y_0 + m(x - x_0)\ , [[/math]]

and the distance of this line from the center of the circle (i.e., the origin) is

[[math]] d = \left|\frac{y_0 - mx_0}{\sqrt{m^2 + 1}}\right|\ . [[/math]]

We can use this distance formula to check whether the line intersects the circle (i.e., whether [math]d \lt 1[/math]). If so, we consider the resulting chord a random chord. This describes an experiment of dropping a long straw at random on a table on which a circle is drawn. Write a program to simulate this experiment 10000 times and estimate the probability that the length of the chord is greater than [math]\sqrt3[/math]. How does your estimate compare with the results of Example?