3 ms·
Though I agree we have good solutions to this, I also think it's a more nuanced problem than it seems at first glance. See for example this stack overflow post:
by sgillen 5y ago
Though I agree we have good solutions to this, I also think it's a more nuanced problem than it seems at first glance. See for example this stack overflow post: https://stackoverflow.com/questions/75677/converting-a-uniform-distribution-to-a-normal-distribution https://stackoverflow.com/questions/75677/converting-a-unifo.... To convert uniform to a Gaussian there are at least four different competing methods, all with subtle tradeoffs. Besides that there are certainly other continuous distributions we might be interested in transforming to, which are useful but not as nice as a Gaussian.
- TheDudeMan 5y ago> there are at least four different competing methods, all with subtle tradeoffs So choose one at random for each sample :)
- dwohnitmok 5y ago> there are at least four different competing methods, all with subtle tradeoffs. As is the case with most implementations of things, even elementary things, that have to do with the real numbers on discrete hardware (see numerical integration, square roots and inverses, trig functions, various approximations of the real numbers themselves, etc.). Real numbers are hard. It's a blessing only a minority of computer programs need to actually deal with them (or their approximations).
- dahart 5y agoMethods to simulate a Normal distribution doesn’t really help you simulate a measured distribution of data, which was the stated problem, wasn’t it? The parent comment’s suggestion to use the tabulated Inverse Transform method is already likely to be the optimal choice for simulating a discrete data distribution. There’s one alternative called the Alias Method that is fast to sample, but uses a discontinuous mapping so it compromises your ability to benefit from stratified or Quasi-Random sampling, which means it loses significant efficiency for Monte Carlo applications and thus doesn’t get used very often. (This is true of Ziggurat as well, and aside from Ziggurat the SO page you linked only has two other decent suggestions and one of them is the Inverse Transform method. Box-Muller is historically interesting, but I think doesn’t really “compete”.) So, anyway, FWIW, it doesn’t really seem super nuanced. I’m guessing the article’s author was just writing for a non-technical audience and isn’t clearly stating the problems being investigated by the COINFLIPS team.