The Fall Of The Random Coin Toss |

Written by Harry Fairhead |

Wednesday, 11 October 2023 |

Randomness is hard - to produce and to understand. If you thought that the archetype of randomness was the iconic coin toss, some researchers have some important news for you - the coin tends to land on the same side it started with. How can this be and what can be done about it? Finding something that is truly physically random is a tough exercise, but the act of tossing a coin has long been thought to be 100% random for the simple reason that there seems to be no way that a coin toss can be influenced in any way to give a particular outcome. Although the actual coin toss is clearly 100% deterministic, there is no quantum mechanics involved and the coin obeys Newton's laws of motion, the final state is sensitive to the actual initial conditions and these are generally unknown anyway. It is randomness that originates from an almost chaotic process in the absence of complete information.
Coin tossing is such a trusted source of randomness that the recent paper lists some interesting outcomes:
And before you speculate about biased coins, there is lots of evidence that such a thing doesn't exist as long as the coin isn't bent or allowed to spin after it lands. The weight distribution of a coin doesn't influence which side it lands on. We use similar randomness in our pseudo random number generators - deterministic systems that are sensitive to initial conditions and ignorant of the seed value used to start the process. Even our physical random number generators are based on the same idea, although the deterministic system is usually something like noise in an electrical component or a count of a fast running timer. If you get involved in such things you quickly discover that ensuring good randomness is very, very difficult. But surely the same cannot be true of coin tossing? Of course not, so move along people nothing to see here. Not so fast ... In 2007 the paper:
proposed an unlikely mechanism operating in a simple coin toss. It seems the the flipping mechanism contains a bias. If you flip the coin in the usual way so that it spins, the spin induces an off-axis precession which tends to keep the initial up side face up in the air. As a result a coin has a bigger chance of landing with the a face up that corresponds to the face up at the initial toss. Analysis and experiment suggests that on average a same coin toss has a probability of 0.51 compared to a difference of 0.49. Now we have additional evidence that this is true. A group of 48 people tossed coins of 46 different currencies and denominations, obtaining a total number of 350,757 coin flips and:
So a coin toss is random unless you can set its intial starting configuration and know the call you want to realize. If your oponent calls heads and you want to win then start with tails facing up. What is also interesting is:
So be careful who you gamble with. Is the difference practically important?
So what can we do about it? The obvious thing to do is to improve the balance of heads or tails. To do this, hide the intial configuration before calling an outcome or apply a simple transformation, called "von Neumann whitening" after its inventor. a technique I introduce in my latest book, If you have a bitstream with unequal probabilities of a one or a zero you can transform it to a 0 on a change from 0 to 1 and a 1 on a change from 1 to 0 and discard bits pairs of bits that are equal, i.e. 00 and 11. There are obviously as many up-going edges as there are down-going edges so the number of ones and zeros is the same. What can you do to ensure a fair coin toss? Treat a single toss as not "head or tails" but "same or different". These have slightly different probabilities, so apply von Neumann whitening and toss twice, discarding repeated same or repeated different instances, using the final same or different as the head or tail outcome. The analysis is easy. If the probability of same is p and the probability of different is q=(1-p) then the probablitiy of: same twice is p*p different twice is q*q same followed by different p*q different followed by same q*p and so if you keep tossing and stop when you get a same followed by different or different followed by same you have equal probabilities. I'm not at all sure the whitening method will catch on - imagine trying to explain or implement it on a sports field... Randomness is hard. **Harry Fairhead**has a hardware background having worked with microprocessors and electronics in general, for many years. He is the author of,*Programming the Raspberry Pi Pico/W in C*, and*Programming the Raspberry Pi Pico/W in MicroPython*His latest book, is*Master the Raspberry Pi Pico in C: WiFi with lwIP & mbedtls.**Programming the ESP32 in MicroPython.*
## More InformationFair coins tend to land on the same side they started: Evidence from 350,757 Flips ## Related ArticlesHow not to shuffle - the Knuth Fisher-Yates algorithm The Programmer's Guide to Chaos ERNIE - A Random Number Generator John Von Neumann The Great Polymath Canada's RAND Immigration Lottery Not Random! Random Means Random - The Green Card Fiasco To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
## Comments
or email your comment to: comments@i-programmer.info <ASIN:187196282X> <ASIN:1871962811> <ASIN:1871962684> <ASIN:1871962692> |

Last Updated ( Wednesday, 11 October 2023 ) |