by shmageggy · 2y ago · 0 comments
https://en.m.wikipedia.org/wiki/Randomness_extractor#Von_Neu...
Someone please (jump?) at the chance to explain this one to me.
(assume i failed 9th grade 3 times)
"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.
There is only one coin, flipped _twice_; not a running occurrence, but in couples, perfectly simulating two coins functionally.
Once a literal couple of coins result in a XOR'd result eventually, no matter how biased - they differ - the exact ordinality of which will be random.
Two sides to a coin, no matter how random, still half the chance.
(for lurkers cringing at my subtle mis-understanding)
Say you have a biased coin. It lands heads 55% of the time (but you don't know that.) Then the probabilities are:
HH = (0.55 * 0.55) = 0.3025
TT = (0.45 * 0.45) = 0.2025
HT = (0.55 * 0.45) = 0.2475
TH = (0.45 * 0.55) = 0.2475
If you disregard the HH and TT results then the equal probabilities of HT and TH result in a perfect binary decider using a biased coin. You assign HT to one result and TH to the other.