Question: Question 5 (10 Points) Random Chord Write a well-documented Python program, hmwk505.py, to simulate estimate the probability that a random chord on a unit-circle (radius
Question 5 (10 Points) Random Chord Write a well-documented Python program, hmwk505.py, to simulate estimate the probability that a random chord on a unit-circle (radius one), exceeds the radius of the circle? Repeat the experiment of generating random chords 10,000 times. Record the estimate of the probability that the chord length exceeds the radius as a comment. Hints: Import the random module and use the function random() two times to simulate (@) and (2) the angles depicted in the figure below. Use the math module to calculate the x, y coordinates using X; = cos(@) and y = sin (0) and X2 = cos(x) and y2 = sin(), respectively. Use the distance equation d = x - x) + (- y) to calculate the length of the chord. Grading: Correct for loop (+8 points). Correct estimate for the probability that a chord length exceeds the radius (+2 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
