5 ms·
how do you sample from an arbitrary probability distribution? it is not a trivial problem at all
by medo-bear 5y ago
how do you sample from an arbitrary probability distribution? it is not a trivial problem at all
- kortex 5y agoWhy do you need an arbitrary distribution? We are talking about breaking ties, just use uniform. You can probably just use RDRAND.
- medo-bear 5y agoi agree. to break ties uniform distribution should be sufficient
- Hendrikto 5y agoThey are equivalent. Generating an arbitrary distribution from a uniform one is trivial.
- kortex 5y agoIf you are willing to accept lookup tables or approximations, then yeah, arbitrary distributions are trivial. However for certain domains, you may want a more closed form solution for mapping uniform to your distribution, which may not be obvious. E.g. I would say generating pink noise is not "trivial" because there is no closed form solution (c.f. generating gaussian distribution via Box-Muller, that is trivial), so you need to pick a method which may have tradeoffs.
- Hendrikto 5y agoIf you can sample from a uniform distribution, it is trivial to turn that into any arbitrary distribution.
- asxd 5y agoI guess I assumed the operative word was "good". The term "random number generator" almost always refers to a generator that intends to produce a uniform distribution.