Lecture 29 — Simulation as a Way of Knowing

Position in the course

This is lecture 29 of 32. It belongs to the course arc described in the course outline and uses the standard interactive case method: display, attempt (5 minutes), discuss, reveal, name the technique.

This lecture runs as a workshop session (build-heavy; see the timing plan), not the standard four-case rhythm.

Learning objectives

By the end of this lecture students can do all three under time pressure, which is what the four cases exercise.

Prerequisite knowledge

Before this lecture: Lectures 26 and 04 — probability and Python

Assumed fluencies:

Preparation task: Write a 10-line dice roller and print the average of 100 rolls.

Detailed topic outline

Core (mandatory):

  1. simulation as a way of knowing
  2. randomness sources and seeds
  3. Monte Carlo estimation
  4. queues and arrival processes

Extension (optional enrichment):

  1. strategy evaluation by simulation
  2. confidence from trial counts

Case sequence

CaseTitleDifficulty
cs-113Dice Before DataBeginner
cs-114The Queue Waiting GameFoundational
cs-115The Exam GamblerIntermediate
cs-116The Buffon NeedleExpert

Display each case full-screen from the student page (cases cs-113–cs-116); instructor pages cs-113–cs-116 under case-studies/instructor/ hold the full solutions, reveal guides, and discussion prompts.

Timing plan (120 minutes)

Format: workshop session — deliberately not the standard case rhythm.

MinutesSegment
0–10Framing: the two patterns this workshop trains
10–45Cases 1–2 (cs-113, cs-114): two 5-minute attempts back to back, one joint discussion, two reveals
45–50Break
50–90Cases 3–4 (cs-115, cs-116): same double rhythm, harder material
90–110Deliberate-practice block: build or trace one of today's patterns end to end, instructor circulating
110–120Synthesis, exit questions, homework

Timing flexes with the room: if a case ignites the class, let the discussion run and compress the synthesis; if the attempts stall, harvest partial attempts rather than extending the clock.

Worked examples

Instructor demonstration to open the lecture: Dice before data (cs-113): 10 rolls by hand, 10,000 by program; the law of large numbers is felt, not stated.

Classroom activities

#ActivityMinutesFormat and prompt
1Estimation casino8Teams estimate four quantities by simulation, then post confidence intervals from trial counts.
2Queue relief race7cs-114's two queue disciplines simulated by hand for 6 arrivals; tension measured.
3Seed honesty check5Same simulation, three seeds: which conclusions survive? The class writes the rule.

Board plan

Instructor explanation notes

Reading the room. Simulation is positioned as a way of knowing when analysis is out of reach. Seeds, trial counts, and honest confidence intervals are the craft taught.

Running the reveal. Workshop format: machines needed. The estimation casino runs on prepared harnesses; publish them the night before.

Lecture focus. One sentence to repeat verbatim: When analysis stalls, simulate — and report the trials.

Common misconceptions

Each case's instructor page lists the specific wrong turn to expect; the reveal should address it by name.

Student practice exercises

Core:

  1. Estimate dice-before-data (cs-113) probabilities with 200 manual tally marks, then with a seeded program.
  2. Simulate the queue game (cs-114) for 20 arrivals under both disciplines; tabulate waiting times.
  3. Run the streak simulation from lecture 26 with three seeds; report the spread honestly.

Enrichment (optional):

Formative assessment

Exit questions (choose one; answer on a card in 60 seconds):

  1. What does the seed control, and what must you report? Expected: reproducibility; report seeds and trial counts with every estimate
  1. When is simulation preferred to analysis? Expected: when the model is realistic but the maths is intractable
  1. What shrinks as trials grow? Expected: the estimate's spread — roughly 1/sqrt(n)

Cards are skimmed before the next lecture; three answers become the framing. Persistent wrong answers route students to the review stations of lecture 16 or to office hours.

Homework and preparation

Learning-outcome mapping

Differentiation