Table of Contents
Fetching ...

Stochastic Simulation and Monte Carlo Method

Davoud Mirzaei

TL;DR

This collection of lecture notes introduces stochastic simulation and Monte Carlo methods for scientific computing, contrasting deterministic and stochastic modeling and providing practical tools for generating random variables, estimating integrals, and simulating stochastic processes. It covers core MC techniques (inverse transform, acceptance-rejection, importance sampling) and analyzes convergence and error via the central limit theorem, while applying them to Markov processes, Gaussian processes, SSA (Gillespie) for biochemical kinetics, and MCMC (Metropolis–Hastings) for Bayesian parameter inference. A central thread is the Stochastic Simulation Algorithm (SSA) for discrete-event dynamics and its extensions (tau-leaping), alongside stochastic process generation and Gaussian-process sampling, with extensive Python code examples. The notes emphasize real-world applications across biology, chemistry, ecology, and finance, illustrating how stochastic methods yield both trajectory-level and ensemble-level insights, including stationary distributions, hitting times, and posterior uncertainty quantification. Overall, the work provides a practical, implementation-focused framework for leveraging stochastic simulation to model uncertainty and compute complex expectations in high dimensions and complex domains.

Abstract

These lecture notes are intended to cover some introductory topics in stochastic simulation for scientific computing courses offered by the IT department at Uppsala University, as taught by the author. Basic concepts in probability theory are provided in the Appendix A, which you may review before starting the upcoming sections or refer to as needed throughout the text.

Stochastic Simulation and Monte Carlo Method

TL;DR

This collection of lecture notes introduces stochastic simulation and Monte Carlo methods for scientific computing, contrasting deterministic and stochastic modeling and providing practical tools for generating random variables, estimating integrals, and simulating stochastic processes. It covers core MC techniques (inverse transform, acceptance-rejection, importance sampling) and analyzes convergence and error via the central limit theorem, while applying them to Markov processes, Gaussian processes, SSA (Gillespie) for biochemical kinetics, and MCMC (Metropolis–Hastings) for Bayesian parameter inference. A central thread is the Stochastic Simulation Algorithm (SSA) for discrete-event dynamics and its extensions (tau-leaping), alongside stochastic process generation and Gaussian-process sampling, with extensive Python code examples. The notes emphasize real-world applications across biology, chemistry, ecology, and finance, illustrating how stochastic methods yield both trajectory-level and ensemble-level insights, including stationary distributions, hitting times, and posterior uncertainty quantification. Overall, the work provides a practical, implementation-focused framework for leveraging stochastic simulation to model uncertainty and compute complex expectations in high dimensions and complex domains.

Abstract

These lecture notes are intended to cover some introductory topics in stochastic simulation for scientific computing courses offered by the IT department at Uppsala University, as taught by the author. Basic concepts in probability theory are provided in the Appendix A, which you may review before starting the upcoming sections or refer to as needed throughout the text.
Paper Structure (41 sections, 6 theorems, 248 equations, 30 figures, 3 tables, 6 algorithms)

This paper contains 41 sections, 6 theorems, 248 equations, 30 figures, 3 tables, 6 algorithms.

Key Result

Theorem 3.1

If $U\sim \mathcal{U}(0,1)$ then $X = F^{-1}(U)\sim f$

Figures (30)

  • Figure 1: Numerical solution using the deterministic ODE-solver RK45 from Python library $\texttt{scipy.integrate.solve\_ivp}$ (left), and using the stochastic solver SSA (right)
  • Figure 2: A Snakes-and-Ladders game board (image from www.vectorstock.com).
  • Figure 3: The inverse of a non-decreasing function
  • Figure 4: The inverse transform method
  • Figure 5: Histograms of generated random variables with exponential distribution $\mathcal{E}xp(0.5)$ using the inverse transform method. $N=500$ (left), $N=5000$ (right)
  • ...and 25 more figures

Theorems & Definitions (44)

  • Theorem 3.1
  • Example 3.1
  • Example 3.2
  • Remark 3.1
  • Remark 3.2
  • Example 3.3
  • Example 4.1
  • Example 4.2
  • Example 4.3
  • Example 4.4
  • ...and 34 more