Rolling Two Dice with Weighted History

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
This Demonstration simulates rolling two dice but speeds up convergence to the expected values. The first rolls simulate rolling two dice normally, while subsequent rolls are weighted according to the gambler's fallacy—numbers that have come up many times before are less likely to come up compared to the expected frequencies.
Contributed by: Laura Shou (September 2015)
Open content licensed under CC BY-NC-SA
Snapshots
Details
With the "random" slider, you can determine whether a roll is random (with respect to the expected distribution) or follows the gambler's fallacy weights. The output shows whether the roll was random or based on a skewed history. Using the variable ensures that the first
rolls are truly random (and do not follow the gambler's fallacy weights).
The frequency plot uses blue dots for the expected frequency (out of 100) and red dots for the observed frequency.
Permanent Citation