4 ms·
Besides the point about a need to generate a large number of random numbers, there's another thing: you don't know the distribution of the true random generator
by GolDDranks 5y ago
Besides the point about a need to generate a large number of random numbers, there's another thing: you don't know the distribution of the true random generator exactly. You know it's random, but in addition to that, the distribution needs to be flat. That's why you use a PRNG with a known-to-be flat distribution to further process the entropy. As an interesting sidenote, though, Mersenne Twister doesn't have a particularly good distribution by modern standards. For this, I would use a cryptographically secure PRNG.
- tpxl 5y agoYou can generally turn any random binary distribution into a uniform binary distribution by generating two bits, then if they're different, output the first bit, and if they're the same, ignore the result.
- londons_explore 5y ago01 01 01 01 00 01 01 01 11 01 Doesn't seem to work... It depends on odd bits and even bits having the same distribution, which in many cases they won't.
- MauranKilom 5y agoYes, the draws from the random distribution must be uncorrelated. But the mentioned algorithm does indeed a "flat" output in this case.