Computer Science · Topic Cheatsheet
Topic 10 · Modelling & Simulation (HL Option)
22 key results accumulated across 2 chapters.
Why simulate
Ch 1
Reality too DANGEROUS · EXPENSIVE · SLOW · IMPOSSIBLE. Often multiple reasons combined.
Box's Law
Ch 1
All models are wrong; some are useful. The question is 'useful for THIS decision?'
Variables
Ch 1
What CHANGES over time. Position, velocity, infected count. The state of the system.
Parameters
Ch 1
FIXED values you choose. Gravity g, bounce coef e, infection rate β. Tune the dynamics.
Rules
Ch 1
Equations or logic relating state at t to t+Δt. v_new = v + g·dt. The dynamics.
Assumptions
Ch 1
Simplifications you've MADE. Air drag = 0. Uniform population mixing. ALWAYS list them.
Verification
Ch 1
'Built it RIGHT?' — code matches spec. Tools: unit tests, code review.
Validation
Ch 1
'Built the RIGHT thing?' — model matches reality. Tools: hindcasting, held-out data, expert review.
Sanity check
Ch 1
Run model on a KNOWN case first (e.g. analytic answer). If it fails, don't trust complex predictions.
Minimum detail rule
Ch 1
Use the SMALLEST model that answers your question. More parameters = more uncertainty + bugs + slowness.
Time-stepping
Ch 2
Advance state by Δt with deterministic rules. For physics, ODEs, predictable dynamics. Satellite orbits, bouncing ball, reactions.
Δt trade-off
Ch 2
Smaller Δt = more accurate but slower. Too-large Δt can destabilise the simulation.
Monte Carlo
Ch 2
Random sampling × many runs → average. For stochastic systems or intractable integrals. Pricing, risk, π estimation.
MC error
Ch 2
Decreases as 1/√N. To halve error, quadruple samples. Expensive but parallelisable.
Agent-based
Ch 2
Many agents + simple LOCAL rules → global EMERGENCE. For social, traffic, ecology, crowd, spatial systems.
Hybrid
Ch 2
Real systems often combine all three: e.g. Monte Carlo over time-stepped agent-based pandemic runs.
Accuracy
Ch 2
How close predictions are to TRUTH. Measured on held-out data. Watch out for bias.
Precision
Ch 2
How CONSISTENT predictions are across runs. Low variance. ≠ accuracy! Precise + biased is dangerous.
Sensitivity analysis
Ch 2
Vary one input, plot output. Steep curve = FRAGILE (measure carefully). Flat curve = robust (ignore).
Validity range
Ch 2
Where the model is reliable. State EXPLICITLY (e.g. '5-year forecast OK; 30-year exploratory only').
Hindcasting
Ch 2
Predict the known past as validation. Climate / finance / pandemic models all use this.
Honest communication
Ch 2
Never report a point estimate alone. Always provide uncertainty range + assumptions + validity scope.