Coding the Wheel

The Coin Flip: A Fundamentally Unfair Proposition?

Sunday, March 29, 2009

Have you ever flipped a coin as a way of deciding something with another person? The answer is probably yes. And you probably did so assuming you were getting a fair deal, because, as everybody knows, a coin is equally likely to show heads or tails after a single flip—unless it's been shaved or weighted or has a week-old smear of coffee on its underbelly. 

So when your friend places a coin on his thumb and says "call it in the air", you realize that it doesn't really matter whether you pick heads or tails. Every person has a preference, of course—heads or tails might feel "luckier" to you—but logically the chances are equal.

Or are they?

Granted, everybody knows that newly-minted coins are born with tiny imperfections, minute deviations introduced by the fabrication process. Everybody knows that, over time, a coin will wear and tear, picking up scratches, dings, dents, bacteria, and finger-grease. And everybody knows that these imperfections can affect the physics of the coin flip, biasing the results by some infinitesimal amount which in practice we ignore.

But let's assume that's not the case.

Let's assume the coin is fabricated perfectly, down to the last vigintillionth of a yoctometer. And, since it's possible to train one's thumb to flip a coin such that it comes up heads or tails a huge percentage of the time, let's assume the person flipping the coin isn't a magician or a prestidigitator. In other words, let's assume both a perfect coin and an honest toss, such as the kind you might make with a friend to decide who pays for lunch.

In that case there's an absolute right and wrong answer to the age-old question...

Heads or tails?

...because the two outcomes of a typical coin flip are not equally likely.

The 50-50 proposition is actually more of a 51-49 proposition, if not worse. The sacred coin flip exhibits (at minimum) a whopping 1% bias, and possibly much more. 1% may not sound like a lot, but it's more than the typical casino edge in a game of blackjack or slots. What's more, you can take advantage of this little-known fact to give yourself an edge in all future coin-flip battles.

The Physics of Coin Flipping

In the 31-page Dynamical Bias in the Coin Toss, Persi Diaconis, Susan Holmes, and Richard Montgomery lay out the theory and practice of coin-flipping to a degree that's just, well, downright intimidating. 

Suffice to say their approach involved a lot of physics, a lot of math, motion-capture cameras, random experimentation, and an automated "coin-flipper" device capable of flipping a coin and producing Heads 100% of the time.

Here are the broad strokes of their research:

  1. If the coin is tossed and caught, it has about a 51% chance of landing on the same face it was launched. (If it starts out as heads, there's a 51% chance it will end as heads).
  2. If the coin is spun, rather than tossed, it can have a much-larger-than-50% chance of ending with the heavier side down. Spun coins can exhibit "huge bias" (some spun coins will fall tails-up 80% of the time).
  3. If the coin is tossed and allowed to clatter to the floor, this probably adds randomness.
  4. If the coin is tossed and allowed to clatter to the floor where it spins, as will sometimes happen, the above spinning bias probably comes into play.
  5. A coin will land on its edge around 1 in 6000 throws, creating a flipistic singularity.
  6. The same initial coin-flipping conditions produce the same coin flip result. That is, there's a certain amount of determinism to the coin flip.
  7. A more robust coin toss (more revolutions) decreases the bias.

The 51% figure in Premise 1 is a bit curious and, when I first saw it, I assumed it was a minor bias introduced by the fact that the "heads" side of the coin has more decoration than the "tails" side, making it heavier. But it turns out that this sort of imbalance has virtually no effect unless you spin the coin on its edge, in which case you'll see a huge bias. The reason a typical coin toss is 51-49 and not 50-50 has nothing to do with the asymmetry of the coin and everything to do with the aggregate amount of time the coin spends in each state, as it flips through space.

A good way of thinking about this is by looking at the ratio of odd numbers to even numbers when you start counting from 1.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

No matter how long you count, you'll find that at any given point, one of two things will be true:

  • You've touched more odd numbers than even numbers
  • You've touched an equal amount of odd numbers and even numbers

What will never happen, is this:

  • You've touched more even numbers than odd numbers.

Similarly, consider a coin, launched in the "heads" position, flipping heads over tails through the ether:

H T H T H T H T H T H T H T H T H T H T H T H T H

At any given point in time, either the coin will have spent equal time in the Heads and Tails states, or it will have spent more time in the Heads state. In the aggregate, it's slightly more likely that the coin shows Heads at a given point in time—including whatever time the coin is caught. And vice-versa if you start the coin-flip from the Tails position.

The Strategy of Coin Flipping

Unlike the article on the edge in a game of blackjack mentioned previously, I've never seen a description of "coin flipping strategy" which takes the above science into count. When it's a true 50-50 toss, there is no strategy. But if we take it as granted, or at least possible, that a coin flip does indeed exhibit a 1% or more bias, then the following rules of thumb might apply.

  1. Always be the chooser, if possible. This allows you to leverage Premise 1 or Premise 2 for those extra percentage points.
  2. Always be the tosser, if you can. This protects you from virtuoso coin-flippers who are able to leverage Premise 6 to produce a desired outcome. It also protects you against the added randomness (read: fairness) introduced by flippers who will occasionally, without rhyme or reason, invert the coin in their palm before revealing. Tricksy Hobbitses.
  3. Don't allow the same person to both toss and choose. Unless, of course, that person is you.
  4. If the coin is being tossed, and you're the chooser, always choose the side that's initially face down. According to Premise 1, you'd always choose the side that's initially face up, but most people, upon flipping a coin, will invert it into their other palm before revealing. Hence, you choose the opposite side, but you get the same 1% advantage. Of course, if you happen to know that a particular flipper doesn't do this, use your better judgment.
  5. If you are the tosser but not the chooser, sometimes invert the coin into your other palm after catching, and sometimes don't. This protects you against people who follow Rule 4 blindly by assuming you'll either invert the coin or you won't.
  6. If the coin is being spun rather than tossed, always choose whichever side is lightest. On a typical coin, the "Heads" side of the coin will have more "stuff" engraved on it, causing Tails to show up more frequently than it should. Choosing Tails in this situation is usually the power play.
  7. Never under any circumstances agree to a coin spin if you're not the chooser. This opens you up to a devastating attack if your opponent is aware of Premise 2.

I hope I've made it clear that none of this is really to be taken seriously. The point is that adding even 1% of wobble to a situation of pure chance can create a lot of additional complexity, and that in turn, can create strategy where none existed before.

Tags: probability, coin flipping

54 comment(s)

Great little article. I very much enjoyed this.

I would add to your "coin flip strategy" that if you suspect you're facing a "virtuoso tosser" and he won't let you do the toss, make him toss it on the ground.

Cheers.

Lol. Interesting.

I may be mistaken here, but I believe your term "one vigintillionth of a yoctometer" is below the Plank length, making it so small as to be meaningless. Been a while since I looked at this stuff (college in fact) but...

http://en.wikipedia.org/wiki/Planck_length

that's the point.

Awesome article. Really enjoyed reading it and having a break from the indepth computer science. Thanks.

One vigintillionth of a yoctometer? Major phail! If we're throwing away practical concerns, we should atleast adhere to realm of the theoretically possible.

Jokes aside, nice article. For a moment, I was thinking that, even given your explanation of the inherent bias, it doesn't make sense since the coin would never land in the position it started at without flipping, as that would really be an invalid flip. But then, I guess all you do is move the minimum number of flips ahead to 2 or 3, and the state of the coin there is your new "initial" state, and you can set up the same argument. Nice.

However, I wonder what the case would be if one started the coin at a half-flip, on its edge? You might say that the initial face would correspond to the next face to show up after it performs a half-flip. But instead of a half-flip, what if you had just behind a half-flip? What about a quarter flip? I don't know a good line of reasoning to take care of these cases, it almost seems arbitrary.

And of course, it's totally pointless too. But who cares, interesting nonetheless!

Another strategy. If not obvious:

  1. If you are the tosser, and not the chooser, flip the coin into your palm after the toss only if they pick the face up side.

You missed an important strategy.

I used to earn lunch money in high school thusly: I could flip a coin to come out "heads" about 90% of the time (with practice, same as knife throwing, control # of flips through the air during a certain time between flip and catch).

Anyhow, I flip, you call while in the air. I catch and you most always lose because after you call it in the air, I choose to catch, or catch and invert (your #5. above). You assume it was fair because you called it in the air. No one ever figured out what I was doing (or I would have been beaten up!).

Persi Diaconis is also the guy who did the (often-misquoted) research into how many times you should shuffle a deck of cards.

So, to paraphrase Vizzini:

"But it's so simple. All I have to do is divine from what I know of you: are you the sort of man who would put the coin into his own hand or his enemy's? Now, a clever man would put the coin into his own hand, because he would know that only a great fool would request to make the call. I am not a great fool, so I can clearly not choose the side facing up. But you must have known I was not a great fool, you would have counted on it, so I can clearly not choose the side facing down."

But we all know how Vizzini ended up. Ha ha ha ha ha ha ha! Ha ha...

Just found your blog and have read quite a few of your posts - excellent job. I think you're explanation of why it's 51% is suspect however. In fact the paper does show that a coin flipped without precession does have a 50/50 chance (even though your H T H T H T H argument would still apply). But with precession the coin will spend a greater frequency of it's time in the starting position (in fact with enough precession it will appear to flip but be 100% in the up position - alas I can not seem to master that). If you take a coin and manually flip it end over end while precessing it at the same time you can kind of visualize this. In the case without precession it's irrelevant that it starts as heads or tails. What's relevant is that after flipping the coin spends equal amounts of time in the air in both states. Again with precession this is not true. Apparently their experiments showed that a typical coin flip done by hand precesses enough to give the 1% bias.

How did you get the 1 in 6000 figure for ending up on it's edge?

Seems low to my thinking. BTW, happened to me, a long time ago over who buys the next pitcher of beer.

I never met anyone else who has seen a coin land on its edge.

A couple days ago I flipped a coin (nickel) and it landed, rolled, and stayed on edge. It was a new nickel and a flat (glass) table but it happened.

One of the more interesting "light reading" posts I've come across in weeks.

I'm neither a mathematician nor a physicist, having found my way here via the link from Freakonomics (I suppose I should say I'm not an economist either), but I think the HTHT analysis would lead to a conclusion opposite to the one given here.

If we assume that the coin is in fact flipped, and not simply "moved from Point A to Point B by a process that may or may not involve flipping," then isn't it correct to deem the initial state of a flipped coin as being 180 degrees revolved from its state in the flipper's hand? If so (and that seems right to me), the HTHT analysis leads to the conclusion that the side of the coin more likely to be up at the end of the flip is the side that was down in the flipper's hands.

I would appreciate a strategy for Two-up Two-up is a traditional Australian gambling game, involving a designated 'Spinner' throwing two coins into the air. Traditionally, these coins are pennies. Incidentally, their weight size and surface design make them ideal for the game. Weight and size make them stable on the 'kip' and easy to spin in the air. Decimal coins are generally considered to be too small and light and they don't 'fly' so well. The design of pennies that date pre 1939 had the soveriegns head on the obverse(front) and the reverse was totally covered in writing making the result very easy and quick to see. Pennies can often be obseved being used at games on Anzac Day, they are and brought out specifically for the purpose each year.

Players gamble on whether the coins will fall with both (obverse) heads up, both (reverse) tails up, or with one coin a head, and one a tail (known as 'Odds'). It is traditionally played on ANZAC Day in pubs and clubs throughout Australia, in part to mark a shared experience with Diggers through the ages.

"Let's assume the coin is fabricated perfectly, down to the last vigintillionth of a yoctometer."

Its not. The research is highly biased based on the perfect flip and the coin not being a perfect coin.

On top of this, the coin may be flipped 500 million times showing a 51-49, but you could flip it 1 trillion times resulting in 50-50.

If I gave Sally half my meal, am I left with 49% or 50%? Yeah...

If anything, its more likely the coin has a 49.99999999....-49.9999999 probability, giving room for the randomness of variables like the blatant bias in this research.

Impresive reasearch man...

The aggregate time hypothesis doesn't work. If you just shift the frame to the, say, third flip in the air - since it's highly unlikely that the coin will land before it's third flip - you'll get the same argument reversed. I.e., if I start with heads, let it flip 3 times with tails up, and then start counting aggregate time, I'll get a THTHTHTHT... pattern and tails will now win 51% of the time.

I used to work with a guy who was sure that coins had memory.

To him if you had a fair coin and you flipped it 100 times and got heads the odds would be better that you would get a tail on the next flip. No matter how I explained it to him he would not believe that it was still 50/50.

I asked him how the coin "remembered what it's last 100 flips were?"

Not a single Rosencrantz & Guildenstern Are Dead reference? For shame!

"A weaker man might be moved to re-examine his faith, if in nothing else at least in the law of probability."

Fascinating piece, by the way.

I'm afraid that the HTHTH... argument appears to me to be completely bogus.

The only reason that there might be one more heads is that you decided to start counting on heads. Why did you start counting on heads? Because that was what was showing in the beginning, when it was resting on the thumb.

But you could equally argue that that is the very worst place to start counting. A coin flip isn't a coin flip if it doesn't leave the thumb. Indeed, it has to have at least one flip. Therefore, it is completely impossible that the first H would ever be counted.

So you could make an equally good argument saying

[quote]Similarly, consider a coin, launched in the "heads" position, flipping heads over tails through the ether. After the first flip, naturally, it will be on Tails:

T H T H T H T H T H T H T H T H T H T H T H T H T

At any given point in time, either the coin will have spent equal time in the Heads and Tails states, or it will have spent more time in the Tails state.[/quote]

This argument sounds just as reasonable as the first one, if not more so, which implies to me that the whole argument doesn't work.

Note that if this [b]did[/b] make sense, then the coin would show a bias of much, much more than 51%, because the coin would have to flip at least 100 times before the effect of that "first side" bias, were it true, was as low as 1%. Since most coin flips are under 100 flips, the "first side" bias by your argument would be much higher (in your example, 52% of the options are Heads).

[i]>The thing is, the "HTHTH" argument was a simplification (mentioned briefly in the post & comments above) ie a way of thinking about how the coin is spending its time in the aggregate[/i]

Yes, but you do specifically say that the reason (according to you) that the coin spends more of its time on "Heads" is that there are more H's then T's in your sequence, and that this is because you started with "H."

Simplification or not, this is fundamentally a wrong way to look at it, as several people have said. The problem with your approach is that it all depends on where you start counting, and you can pick wherever you want depending on what you want to prove, which is not good physics. The article doesn't suggest your explanation.

Although the article doesn't appear to suggest any explanation, a better explanation of the idea that the coin spends more time on one face than the other "in aggregate" would be one where this really is displayed where ever you start counting from. For example, the following argument, though not necessarily true, displays this property:

[quote]"Due to the asymmetry of flipping, the coin spends more time in the 360 degree flipped position than the 180 degree flipped position. If we write out the sequence showing what face is showing at time T, with the dT between values being 0.01 s, it would look like

....2211111122211111222111111222...

as you can see, it spends more time on the first face ("1") than the second, so is more likely to be caught when displaying the first face."[/quote]

This argument, while probably incorrect and not supported by the article, at least is an explanation that doesn't depend on whether you start counting when the coin being on your thumb or after the first flip.

I'm surprised no one mentioned (or at least I didn't notice) the fair coin flip where it doesn't matter whether the coin is biased or not. It can be done in the following way:

Flip coin two times. If it ends up HT or TH, the result is the first one of the sequence. If it ends up HH or TT, continue flipping it again two times until you get HT or TH.

p(1-p) = (1-p)p

Agree with Stephen. Good idea!

Disagree with SamSam: the research clearly states the coin is biased based on where it starts.

Disagree with the author: it has nothing to do with aggregate time. The precession/wobbling of the coin around it's horizontal center of gravity is what creates the bias. At least that's my reading of the research.

You're all wrong.

Very nice written, very clear and contains useful link to original research...only one problem with the above that seemed to me immediately clear: there's no empirical data supporting it's main conclusion of a 1% bias. Not even "my friend Jim and other graduate students tossed a coin drawn from circulation ..." With a Ph.D in probability theory from Oxford I persisted and skimmed the origianl research (I have been developing my skimming skills by working on the redacted parts of the CIA's Inspector General's report - I have become most adept at getting through the large black blanks.) Low and behold I find in the original article on page 10 the staement that no empirical data has been found to support the hypothesis.

The coins studied have been gussied up like kids going to a party... faces painted, ribbons attached etc. Without real experiments on mature coins (those drawn from circulation), the conclusions here seems highly questionable.

@Sitelinker "I asked him how the coin "remembered what it's last 100 flips were?""

Same way a photon remembers entanglement ;)

No Snow Crash quotes after the Neal Stephenson comment? For shame people!

so best to get random is what? not let it spin and then let it hit the ground? interesting

Nice stuff, but lacking a dimension: it doesn't take into account the intent of the observers which can influence the outcome. If random number generators can be influenced, then so can coins.

I regret I didn't take interest in Physics during my high school

Finally, an article I really enjoyed that did not have anything to do with work. Love the math and a great explanation on the strategy.

duuuuuude............................!!!!!!!!!!!!!!!! i never realized that there was an actual physics aspect to the whole coin flipping fiasco.........buts that's sooooooooooooooooooo sick!!!!!!!!!! whoever wrote this and went through all the trouble, keep rocking on homey!!!!!!!!!!!!!

What an interesting story! I am going to try it at lunch. We can flip a coin to see who pays for lunch.

James, your article was briefly referenced in the September 15, 2009 issue of Bruce Schneier's Crypto-Gram, which may generate some renewed interest. In fact, that's probably what drew Robert here.

There's also a discussion of your Physics of Coin Flipping explanation in the Science, Mathematics, Medicine, and Technology forum of the James Randi Educational Foundation website.

September 15, 2009 Cryptogram: http://www.schneier.com/crypto-gram-0909.html

JREF discussion: http://forums.randi.org/showthread.php?t=153942

test

RE Premise 1, the number of flips would be more of a factor on which side the coin landed...

as the number of flips in one toss increases, the ratio of time spent in each state would oscillate between greater-than-1:1 and 1:1, and approach a limit of 1:1 to 1:1.

Starting on H and assuming a constant spin rate & time on one side = t, the ratio of time on each side would be Ht, Ht:Tt, H2t:Tt, H2t:T2t, H3t:T*2t,...

(that's 1:0, 1:1, 2:1, 1:1, 3:2, 1:1, 4:3, 1:1, 5:4, 1:1, 6:5, 1:1, 7:6,...)

(H yoctoflipst):(T yoctoflipst) = 1:1 (50/50),

((H yoctoflips+1)t:(T yoctoflipst) = (pretty-darned-close-to-1):1 (~50/50)

So the fewer flips, the greater the likelyhood of the coin landing with its initial face in the same state. Greater only means greater = not less than or equal to.

While I think it was fair to say the odds increased. Quantifying the increase involved voodoo & was clearly used for illustrative purposes only.

Great article! A+

and Bruce sent me, too :-)

Great article. Although I have to say that almost every person I have ever known to do a coin-toss uses the palm invert trick to add that element of "manual randomness" . Which ...even if every coin in a coin toss IS geared slightly biased and lands on heads more of the time, by flipping it you're now making it biased for the other side of the coin.

A trick I always use is to vigorously rub on one side for 30 seconds before using it. The heat seems to have an effect such as to land heated side down 54.3% of the time

Interesting - apart from the Physics & Mathematics involved, there are some interesting conclusions that can be drawn from Statistics - eg to do with runs of heads or tails.

But - have you done any similar analysis on dice - eg is there any bias on the die, assuming it is not intentionally biased? As a first step, try throwing it a few tens of thousands of times (get a few friends to assist to save some time) and see if the frequency of each number (1 to 6) is the same (within the expected limits forecast from statistical theory).

Interesting coin flipping research. I am going to use this new knowledge and make bets for lunch with my [url=http://www.obama4poker.com/]online poker[/url] friends, hopefully I will save some money.

Coin tossing is a simple and unbiased way of settling a dispute or deciding between two or more arbitrary options. In a game theoretic analysis it provides even odds to both sides involved, requiring little effort and preventing the dispute from escalating into a struggle <a href="http://www.goarticles.com/cgi-bin/author.cgi?C=170113">Daniel Manson</a>

So many articles have been written about this and yet still being written. Yawn.

Nice Web

And what if the coin doesn't fall at all?

G

Coin tossing is very familiar among people of commonwealth countries, especially India, Pakistan and Australia. In these cricket crazy nations (especially India where “cricket is our religion and Sachin is our god”) cricket is very popular and coin tossing is a very decisive factor in winning. I still remember waiting anxiously for Ravi Shastri to say “Saurav Ganguly has won the toss and India will bat first”. Anyways, a very interesting article. It is one of those articles that give us information, which produces an Aha!

I'm not sure if I understand this correctly, but you say that the reason (or at least the main one) for the 1% offset in percentages when a coin is flipped and caught is because of the whole HTHTHTHTH... sequence thing? Well, in that case the probability of it ending up in a the state it started in would be 51% only if there were about 100 flips in the air. However, I'm sure the actual number of flips when you flip a coin is more than that? Has anyone measured this? In that case, the offset is probably a lot less than 1%.

I just want to say thank you for sharing your information and your site or blog this is simple but nice article I have ever seen i like it i learn something today.. shears

Well did not know if there is such physics behind the coin flipping.

Regards Sam Jack

Helo admin, i like this article and got info.this is very nice and popular site ,it site have informative and intrusting .i want to more info and i will open next soon.

That is insane.

that is very interesting.I love your article.

Use the form below to leave a comment.






Subscribe to Coding the Wheel over email or through any RSS reader. Coding the Wheel has been published since 2008.

Home | About | Contact | Subscribe Copyright © 2011 | All Rights Reserved