| Von Neumann described a very elegant way to get fair results from a biased coin. 1. Flip the coin twice 2. If you get the same result both times, goto 1 3. Now that you have different results for your pair of flips, use the first element of the pair of flips as your result. https://en.wikipedia.org/wiki/Fair_coin#Fair_results_from_a_... |
https://www.techiedelight.com/generate-fair-results-biased-c...
The coin is biased to come up TAILS 80% of the time, but using Von Neumann's method in the program I got HEADS 50.035%, TAILS 49.965%.