Question: Java Description: There is a circular pond with n(n2) ducks randomly distributed across the top. Each duck can be modeled as a point. What is
Java



Description: There is a circular pond with n(n2) ducks randomly distributed across the top. Each duck can be modeled as a point. What is the probability that all of the n ducks are in the same half of the circular pond. Note here that we can draw the half way line on any diameter; they can go at any angle. The correct answer is: n(21)n1. A good explanation can be found from http://www.alaricstephen.com/main-featured/2016/11/14/duck-pond General case: There is a circular pond with n(n2) ducks randomly distributed across the top. Each duck can be modeled as a point. What is the probability that all of the n ducks are in the same M-degree sector of the circular pond where 0M180 ? The correct answer is: n(360M)n1. 2. Task 1: In this project, I would like you to write a short Python or Java code to numerically verify the above result. Run your code with the required number of trials, record the number (frequency) of successes, and calculate the corresponding relative frequency of the successes which should in general approach to the exact probability as the number of trials increases. Report your simulation results in the following tables. Here, in one trial, n ducks are randomly distributed in the pond. The outcome of the trial is a success if the n ducks are in the same sector of the circle. The relative frequency of the successes is the number of the successes divided by the number of trials. Run 1: M=180,n=3: the exact probability is 0.75. Run 2: M=180,n=4 : the exact probability is 0.50. Run 3: M=180,n=5: the exact probability is 0.3125
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
