CasinoMoneys · Est. 2017
You aren't risking real money on the CasinoMoneys roulette simulator. So why care about fairness at all? Two reasons. First, the educational point of the simulator is to show how probability behaves over time — if the underlying randomness is biased, every observed pattern, every house-edge curve, every strategy comparison becomes meaningless. Second, "fairness" in roulette has a specific technical meaning that is widely misunderstood: it is the difference between a uniformly random RNG and the long-run profitability of bets. The simulator gets the first right and is transparent about the second.
crypto.getRandomValues().The browser provides a built-in API called crypto.getRandomValues(). It is part of the Web Crypto API and is required to produce output that is statistically indistinguishable from true randomness, even to an adversary with significant computational resources. In practice, it draws bytes from the operating system's entropy pool — the same source that backs SSH keys, TLS session keys, password salts, and other security-critical operations.
This matters because earlier random functions like Math.random() are not cryptographically secure. Their internal state is small (typically 64 or 128 bits), and their output is in principle predictable if you observe enough samples. For a roulette simulator that wants to demonstrate the law of large numbers across thousands of spins, that potential weakness — however unlikely to ever matter in practice — is something the simulator avoids entirely.
| Property | Math.random() | crypto.getRandomValues() |
|---|---|---|
| Source | Engine-specific PRNG (xorshift, etc.) | OS entropy pool |
| Internal state | ~128 bits | ≥ 256 bits, continuously reseeded |
| Predictability | Theoretically possible from output | Computationally infeasible |
| Period | ~2128 | Effectively unbounded |
| Suitable for security? | No | Yes |
A common mistake when generating a random number in a range like 0–36 is to take a random byte and apply modulo: randomByte % 37. This looks fair but is subtly biased. A byte holds 256 possible values; 256 ÷ 37 = 6 with remainder 34. That remainder means values 0–33 each get seven chances (six full cycles plus one extra), while values 34–36 get only six. Over millions of spins, low numbers would appear ~16% more often than high numbers — a serious bias.
The simulator avoids this by using rejection sampling:
crypto.getRandomValues().The result: every pocket from 0 to 36 has exactly probability 1/37. No bias. The cost is occasional re-rolls, but with 32-bit input the rejection rate is so small (under 0.000001%) that it never causes a noticeable delay. American wheel spins use the same technique with modulus 38.
Generating fair randomness is one thing; demonstrating it visibly is another. The simulator's "Provably Random" panel runs a live chi-squared (χ²) test on every spin you make. The test compares observed pocket frequencies against the expected frequency (~2.7% per number on a European wheel) and reports a single number summarising how unusual the deviation is.
The verdict shown in the panel translates the χ² value to plain language: "Within expected range," "Slight deviation — keep spinning," or "Unusual — but a CSPRNG can still produce streaks." Note that small samples (under ~200 spins) almost always look uneven; the test stabilises around 1 000+ spins.
This is the most common point of confusion when people say a roulette wheel "isn't fair." A perfectly fair RNG, where each pocket has probability 1/37, still produces a long-term loss for the player. That is because of the payout structure — not the randomness.
| Bet | Win Probability | Payout | Expected Value per €1 |
|---|---|---|---|
| Red / Black (EU) | 18/37 = 48.65% | 1:1 | −€0.027 |
| Single number (EU) | 1/37 = 2.70% | 35:1 | −€0.027 |
| Six-line (EU) | 6/37 = 16.22% | 5:1 | −€0.027 |
| Red / Black (US) | 18/38 = 47.37% | 1:1 | −€0.053 |
Notice that every bet on the European wheel has the same negative expected value — 2.70% per €1. That is the house edge, baked into the payout odds, not the wheel. A fair RNG guarantees this loss in the long run; an unfair RNG might accidentally favour the player. So when you hear that an online casino "rigs" outcomes against players, that would in fact be statistically detectable using exactly the chi-squared test the simulator runs live.
The simulator runs entirely in your browser. There is no server-side random generator. You can confirm this:
getRandomValues to see the spin generator.If a casino were doing anything other than a fair draw, the data would be visible in the browser. The CasinoMoneys simulator is fully auditable.
Real-money online casinos use server-side RNGs that are audited by independent labs (eCOGRA, GLI, iTech Labs). Their RNG is typically a Mersenne Twister or a hardware-seeded variant. They publish certificates with chi-squared and Kolmogorov-Smirnov test results. The CasinoMoneys simulator uses a stronger generator (CSPRNG vs MT-19937) than most live casinos, but with one important caveat: real casinos must prove fairness after their RNG is locked behind their servers. Here, the entire process is in the open from the start.
crypto.getRandomValues() — cryptographic, OS-seeded.→ Back to the roulette simulator | → Roulette odds chart | → Do betting systems beat the house edge?
Statistics & Calculations
All probabilities are based on mathematical models assuming a perfectly fair, unbiased roulette wheel with independent spins. Real-world results may deviate. CasinoMoneys makes no warranty regarding accuracy or fitness for any particular purpose.
Not Gambling Advice
Nothing on this site constitutes financial or gambling advice. Content is for educational purposes only. The house edge means all roulette bets have negative expected value. Never gamble with money you cannot afford to lose.
No Liability
CasinoMoneys accepts no responsibility for any losses resulting from use of this website. All use is entirely at your own risk.
Responsible Gambling
🇸🇪 Stödlinjen.se — 020-819 100
🌍 GamblingTherapy.org
🌍 BeGambleAware.org