G S Rehill's Interactive Maths Software Series - "Building a Strong Foundation in Mathematics" from mathsteacher.com.au.

Order a 12-month Year 7 Interactive Maths software Homework Licence for only $19.95. Order a 12-month Year 8 Interactive Maths software Homework Licence for only $19.95. Order a 12-month Year 9 Interactive Maths software Homework Licence for only $19.95. Order a 12-month Year 10 Interactive Maths software Homework Licence for only $19.95.

Year 10 Interactive Maths - Second Edition


Projects

Project 5.1 Monte Carlo Method

The Monte Carlo Method is used to simulate experiments that are costly, dangerous or impossible to perform and solve practical problems, as illustrated in the following example.

A missile attack will be launched against a square target with dimensions 2 m × 2 m as represented by the shaded region.

A 2 m by 2 m square target.

The target is enclosed in the following 4 m × 4 m square.

The target is centred in a 4 m by 4 m square.

The missiles that are fired at the target are equally likely to fall anywhere within the larger 4 m × 4 m square. We can use simulation to determine the probability of hitting the target.


Assumption

Assume that 20 missiles are fired into the region.


Rule of Association

The rule of association between each random number generated as part of the Monte Carlo Simulation and the outcome of each fired missile may be defined as follows.

A table headed Random Numbers (xy), Ordered Pairs (x, y) and Outcome (Hit (H) or Miss (H')).  The example row data with 3 pieces of data forming a row are 11, (1,1), H, 12, (1,2), H, 21, (2,1), H, 22, (2,2), H, 00, (0,0), H', 01, (0,1), H', ...

Trial

A trial consists of generating an acceptable two-digit random number, xy, with a calculator, forming an ordered pair (x, y), and then examining what the ordered pair indicates about the outcome of the fired missile.

E.g. A calculator is used to generate the following random numbers which are converted into two digit random numbers:

  0.942   ...   94   Disregard it
  0.708   ...   70   Disregard it
  0.003   ...   00   An acceptable two digit number

To form an ordered pair (x, y), we take the first two-digits of the random number generated by a calculator. Thus 003 implies that the missile has struck at (0, 0); and therefore failed to hit the target.


Event of Interest

The event of interest is the event of a missile hitting the target, i.e. {(1, 1), (1, 2), (2, 1), (2, 2)}.


Table

Record the results of 20 simulation trials in a table similar to the following table.

A table headed Trial Number, Random Numbers (xy), Ordered Pairs (x, y) and Outcome (H or H').  The Trial Number column is numbered 1 to 20 for 20 trials.  Each row has 3 pieces of other data forming a row and for the 20 rows the data is 31, (3,1), H', 20, (2,0), H', 20, (2,0), H',31, (3,1), H', 11, (1,1), H, 23, (2,3), H', 21, (2,1), H, 01, (0,1), H', 31, (3,1), H', 20, (2,0), H', 12, (1,2), H, 31, (3,1), H', 21, (2,1), H, 01, (0,1), H', 31, (3,1), H', 30, (3,0), H', 11, (1,1), H, 20, (2,0), H', 33, (3,3), H', 03, (0,3), H'

Conclusion

In the above table, we notice that 5 trials out of 20 are favourable to the event of interest.  Therefore, our estimate of the probability that a missile will hit the target is 5/20, i.e. 0.25.


Connection between Area and Probability

Clearly, Area of the target / Total area of the region = 4/16 = 0.25

We notice that:

Number of hits / Total number of missiles fired = Area of the target / Total area of the region

Do your simulation results agree with this? If not, why not?

What happens to the estimated probability of a hit when the number of simulations increases?

This project has introduced the idea of calculating the areas of figures using simulations.


Area enclosed by a Figure

Let us calculate the area of the shaded region, as shown in the diagram.

The shaded figure is similar to a sector of a circle with radius 7 cm as its vertical height and horizontal width.

Enclose the shaded area in a square of size 7 cm by 7 cm.

The shaded figure is enclosed by a 7 cm by 7 cm square grid with grid intervals at 1 cm.


Rule of Association

Associate two-digit random numbers with ordered pairs that represent the smaller 1 cm by 1 cm squares of the larger 7 cm by 7 cm square.


Trial

A trial consists of generating an acceptable two-digit random number, xy, with a calculator, forming an ordered pair (x, y), and then examining whether the ordered pair that represents a 1 cm by 1 cm square lies inside the shaded region.


Assumption

The ordered pairs:

{(0, 6), (1, 6), (2, 6), (3, 6), (3, 5), (4, 5), (4, 4), (5, 4), (5, 3), (6, 3), (6, 2), (6, 1), (6, 0)}

represent the partly shaded 1 cm × 1 cm squares.

Assume that if any of these ordered pairs is generated by a trial, the first occurrence should be counted inside the shaded region, the second occurrence should be counted outside the shaded region and so on. For example, if the ordered pairs generated include (4, 5), … , (5, 4), … , (6, 2), ... they lie inside, …, outside, …, inside etc.


Event of Interest

The event of interest is the event of an ordered pair lying inside the shaded region.


Table

Record the results of 15 simulated trials in a table similar to the following table.

A table headed Trial Number, Random Numbers (xy), Ordered Pairs (x, y) and Outcome (Inside (I) or Outside (O)).  The Trial Number column is numbered 1 to 15 for 15 trials.  Each row has 3 pieces of other data and for the 15 rows the data is 42, (4,2), I, 62, (6,2), I, 56, (5,6), O, 01, (0,1), I, 30, (3,0), I, 40, (4,0), I, 61, (6,1), O, 33, (3,3), I, 62, (6,2), I, 40, (4,0), I, 32, (3,2), I, 30, (3,0), I, 03, (0,3), I, 56, (5,6), O, 42, (4,2), I

Simulated Area

We notice that 12 trials out of 15 are favourable, i.e. 12 squares lie inside the shaded region.

Therefore, Area of the shaded region = Number of smaller squares in the shaded region / Total number of smaller square times Area of the square = 12/15 times 49 = 39.2 cm squared.

The shaded region happens to be a quadrant (one-quarter) of a circle. So, we can verify the above result using the formula for the area of a circle.

A = (1/4)(Pi)(r squared) = (1/4)(Pi)(7 squared) = 38.5 cm squared

The simulated area of 39.2 cm squared for the shaded region obtained by Monte Carlo method is not quite the same as the answer obtained by using the formula A = (1/4)(Pi)(r squared), which is 38.5 cm squared.  Nevertheless, the simulated area is a very good approximation of the exact value.

Note that the minimum number of simulation trials needed for a more accurate result would be 100.


Problems

What is the area of the shaded region based on your simulation trials?

Find the area of the quadrant of a circle by counting the number of shaded small squares.


| Home Page | Order Maths Software | About the Series | Maths Software Tutorials |
| Year 7 Maths Software | Year 8 Maths Software | Year 9 Maths Software | Year 10 Maths Software |
| Homework Software | Tutor Software | Maths Software Platform | Trial Maths Software |
| Feedback | About mathsteacher.com.au | Terms and Conditions | Our Policies | Links | Contact |

Copyright © 2000-2022 mathsteacher.com Pty Ltd.  All rights reserved.
Australian Business Number 53 056 217 611

Copyright instructions for educational institutions

Please read the Terms and Conditions of Use of this Website and our Privacy and Other Policies.
If you experience difficulties when using this Website, tell us through the feedback form or by phoning the contact telephone number.