MATH 4810Computational Modelling

Module 04 · Monte Carlo

Monte Carlo and Stochastic Simulation

Replace deterministic formulas with sampling experiments. Estimate integrals and probabilities, quantify sampling error, generate and validate pseudorandom inputs, and design replications that actually reduce variance.

2 units · 6 lessons 2 laboratories Assignment 4 · 10% ≈ 22 hours

§ Overview

This module treats randomness as a modelling resource. You will define random experiments and estimators, approximate integrals and probabilities by sampling, quantify sampling error with confidence intervals, and design simulation experiments that reduce variance rather than simply adding more runs.

Monte Carlo methods are the last resort of the analyst when no analytical solution exists and the dimensionality is too high for deterministic quadrature. They are also the foundation for the stochastic simulation methods of Module 5, and for the sensitivity and uncertainty analyses required in the capstone.

Unit 4.1

Monte Carlo methods.

Unit 4.2

Simulation design.

Laboratories 7–8

Monte Carlo simulation and output validation.

Assignment 4

Stochastic simulation experiment.

§ Learning outcomes

By the end of Module 4 you will be able to

  • Design Monte Carlo simulations for estimation and integration problems.
  • Generate and validate pseudorandom inputs, including seeded reproducibility.
  • Analyze sampling error and construct confidence intervals for simulation estimates.
  • Apply replication and variance-reduction techniques deliberately.
  • Distinguish sampling error from structural model error.
  • Report simulation results as distributions rather than single numbers.

§ Units

§ The Monte Carlo principle

The Monte Carlo principle is remarkably simple: to estimate a quantity that can be written as an expectation, sample from the underlying distribution and average the samples.

Suppose the quantity of interest is

θ = E[ g(X) ] = ∫ g(x) p(x) dx

where X is a random variable with density p and g is a function whose expectation we want to estimate. The Monte Carlo estimator is

θ̂_N = (1/N) Σ g(Xᵢ),   Xᵢ ~ p, independently

By the law of large numbers, θ̂_N → θ as N → ∞. By the central limit theorem, the estimator is asymptotically normal with standard error proportional to 1/√N.

This 1/√N convergence rate is the defining feature of Monte Carlo. It is slow — reducing the standard error by a factor of 10 requires 100 times as many samples — but it is independent of the dimensionality of X. This is why Monte Carlo methods are the tool of choice for high-dimensional integration and for simulation problems where analytical solutions do not exist.

Where Monte Carlo fits

Monte Carlo methods are used when: (i) no analytical solution is available; (ii) the dimensionality is too high for grid-based quadrature; (iii) the model contains structural randomness that must be represented; or (iv) the quantity of interest is a tail probability or other functional that cannot be computed by direct means.

§ Where this fits the modelling cycle

Monte Carlo simulation is a modelling approach, not a method. It appears in the modelling cycle at two points: as a numerical method for the model (step 5), and as the means by which uncertainty and sensitivity analyses are conducted (step 10).

In the capstone, Monte Carlo methods typically appear in the uncertainty-analysis phase, where they are used to propagate parameter uncertainty through the model and to quantify the distribution of outputs. This is a direct application of the material in Unit 4.1, and the design discipline of Unit 4.2 determines whether the resulting estimates are trustworthy.

§ Laboratories

Lab 7

Monte Carlo simulation

Estimate a probability or integral by simulation, report the estimate with a confidence interval, and verify against an analytical benchmark.

Lab 8

Random-number and output validation

Test pseudorandom inputs for uniformity and independence, and validate simulation output against known theoretical results.

§ Assignment 4

Stochastic simulation experiment · 10%

Design and run a Monte Carlo experiment, justify the estimator and replication scheme, quantify sampling error, and compare the result against an analytical benchmark where one exists.

Full assignment brief →

§ Common pitfalls

Watch for these

  • Pseudorandom values are algorithmically generated. They are deterministic sequences that pass statistical tests; reproducibility depends on controlling the seed.
  • More simulation replications reduce sampling error but cannot correct structural model error. Precision is not accuracy. A biased model converges confidently to the wrong answer.
  • A single sample path is not the answer. The quantity of interest is a distribution, not one realisation.
  • Confusing sampling error with model error. Adding replications reduces the first, never the second.
👤