Evaluating Conceptual Plays
117
be estimated using the Monte Carlo method. The steps involved are as
follows:
Generate a pair of independent random numbers.
1.
Use the pair of random numbers as coordinates of a point
2.
located within the square.
Repeat the procedure
3.
N times and plot all points on the square.
Count the number of points located within the triangle (i.e.,
4.
n
points).
Compute the area of the triangle
5.
n / N, which is 59 / 100 = 0.590
units in this case.
1.0
A
B
C
0.8
0.6
0.4
0.2
1.0
0.8
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
1.0
1.0
0.8
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
1.0
0
0
0.2
0.4
0.6
0.8
1.0
Figure 5.3. (A–C) Examples illustrating the use of the Monte Carlo simulation
procedure to compute (A) a lower triangular area; (B) an area under the curve,
y = x
2 ; and (C) an area within the polygon.
Précédent

- 140/257

Suivant