Continuous Monte Carlo simulation rolling two 6-sided dice 4 times per second (8 dice
total) to observe central limit convergence across sums 2–12.
| Sum | Combinations | Theoretical % | Observed Count | Observed % | Variance |
|---|
The generator produces pseudo-random uniform integers [1, 6]
for each die and compiles discrete frequency distribution bins for sums [2, 12].
function rollDice() {
const d1 = Math.floor(Math.random() * 6) + 1;
const d2 = Math.floor(Math.random() * 6) + 1;
return d1 + d2;
}