5 ms·
This is pleasingly insane, congratulations! Is there a program to test the fairness of a given dice or coin? Is that a program that's even feasible to write?
by mattbee 2y ago
This is pleasingly insane, congratulations! Is there a program to test the fairness of a given dice or coin? Is that a program that's even feasible to write?
- jdmoreira 2y agoYou can measure the Shannon entropy of a sequence
- Jerrrrrrry 2y ago....you can do that using our universe's physical constants too. Care to elaborate? Or link? I mean, everything that is, is just displaced temporarily homogeneous complexity, allowable between the fluctuations of gradients of temperature, allowing the illusion of work to appear more than just energy dissipating into the either of expanding space-time, dragged by the irreconcilability idea of "gravity". But that doesn't help bake an Apple pie from scratch, as Carl Sagan would put it.
- jdmoreira 2y agohttps://stackoverflow.com/questions/990477/how-to-calculate-the-entropy-of-a-file https://stackoverflow.com/questions/990477/how-to-calculate-...
- t0mek 2y agoI love the slow pace of the video, including a few minutes presentation of all available programs. And indeed, there are programs to test dice and coin bias: * https://youtu.be/bJiOia5PoGE?si=IEhbNJk0C0-7_2Nj&t=229 https://youtu.be/bJiOia5PoGE?si=IEhbNJk0C0-7_2Nj&t=229 * https://youtu.be/bJiOia5PoGE?si=3Se3lYFVAAkElx0w&t=245 https://youtu.be/bJiOia5PoGE?si=3Se3lYFVAAkElx0w&t=245
- vikingerik 2y agoYou've always got the standard way to get fair random numbers from a fairness-unknown coin. Flip it twice. Restart if you get both heads or both tails. If you get H then T or T then H, those are equally probable, so take the first one of those as the final outcome. This generalizes to a die of N sides. Roll it N times. If you don't get all N distinct results, restart. If you do, then take the first result as your final outcome. (That may take a lot of trials for large N. It can be broken down by prime factorization, like roll 2-sided and 3-sided objects separately, and combine them for a d6 result.)
- eddd-ddde 2y agoHmm my intuition isn't agreeing with this. Does this have a name so I can read more about it?
- shmageggy 2y agoVon Neumann randomness extractor https://en.m.wikipedia.org/wiki/Randomness_extractor#Von_Neumann_extractor https://en.m.wikipedia.org/wiki/Randomness_extractor#Von_Neu...
- Jerrrrrrry 2y agoI have the humility to admit that this, despite everything I pretend to know, has always escaped my understanding. Someone please (jump?) at the chance to explain this one to me. (assume i failed 9th grade 3 times)
- voldacar 2y agoThe key assumption is that T and H may not have the same probability, but each flip isn't correlated with past or future flips. Therefore, TH and HT have the same probability. So you can think of TH as "A" and HT as "B" then you repeatedly flip twice until you get one of those outcomes. So now your coin outputs A and B with equal probability.
- Jerrrrrrry 2y agoI feel like I am missing something so obvious that I feel the need to correct wiki, but that likely means I am fundamentally missing the point. "The Von Neumann extractor can be shown to produce a uniform output even if the distribution of input bits is not uniform so long as each bit has the same probability of being "one"->[first] and there is no correlation between successive bits.[7]" As long as the person doesn't favor which of the two bits they chose is "first", then it should appear as random. But that is self-defeating, as if the person had the capability to unbiased-ly choose between two binaries, they wouldn't need the coin. But since the only way to determine the variation from expectation is repeatedly increasing sample size, I don't see how doing it twice, and just taking encoding of the bits, then... Is the magic in the XOR step? To eliminate the most obvious bias (1v5 coin), until all that could had been left was incidental? Then, always taking the first bit, to avoid the prior/a priori requisite of not having a fair coin/choosing between two options? and it clicked. Rubber duck debugging, chain of thought, etc. I will actually feel better now.