2 ms·
As with cryptography, it's probably dangerous to "roll your own random" if the randomness matters. The author already mentions both the point about cryptograph
by JadeNB 9y ago
As with cryptography, it's probably dangerous to "roll your own random" if the randomness matters. The author already mentions both the point about cryptography, and the dangers of plausibility arguments about randomness: an intuitively plausible way of picking a random point from a sphere doesn't give a uniform distribution.
Playing around with distributions as the author does is surely fine if you just want to get something that "feels right", but if the applications depend on precise randomness properties, then, for example, "let's just multiply these two PDFs" is dangerous (not least because the result is almost guaranteed not to be a PDF, and may not even be normaliseable to one).
Although it surely won't be applied for random f (no pun intended), the transformation from P(f(u) ≤ x) to P(u ≤ f^(-1)(x)) relies very much on f being (strictly, in order to have an inverse) increasing—so it's even dangerous to use f(x) = x^2 if we don't know that u is non-negative-valued.
- mjevans 9y agoThere's a difference between using a library (hopefully) maintained by those more expert in a field and in using the output it provides. Using the output of RNG still requires some skill, but that's about designing a "fair" set of rules. Not a better way of obtaining truly random, random enough, or plausibly pseudo-random numbers from a given system. As the article discussed, there are times when a designer might want to add in bias to make the response of the system fit within desired constraints. One such example might be a load balancing daemon removing targets from a distribution entirely if they are either unresponsive or under sufficiently greater load (relative to other targets).