RNG draw, in full
Draw machines need a studio, staff and several minutes. That works for a twice-weekly game and not at all for keno, which draws every few minutes, or for daily digit games running several times a day. Operators running high-frequency products use a random number generator instead, usually a dedicated device kept in a secured room and isolated from any network.
The generators used are not the ordinary pseudorandom functions built into programming languages. Lottery and gaming RNGs are typically hardware devices gathering entropy from a physical process, or standards-conformant deterministic generators of the kind NIST specifies in SP 800-90A, reseeded from such a source. The requirement is that past outputs give no usable information about future ones. That is a stronger property than merely looking random, and an ordinary seeded generator does not provide it.
Certification is where the trust actually sits. Before a generator is approved, an independent test laboratory reviews the source code and the hardware, runs statistical test batteries against millions of outputs, and checks the mapping from raw bits to game outcomes for bias. After approval the regulator typically requires signed software builds, tamper-evident seals, restricted physical access, logging of every draw and periodic re-testing.
The mapping step is where a correct generator can still produce a biased game, because turning a uniform 32-bit integer into a number from 1 to 49 by remainder does not divide evenly. The fix is rejection sampling, which this site's tools apply too.
- Lottery mechanics
- Computerised draw, Certified RNG draw
A worked example
To draw a number from 1 to 49 out of a 32-bit generator, compute limit = floor(2^32 / 49) × 49 = 87,652,393 × 49 = 4,294,967,257. Draw a 32-bit value, discard it if it is 4,294,967,257 or higher, then return 1 + (value mod 49). Only 39 of the 4,294,967,296 possible values are ever thrown away, and every number from 1 to 49 ends up exactly equally likely.
Sources
Deterministic generators approved for security use are specified by NIST, built on hash functions or block ciphers, and seeded from an entropy source rather than a chosen value.
NIST SP 800-90A Rev. 1, Recommendation for Random Number Generation Using Deterministic Random Bit Generators (June 2015)
See also
Where it comes up on this site
RNG draw: frequently asked
Not inherently. A certified generator is tested against statistical batteries and audited; a ball machine is inspected and weighed. Both fail if the controls around them are weak. What balls have is watchability, which is a transparency argument rather than a fairness one, and it is most of why the big broadcast games have stayed with them.
Mostly the fast ones. Keno draws every few minutes; a studio cannot keep up. Operators publish the method for each game.