Wednesday, June 26, 2013

Coin spinning, flipping, standing OR How to bias 'randomness' (Part I)

A few weeks ago, Zane Lamprey broke the Guinness Book of World Records record for "Longest live audio broadcast streamed over the internet" with 25 hours of non-stop broadcasting.  He also successfully funded his new show "Chug" through kickstarter, for those of you who ever saw his prior shows.

During this 25 hours Zane and his co-hosts and guests talked about a lot of stuff.  There was a limit of 5 seconds of continuous dead air, so they pretty much talked non-stop (especially Zane after learning about the 5 second rule).  One of the things they talked about was the idea that while coin flips are basically fair, coin spins tend to be a bit more biased.  Allegedly, it's even worse if you stand a coin on its edge and then bump the surface on which it's standing.



The general idea is that a coin flipped with enough velocity imparted into rotation is basically fair.  A coin flipped by someone looking to bias it may be able to shift that fairness slightly, and someone looking to professionally bias it for a living may be able to eradicate that fairness altogether.  Practically speaking, however, if you're trying to flip a coin in a fair way it's pretty easy to do so (e.g. get a good toss and spin on it, and don't pay attention to which side started up or down, or better yet have someone who hasn't seen this call it, etc).

Things happen differently when you stand a coin on its edge and then agitate the surface, or spin the coin instead of flipping it.  In both cases it is alleged that you'll see a lot more 'tails' results, at least on Lincoln Memorial pennies.

The bottom line is that a coin flip or spin is simply a system of knowable physical properties.  A physicist with enough gumption (these folks are mathematicians) could sit down and write a Lagrangian for the system to determine the outcome given starting conditions (e.g. position, initial velocity, initial height, etc).  I'm by no means saying that it would be easy, I'm just saying that it could be done.  [The easiest case to start on - those of you who have already opened their lab notebooks - might be the standing on edge case where the force comes from one side.]

Without such a Lagrangian, people like to just come up with reasons for things they observe, and then apply them without worrying about pesky things like the scientific method.


For instance, people who have examined this so far have come up with two main suggestions, the first far dominant over the second.

1) One side of the coin is heavier than the other, and so a spinning (or disturbed standing) coin will fall toward that side.  Thus, the other side will come up more often.

2) The way coins are struck leaves the edges to one side smoother than the other, and so a spinning (or disturbed standing) coin will fall toward that side.  Thus, the other side will come up more often.

Both would appear to make some sense, though warrant further examination.

Now, I'm also not saying that it's by any means practical to deduce any of these smaller effects by brute force statistics.  The whole point - as will hopefully become apparent - is that by manipulating these effects we can potentially make them large enough to overpower any potential smaller confounds (like imperfect spinning, or the fact that the table I'm spinning on isn't a polished, frictionless surface).  There is a balance to be struck here between the extremes of dismissing an experiment out of hand because it would be impossible (or impractical) to do it perfectly and not doing an experiment at all because you think you know how things work and don't want to take the time.

Let's start with some coin flipping.

Most of this research on pennies is a few years old, and as such focused on the old US penny design with the Lincoln Memorial on the 'tails' side.  I was able to find one of those in excellent condition sitting around - the idea being that a penny that had some wear might a) collect 'gunk' on one side or the other, leading to an unequal weight distribution, b) receive uneven wear on the faces of the coin, leading to an unequal weight distribution, or c) receive wear on the edges, removing any bias in edges from striking.

Flipping was rather boring, and led to a fairly predictable outcome.  Of 50 attempts, 24 came up tails and 26 came up heads.  Is that biased?

Well, I could write a much longer post just about how many times you realistically have to flip a coin to tell if it's actually biased, but let's just quickly compare this result to something which we have reason to believe should be quite a bit less biased.

If you read the post a few weeks ago you know how to generate random numbers in a program like Excel or Google Docs.  We can quickly generate 50 random numbers that way, which will fall between 0 and 1.  Then we can check what proportion of those fall into the top or bottom half of that scale.

I would suggest you do this for yourself just to see how such a random distribution breaks down at this sample size.  My first draw got me a distribution of 23 'bottom' and 27 'top'.  It's perfect to illustrate my point, so I'll stop there - 24/26 split on coin toss seems fair enough to me for all practical purposes.  I could flip it again until I have the same number for each side and then stop there - would that satisfy randomness any better?

No, that would be cheating.

How does this same coin fair on the spin test, though?  Well, it's a little worse.  This time the split is 29 tails to 21 heads.  I'm a little more impressed with this, for two reasons.

First off, it's a little more outside the range of what I'd be expecting.  You might say, well you just observed a 27/23 split on something you are holding up as random, so why is two more off this that impressive?

Well, second (off?), we have directionality in our hypothesis this time.  The expectation is that tails will come up more, which is what is happening.  I'm confirming something that has already been shown, rather than deriving something from sheer exploration.  When flipping I wasn't expecting a bias in one way or the other, so being convinced of a bias in either direction should be more difficult.  How much more difficult is an entirely different discussion.

It should be said that these spins - at this point and continuing through the rest of this post - have all been done with the same direction of rotation relative to the ground.  That direction is clockwise looking down from above, or a right-hand rule result of negative Z in a Cartesian coordinate system.  There is much to be said about testing a counterclockwise or positive Z spin, but that's more than I want to realistically talk about today.

I wondered if this would hold up on other coins, so I found another shiny new penny - but this time of the new 'shield' penny variety.  Without a hypothesis here I'm back to a bit of exploration, but found similar results of 29/21.  Interestingly, though, this time in favor of heads instead of tails.

By the way, I have no reason to believe that this or any other coins I have is biased in flips (and frankly, I simply don't care), so I didn't check flips on this or any other coins.  Looking back I'm wondering why I even did on the first penny.

Anyway, looking at one type of penny at a time seems prudent as a start, so I'm simply going to let the shield penny slide for now.

There's another part to this, though, and it's the whole standing up and bumping.  The idea is that if you put a penny on its edge, then destabilize it, it's biased again toward tails.

Turns out it's not the easiest thing to stand a penny on its edge, but the results seemed so clear so quick that I didn't have to do it for long.  Of ten attempts, I ended up with 9 tails and only 1 heads.

Before you start speculating, I also tried to vary things as much as possible (you might say introduce as many confounds as possible) as to check that it wasn't just the fact that my table was tilted in one direction or another.  If one trial was in one area I tested the next with the coin 180 degrees from that, then 90, then 180 from the 90, then a whole different area of the table.

I also tried to bump the table with fairly uniform strikes from my fists some distance away from the coin and from random (and sometimes dual and competing) directions.  Nothing really seemed to change the fact that this coin wanted to go tails up.

Intrigued, I reached the part where science comes into play.

Some of the brightest people I've ever worked with have always pushed the idea that unless you're able to manipulate an event, you don't actually understand it.

In this case, people claim to understand how this whole penny problem is working out.  They postulate that it's one of the two above ideas, but I've been unable to find anyone who has actually sat down to manipulate either of them to actually strengthen (or weaken) the effect.

So, I sat down to try and strengthen (or weaken) the effect.

The first thing on my mind was how to see if weight played any role.  There are two obvious ways to manipulate this - add weight to one side or remove weight from the other.

Not wanting to deface any coins at the moment, I decided to try to add weight to one side of the penny by simply adding some small cut squares of packing tape.  I made sure that they didn't extend to the edges so that they wouldn't interfere with any spinning, and the result was a coin that from a distance didn't really look much different than normal (since packing tape is transparent).

I put the tape on the tails side to see if I couldn't negate the effect that we're seeing.  If the heads side is in fact heavier, then adding weight to the tails side should (at some level of weight addition) eliminate that bias.

Ten trials with the coin stood on edge, and no great change in which way they fell.  Instead of 9 tails and 1 heads, this time I found 8 tails and 2 heads.  The difference is in the direction I was expecting, but it is by no means the game-changer that would eliminate that bias.  Wondering if the weight was enough to do anything, I decided to try the same with spins.

Keep in mind, the last time I tried spinning this same penny resulted in the expected bias toward the tails side:  29 tails vs 21 heads.  The effect wasn't as strong as the standing on side effect, but it was there.

Of 25 spins (I was getting a little lazy), the effect does seem to be reversing.  By putting a small amount of tape on the tails side of the coin, it now appears to be biased a bit toward falling heads up - 16 heads to only 9 tails.

Putting the tape on the other side of the coin is also biased toward heads, though.  It's a little less, 14 vs 11, but it might mean that the tape isn't really enough to do much, or there's something being canceled out here that's bringing things back to near-random.

A little bit of tape is one thing, but I found myself wanting to really knock this thing out of the park and fully bias a coin in one direction or another.  Frankly, a penny is too small to add much weight to, but a quarter gives a lot more surface area to play around with.

To start I figured I'd check to see if an old (but good quality) eagle-backed US quarter would be biased in the spin test.

Emphatically yes, it would appear.  In the first 10 spins only 1 came up heads.  I tried another quarter, and it appeared to be similar.  I could test more quarters and see if there's a consistent effect here, but what I'm really trying to do at this point is simply show that something I do can change the result.  I don't care what the starting result is so much as I care that by some intervention it can be changed.

That intervention is (ostensibly) weight.  A few pieces of tape on a penny is one thing, but for this test I wanted to really just overpower smaller effects.  So, I used some tape to carefully tape a dime to one side of the quarter.

For reference, I used the old loop tape onto itself and put under technique, like you might use to hang a poster on your wall.  That way I didn't run the risk of taping too close to an edge and introducing other variables.  The dime sat safely in the middle of the face of the quarter, so there was no worry that its edge might graze the table either - if the dime was touching the table it was already well on its way to (read: unavoidably) falling onto that side.

The weight of a dime would seem to be drastically greater than the weight differential of either side of the coin,  and my only concern was the fact that I'd done something aerodynamically detrimental.  Something to think about, though it turns out (later) that other things might actually be at play.

[By the way - as a quick aside - the addition of this weight was enough that the quarter was no longer willing to stand on its edge, thus making the standing and bumping aspect of this impossible.]

If the above weight arguments are working properly, then the idea would be that the head side of this quarter was heavier, and thus causing the quarter to fall with the tails side up.  The first natural thing to try, then, was to place this dime on the tails side to see if that weight would pull that side down faster, leaving the heads side up.

And this is where things start to get weird.

10 spins.

10 tails side (with dime taped to it) up.

Oddly, then, it would seem that I'd solidified the effect that had already been occurring.  There is simply no way that the weight differential was still in favor of the heads side of the quarter (if it ever had been).

There's a simple way to confirm that - move the dime to the heads side of the quarter and see if that will reverse the effect.

Well, yes.  10 spins, this time 8 heads (with dime up) and only 2 tails (with dime down).

I was such in doubt of my own results that I ran both cases again.

The dime on heads side was similar, with 7 heads (with dime up) and 3 tails (with dime down). 

I kept spinning the dime-on-tails-side hoping that I'd eventually get a heads (dime side down) result.  I have yet to reach that point.  I spun 40 more times, just to get to a nice even 50 overall, and have yet to end with anything other than a tails (dime up) result. 

It only took me a few spins on this second run to figure out what I believe might be going on in this case, though.  It's not the fact that a heavier side will fall (as it might be if it was standing on edge), but rather that introducing more weight on one side of the coin shifts the center of mass.

Why is the center of mass of the two-coin system important?  Well, it's potentially important on the one-coin system as well, but in the two-coin system it has a pretty profound impact on axial tilt even on a pretty hard spin.  Systems rotate around their center of mass, so if that is pushed outside of one of the faces of the coin (or toward one of the faces, in a less extreme example), the axis will drift to keep that side inside the spin. 

That is to say that even on a spin with a whole lot of energy the spinning coin fails to achieve a spin perfectly perpendicular to the surface on which it is spinning.  It maintains an axial tilt that keeps the dime side 'internal', so to speak.  As the coin slows, the axial tilt increases, as it's only the energy in the spin that is keeping it even close to a zero tilt system.

The short answer (and longer question) is that an unequal distribution of weight might cause differential effects in spinning vs standing coins due to the fact that axial forces can come into play during a spin but only gravitational forces will come into play (ideally) in a standing bump test.  

All in all, from a numbers point there seems to be something here - though it's certainly not as simple as it might first appear.

What can we really get out of this so far?

Well, edging of the coin might not be a strong factor, at least not as strong as some of these weight changes.

The bump test and spin test seem to be producing effects of different sizes, or at least effects that are more robust to interference.  More importantly the bump test might be driven by gravity and the spin test driven by shift in center of mass.

Placing a relatively large weight on one side of a quarter tends to favor that side ending up face up, though there are also some problems of shift in the center of mass and axial tilt.  This might come into play in all coins, to a lesser degree. 

Overall, though, I think I'm left with more questions than answers.

There may be reason to believe that at least some of the forces that might be working on a spinning coin are based on spin direction - I've kept that constant so far but might find drastically different things with a reversed spin.  The only thing that should operate this way would be the Coriolis force, which seems like it may be one of the smaller effects operating in this system.

Taping a dime to a quarter is a quick proof of concept, but the additional protrusion that this introduces leaves me a little unhappy.  I'd like to figure out a way to increase the weight distribution without changing the shape of the coin, but that would seem to involve some metalworking.  

I didn't look specifically at edging yet, but it would seem that a quick brush with some sandpaper might be enough to give one edge or another a smoother...edge.  The problem with this is - unlike some tape on the face of the coin - that such a technique is destructive to the object being tested.  Unless I had two coins that I believed to be - for all intents and purposes - identical, I couldn't test the second edge sanded alone after I'd already sanded and tested the first one.

All in all I thought this was going to be fairly straightforward, but some of these odd results have be a bit intrigued.  I've put a (Part I) on this because I want to spend some time thinking about this as well as running it past others - by all means if you have suggestions or thoughts post them in the comments.  I'd love to figure out what's actually at play here.

2 comments:

  1. You could add weight to one side without as much protrusion buy dripping molten lead or solder on one side. Any lead that fell passed the edge should be easy to peel or clipped off.

    ReplyDelete
  2. You could add weight to one side without as much protrusion buy dripping molten lead or solder on one side. Any lead that fell passed the edge should be easy to peel or clipped off.

    ReplyDelete