Skip to main content
Mathematical computing
Lesson 69 of 75
Challenge

Simulation

Objective. Design deterministic and random mathematical experiments.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Simulation uses mathematical models, run computationally, to explore systems that are hard to solve analytically, including deterministic simulations (iterating a fixed rule, such as a numerical ODE solver) and stochastic simulations using random numbers to model uncertainty, such as Monte Carlo estimation. A Monte Carlo estimate of π generates random points in a unit square and counts the fraction landing inside the inscribed quarter circle, scaling by 4 to approximate π, with accuracy improving roughly as 1/√N for N trials. Good simulation design states the model, the random or deterministic update rule, and how many trials are needed for acceptable accuracy.

Worked example

In a Monte Carlo simulation estimating π, 8000 of 10000 random points fall inside the quarter circle. Estimate π from this simulation.

1/4
Fraction bar showing 1 out of 4 parts shaded
  1. 1Fraction inside circle: 8000/10000 = 0.8
  2. 2Monte Carlo formula: π ≈ 4 × fraction
  3. 3Substitute: π ≈ 4 × 0.8
  4. 4Compute: π ≈ 3.2

Answer: π ≈ 3.2

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. Running a Monte Carlo simulation with very few trials and treating the result as accurate; error decreases only as 1/√N, so quadrupling trials merely halves the typical error, not eliminates it.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard