About this site

A free, interactive introduction to stochastic calculus, from a jittering particle to the diffusion models behind AI image generators. Every idea has a simulation you can play with.

What it is

Eleven chapters and 36 sections, plus 30 interview questions. Every section is built the same way: a short explanation, a "Predict first" question, one formula with every symbol explained in plain words, an interactive simulation, a precise statement with references, and a short Python program you can edit and run in the browser. Each chapter ends with a recap quiz and can be downloaded as a PDF.

It is written for readers with high-school algebra and no probability background. The "Going deeper" panels are there for readers who want the exact theorems.

Who made it

Created by Ngoc Minh Nguyen (github.com/nnm-psd). Built with the help of Claude (Anthropic). Every result on the site is checked by automated tests, described below.

How the content is checked

The checks are public: see the latest runs.

Found a mistake?

Please report it on GitHub (a free GitHub account is needed). Say which section, and what is wrong or unclear. Suggestions for new sections are welcome there too.

How to cite

Ngoc Minh Nguyen (2026). Visual Stochastic Calculus [interactive website]. https://nnm-psd.github.io/visual_stochastic_calculus/

@misc{nguyen2026visual,
  author       = {Nguyen, Ngoc Minh},
  title        = {Visual Stochastic Calculus},
  year         = {2026},
  howpublished = {\url{https://nnm-psd.github.io/visual_stochastic_calculus/}},
  note         = {Interactive website}
}

Licence

Text, figures and images: Creative Commons Attribution 4.0 (CC BY 4.0). You may copy, adapt and reuse them, including in courses and slides, as long as you credit "Visual Stochastic Calculus by Ngoc Minh Nguyen" with a link.

Code (the simulations and the Python programs): MIT licence.

Privacy

No cookies, no tracking, no accounts. Your theme choice and your progress are stored only in your own browser, and "Reset progress" on the home page erases them. Pressing "Run in browser" downloads Python from the jsDelivr CDN. The formula fonts also load from it.

Acknowledgements

The layout follows Seeing Theory (Brown University), and the particle simulation is inspired by MinuteLabs. Formulas are rendered by KaTeX, and the in-browser Python is Pyodide. The mathematics follows the textbooks and papers cited in each section, especially Shreve's Stochastic Calculus for Finance II, Øksendal's Stochastic Differential Equations, and Mörters & Peres's Brownian Motion.