Alex's Adventures in Numberland - Alex Bellos [140]
If we imagine that at a certain distance from the starting point in one direction there is a barrier, there is a 100 percent probability that eventually Coin Man will hit the barrier. The inevitability of this collision is very instructive when we analyse gambling patterns.
Instead of letting Coin Man’s random walk describe a physical journey, let it represent the value of his bank account. And let the coin flip be a gamble. Heads he wins £100, tails he loses £100. The value in his bank account will swing up and down in increasingly large waves. Let us say that the only barrier that will stop Coin Man playing is when the value of his account is £0. We know it is guaranteed he will get there. In other words, he will always go bankrupt. This phenomenon – that eventual impoverishment is a certainty – is known evocatively as gambler’s ruin.
Of course, no casino bets are as generous as the flipping of a coin (which has a payback percentage of 100). If the chances of losing are greater than the chances of winning, the map of the random walk drifts downward, rather than tracking the horizontal axis. In other words, bankruptcy looms quicker.
Random walks explain why gambling favours the very rich. Not only will it take much longer to go bankrupt, but there is also more chance that your random walk will occasionally meander upward. The secret of winning, for the rich or the poor, however, is knowing when to stop.
Inevitably, the mathematics of random walks contains some head-popping paradoxes. In the graphs chapter 9 where Coin Man moves up or down depending on the results of a coin toss, one would expect the graph of his random walk to regularly cross the horizontal axis. The coin gives a 50:50 chance of heads or tails, so perhaps we would expect him to spend an equal amount of time either side of his starting point. In fact, though, the opposite is true. If the coin is tossed infinitely many times, the most likely number of times he will swap sides is zero. The next most likely number is one, then two, three and so on.
For finite numbers of tosses there are still some pretty odd results. William Feller calculated that if a coin is tossed every second for a year, there is a 1-in-20 chance that Coin Man will be on one side of the graph for more than 364 days and 10 hours. ‘Few people believe that a perfect coin will produce preposterous sequences in which no change of [side] occurs for millions of trials in succession, and yet this is what a good coin will do rather regularly,’ he wrote in An Introduction to Probability Theory and Its Applications. ‘If a modern educator or psychologist were to describe the long-run case histories of individual coin-tossing games, he would classify the majority of coins as maladjusted.’
While the wonderful counter-intuitions of randomness are exhilarating to pure mathematicians, they are also alluring to the dishonourable. Lack of a grasp of basic probability means that you can easily be conned. If you are ever tempted, for example, by a company that claims it can predict the sex of your baby, you are about to fall victim to one of the oldest scams in the book. Imagine I set up a company, which I’ll call BabyPredictor, that announces a scientific formula for predicting whether a baby will be a boy or a girl. BabyPredictor charges mothers a set fee for the prediction. Because of a formidable confidence in its formula, and the philanthropic generosity of its CEO, me, the company also offers a total refund if the prediction turns out to be wrong. Buying the prediction sounds like a good deal – since either BabyPredictor is correct, or it is wrong and you can get your money back. Unfortunately, however, BabyPredictor’s secret formula is actually the tossing of a coin. Heads I say the child will be a boy, tails it will be a girl. Probability tells me that I will be correct about half the time, since the ratio of boys to girls is about 50:50. Of course, half the time I will give the money back, but so what – since the other