4 ms·
It appears to be uniform. I tested empirically in Python: https://pastebin.com/raw/ca03uywJ https://pastebin.com/raw/ca03uywJ
by keefe8 4y ago
It appears to be uniform. I tested empirically in Python:
https://pastebin.com/raw/ca03uywJ https://pastebin.com/raw/ca03uywJ
- toxicFork 4y agohttps://codepen.io/toxicfork/pen/OJQzLba https://codepen.io/toxicfork/pen/OJQzLba This says otherwise
- Malipeddi 4y agoNormal distribution is not the same as uniform distribution. I edited in a normal distribution sampler in your codepen example. https://pastebin.com/raw/CP4yNRE9 https://pastebin.com/raw/CP4yNRE9
- toxicFork 4y agoI see, thanks!
- eru 4y agoBtw, the following two are equivalent (in JavaScript syntax): var a = Math.max(Math.random(), Math.random()); var b = Math.sqrt(Math.random());
- toxicFork 4y agoCurious, how come? Does it become a statistical thing?
- eru 4y agoWell, not sure whether you'd call it statistics. It's a mathematical fact from probability theory. And it doesn't matter how often you sample: the distributions themselves are the same. I came across that one in the other direction, when trying to work out how to make weighted rendezvous hashing work. See https://en.wikipedia.org/wiki/Rendezvous_hashing https://en.wikipedia.org/wiki/Rendezvous_hashing
- keefe8 4y agoI meant to show the output of my code, but Pasteboard was down at the time: https://gcdnb.pbrd.co/images/f8bgGZMW3deq.png?o=1 https://gcdnb.pbrd.co/images/f8bgGZMW3deq.png?o=1