3 ms·
> what is a good way to generate a long sequence of reasonably random coin flips in one's head? I tried the modulo 2 length of the words in the text on the sit
by wwweston 8y ago
> what is a good way to generate a long sequence of reasonably random coin flips in one's head?
I tried the modulo 2 length of the words in the text on the site.
This was effective enough; at the end of three paragraphs the guesser had 50% correct and I had a positive balance. It's also pretty broadly applicable, there's a lot of texts in the world one could choose to use (anyone with a nearby bookshelf or internet connection is set, anyone who can memorize song lyrics, bible passages, poetry, etc doesn't even need that).
There's a reasonable question of whether this distribution is itself biased. If you take one list of the 500 most common English words (https://docs.google.com/spreadsheets/d/1qh3MvdKLfTadXWZMIsaqrz9OkGENALA1Vv_c9i0tyI0/edit?usp=sharing https://docs.google.com/spreadsheets/d/1qh3MvdKLfTadXWZMIsaq... ), it turns out that there are 278 with an even length and 222 odd, so that's an indication there may be an exploitable bias. There's also the question of whether relevant N-gram patterns confound that beyond recognition ... or add another layer of predictability.
But then again, there's such a wide variability in potential text choices and the function is so lossy (while being simple enough that most anyone could use it) that it seems like it's a pretty good choice for generating difficult to predict coin flip sequences.
- hervature 8y agoThis bias is pretty easy to overcome. Let’s denote E with even length words and O with odd length. If two words come up with EE or OO, discard, if it is EO use 0 and if OE then use 1. Same probability for both. This trades the bias for need more words.
- your-nanny 8y agothat's pretty good. In a pinch I was just choosing left/right depending on vowel or consonant, and flipping the rule every word or so. but the distribution is still a bit too tight.