Lecture Notes — Lecture 29: Simulation as a Way of Knowing

Companion to the lecture plan and the worked examples. Read the Definitions before class, the Explanation after it; the practice questions and the lecture quiz close the loop.

Definitions

Explanation

Some questions have no closed form; simulation answers them by counting. Build the model, run it many times with randomness, summarise the outcomes. Three disciplines make the results trustworthy. First, validation: run the simulation on a case with a known answer (the queue where nobody waits) - a model that fails the known case is wrong, and the disagreement is the diagnostic. Second, reproducibility: record the seed; an unseeded simulation is not a result, it is an anecdote. Third, honesty about precision: the estimate's standard error shrinks like 1/sqrt(trials), so four times the trials buy two times the digits - say how many trials and how far the answer wobbles. Simulation partners with algebra: the closed form gives the mean and the WHY; the simulation shows the spread of outcomes the algebra hides.

Examples

The lecture's worked examples live in examples.md; the case studies this lecture builds on are worked in class from the projector. The case sequence with difficulties:

Common misconceptions

Summary and key takeaways

  1. Simulation answers by counting trials what algebra cannot close-form.
  2. Validate on a known answer first; a wrong model fails loudly there.
  3. Seed recorded, trials stated, wobble estimated - or it is not a result.
  4. Standard error ~ 1/sqrt(trials): precision is bought in square roots.
  5. Algebra gives the mean and the why; simulation shows the spread.

Practice questions

Where this leads

Next lecture: Optimization Formulations. The quiz below checks this lecture's essentials before we build on them.