Random-stream replay worksheet ============================== StatMedAnalysis | Downloadable worksheet | 5 November 2026 Verify that a simulation replays from a recorded generator state across the intended workflow. Working instructions Use a small synthetic run. Record the generator implementation, runtime, seed policy and stream allocation. Save the state immediately before a chosen operation. Replay that operation in the same supported environment and compare a short output sequence and a downstream aggregate. Working record Save a local copy. Use public, hypothetical or aggregate information. Project code ____________________ Prepared on ____________________ Runtime and generator type ___________________________________________________________________ Initial seeding procedure ___________________________________________________________________ Stream per task and parallel ordering ___________________________________________________________________ Point where state was captured ___________________________________________________________________ Code version and draw order ___________________________________________________________________ Expected replay sequence and statistic ___________________________________________________________________ Observed sequence and divergence point ___________________________________________________________________ Action after package or runtime changes ___________________________________________________________________ Hypothetical worked case A fictional simulation inserts a random draw for a diagnostic plot before its main sampling step. Replaying from the original seed now shifts later draws. Restoring the state captured immediately before sampling isolates the difference. Decision and follow-up Require an exact match for a deterministic replay in the declared environment. When algorithms, versions or task ordering change, document the changed stream and perform the planned statistical validation separately. Decision _______________________ Date ___________________________ Evidence retained at _____________________________________________ Next action ____________________ Owner __________________________ Official reference checked 5 November 2026 https://docs.python.org/3/library/random.html