Simulate uncertainty with Python

Model uncertainty, test assumptions and compare decisions through hands-on Python simulation.

76 short lessons · 3 optional workbooks · Python in your browser

0 / 76 readReading progressReading marks count pages you marked as read.
One event, many possible worldsA guest-decision ticket, a draw card and a collection of possible events representing complete trials repeated under a model. These shapes are conceptual, not simulation output.One eventDrawMany events?

Course contents

80 investigations
00

Probability essentials

Optional · 7 min
01

Your first simulation

6 lessons · Core
02

Choose random inputs

6 lessons · Core
03

Understand simulation error

6 lessons · Core
04

Build inputs from evidence

6 lessons · Core
05

Model dependence

6 lessons · Core
06

Apply the method

6 lessons · Core
07

Simulate systems over time

6 lessons · Core
08

Learn more from fewer runs

6 lessons · Core
09

Turn results into decisions

6 lessons · Core
10

Validate and communicate

6 lessons · Core
11

Advanced sampling and rare events

8 lessons · Advanced
12

Bayesian Monte Carlo and MCMC

8 lessons · Advanced
+

Optional workbooks

3 investigations
See an example

150 invitations.
110 seats. Enough room?

Attendance chance 72%Simulated events 10,000
Simulated attendance under the first lesson’s modelHistogram generated by executing the published Python. 3211 of 10000 events exceed 110 seats. Purple bars fit; mint bars overflow. Each guest independently attends with probability 0.72.Events90100110120130Attendees per event
32.1%

of these modelled events overflow.
What changes if you add ten seats?

Executed Python · assumed attendance modelTry it yourself
Save or restore your work

Export reading marks, notes and code drafts to use them in another browser. Import replaces matching saved records. Run results and CSV files have separate exports.