Can We Repeat the Same Experiment?

Changing both a model and its sampled observations makes it difficult to explain a changed result. We need to keep track of the random choices so we can repeat a comparison.

10 sections · 6 questions · 2 coding challenges

1 / 10

Giving Simulated Experiments a Repeatable Starting Point

BOTIE

Numerical simulations need many values that behave like random draws, yet debugging also requires the ability to repeat an experiment. Pseudorandom generators address this by maintaining a state and updating it through a deterministic rule.

NumPy separates the bit generator from the interface that draws values. Its PCG64 documentation specifies how an initial seed establishes a stream. Our lesson uses this distinction to explain repeatability; the workshop receives already chosen indices and does not implement a random-number generator.

Sources for this history