Report sample size and uncertainty with the estimate.
Model before code
Define deck construction, shuffling, legal actions, pay tables, qualification, and stopping rules before generating trials.
A fast simulation of the wrong game is still wrong.
Random sampling
Each trial draws outcomes from the model’s probability distribution. Independent trials allow averages to stabilize as sample size grows.
Use tested random generators and avoid reusing state incorrectly.
Uncertainty
A simulation result has sampling error. Confidence intervals or standard errors communicate how precise the estimate is.
Rare jackpots require especially large samples or analytical treatment because ordinary runs may observe few or none.
Validation
Test simple cases against exact probabilities, verify outcome frequencies, and compare known benchmark returns.
Publish assumptions and enough method detail for another analyst to reproduce the work.
Working checklist
- Specify exact rules
- Validate simple cases
- Use adequate sample size
- Report uncertainty
- Make the method reproducible
This lesson explains general gambling mathematics and uses rounded examples. A game-specific figure applies only to the rules, pay table, strategy, and denominator stated with it. Last reviewed September 20, 2026.