Question: Consider a unit square. Three points are selected randomly in the square to form a triangle as shown. Namely, the corners of the triangle
Consider a unit square. Three points are selected randomly in the square to form a triangle as shown. Namely, the corners of the triangle are selected randomly. (a) Assume that n= 6 x 1 000 000 random points are taken from a uniform distibution. Write a C++ or MATLAB program to compute the probability of obtaining a wide angle triangle. Write down the output of your program. (Xq. Y) (X3. Y3) (x2-x2) (b) Assume that n = 6 x 1 000 000 random points are taken from a normal distibution whose mean is at the center of square (u= 0.5) and standard deviation is o = 1. In this case, some points will be outside of the square. Write a C++ or MATLAB program to compute the probability that these three points are inside the square at the same time. Write down the output of your program.
Step by Step Solution
There are 3 Steps involved in it
Here is a simple MATLAB program for both scenarios Please note that for the normal distribution case ... View full answer
Get step-by-step solutions from verified subject matter experts
