Question: Question 4 (12 marks) Let p be the probability that three random points on the edges of the unit square form an obtuse triangle (see

 Question 4 (12 marks) Let p be the probability that three

Question 4 (12 marks) Let p be the probability that three random points on the edges of the unit square form an obtuse triangle (see the figure). P3 C P2 b P1 (a) Write a MATLAB function with calling sequence function [p, stderror] = approxProb(Nreps) to estimate the probability p. Your MATLAB function should return your estimate of p and the standard error fo the estimator, given the number of repetitions as an input argument. (b) Run the simulation 10 times and print the probability p with 4 decimal places for Nreps = 100 and Nreps = 10,000, respectively. Describe what do you observed. (c) Determine by simulation the number of repetitions for the standard error to be less than 1 x 10-3, i.e. the estimate for p should have 2 decimal place accuracy. (d) Estimate the number of repetitions you would need for 3 decimal place accuracy. Explain your answer. Question 4 (12 marks) Let p be the probability that three random points on the edges of the unit square form an obtuse triangle (see the figure). P3 C P2 b P1 (a) Write a MATLAB function with calling sequence function [p, stderror] = approxProb(Nreps) to estimate the probability p. Your MATLAB function should return your estimate of p and the standard error fo the estimator, given the number of repetitions as an input argument. (b) Run the simulation 10 times and print the probability p with 4 decimal places for Nreps = 100 and Nreps = 10,000, respectively. Describe what do you observed. (c) Determine by simulation the number of repetitions for the standard error to be less than 1 x 10-3, i.e. the estimate for p should have 2 decimal place accuracy. (d) Estimate the number of repetitions you would need for 3 decimal place accuracy. Explain your

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!