Game Tech Cab 023
RNG Certification: What Testing Labs Check Before a Game Goes Live
- Reading minutes4 min

RNG certification is an independent check, usually carried out by an accredited testing laboratory, that a game's random number generator produces unpredictable, unbiased results and that the game turns those results into outcomes correctly. In regulated markets a game typically needs such a certificate before it can be offered, and the certificate applies to one specific version of the software. Change the code and the testing starts again.
The phrase sounds like a single stamp, but it covers several quite different examinations. Here is what they are, how the best-known statistical test works, and what a passed test can and cannot tell you.
What gets examined
- The generator itself. Testers read the source code to see which algorithm is used, how it is seeded and reseeded, and whether its internal state could be observed or guessed from outside. Our explainer on pseudo-random number generators covers why those questions matter.
- Raw output. Very large samples of numbers, often many millions, are run through batteries of statistical tests.
- Scaling and mapping. The step that turns a big raw number into a die face, a card position or a reel stop is checked for small biases, such as the remainder problem that can make some outcomes fractionally more common.
- Game outcomes. Reel stops, card distributions and shuffles are sampled to confirm they appear at the rates the design says, and the measured return is compared with the theoretical one, usually by long simulation.
- Integration. Testers look for anything that could alter a result after it has been drawn, reuse old numbers, or behave differently after a dropped connection.
- Version control. The approved files are recorded with a digital fingerprint, a checksum or hash, so a regulator can later confirm that the live game matches the certified one.
The statistical tests, in plain words
| Test | The question it asks | What a failure might look like |
|---|---|---|
| Frequency or chi-square | Does each value appear about as often as it should? | One die face turning up clearly more than a sixth of the time over millions of rolls |
| Runs | Are streaks as long and as common as chance predicts? | Results that alternate too neatly, or streaks that run too long too often |
| Serial correlation | Is each number unrelated to the one before it? | High numbers tending to follow high numbers |
| Gap | Are the gaps between repeats of a value spread as expected? | A value returning at suspiciously regular intervals |
| Shuffle tests | Does every card land in every position equally often? | The top card of a fresh deck staying near the top after shuffling |
Published test batteries such as the NIST statistical test suite, Diehard and TestU01 bundle dozens of checks of this kind, and laboratories typically add tests aimed at the particular game.
How a chi-square test works
Imagine a virtual die rolled 600 times. A fair die should show each face about 100 times, never exactly. Suppose the counts come out as 112, 95, 104, 88, 101 and 100. For each face, take the difference from 100, square it and divide by 100, then add the six results:
(144 + 25 + 16 + 144 + 1 + 0) ÷ 100 = 3.30.
That total is compared with a table for five degrees of freedom (one fewer than the number of faces). At the usual 5% significance level the threshold is about 11.07, so 3.30 is entirely unremarkable: the wobble looks like ordinary chance. A total far above the threshold would point to bias. Interestingly, a total very close to zero would also raise eyebrows, because real randomness is rarely that tidy. Labs run the same calculation on vastly bigger samples, where even small biases stand out.
Passing is not proving
Statistical tests can show that something is wrong; they can never show that everything is right. A generator passes when no test finds a pattern, which is why laboratories combine many different tests, very large samples and a review of the code itself. That combination is also why the simulation side matters so much, as explained in our article on Monte Carlo simulation.
After the certificate
- Changes mean re-testing. In many regulated markets an updated game has to go back through the process before release.
- Fingerprints are compared. Regulators can check that the files running live match the approved version.
- Live results are watched. Operators and regulators often compare actual payouts with the theoretical return over time, looking for drift that would suggest a fault.
Studios usually build with this in mind from the first day, a stage described in our walk-through of slot game development.
What certification does not mean
- It does not remove the house edge. A certified game still keeps its designed margin; the certificate confirms the margin is what the rules say, nothing more. Our guide to return to player explains that figure.
- It does not promise a session result. Fair randomness includes long losing runs.
- A logo alone is weak evidence. The licensing regulator's public register is the more reliable place to confirm an operator's status.
Certified fairness still comes with a built-in margin for the house. Online casino games are restricted to adults, should be paid for out of spare money set aside for fun, and are not legal everywhere, so check the position where you live before playing.