How thick is a three-sided coin?
Translated into mathematician-ese, this means
What aspect ratio of a flipped coin leads to the chance of landing on either edge being the same as landing on a particular face?
First things first – if you want to get an empirical feeling for yourself for an idealised 2D coin, take a look at the little coin-flipping experiment I wrote here:
The toy above uses the Matter.js library – definitely worth playing with if you’re into this kind of thing! My machine gets pretty slow above a few thousand coins, but feel free to crank it if you’re feeling adventurous.
Above, you can see an excellently rendered depiction of a coin, as seen from the side. The radius of the coin is , and the half-height is . The angle subtended by half of the thin side is .
Note – here and below (and above, actually), we’ll treat the coin as a simple 2D rectangle.
Say that the chance of landing on an edge is – that is, some probability which changes as a function of (assuming that remains fixed). We already know a few things about :
- – i.e. as the coin becomes infinitely thin, there’s no chance of it landing on an edge
- – i.e. as the coin becomes ‘square’, the chance of it landing on an edge approaches 50-50.
- – i.e. as the coin becomes thicker, the chances of it landing on an edge must become higher.
The answer to Matt’s question can then be stated as
Find the such that
(I’ll admit that this doesn’t fit into a tweet as neatly, but doesn’t it look grown up – all those serifs!)
The issue is then to calculate the form of . We’ve bounded the end points, but the challenge is joining those up – e.g. see the possibilities below.
The simplest model
This is the point the physics comes in – using physically-motivated arguments to derive the form of . Thinking about the process of a flipping coin, we might proceed along the lines:
- A coin performs many rotations while it’s in the air
- Therefore it probably doesn’t matter how it was initially orientated
- Therefore the final landing edge is random
- Therefore all that matters is a single ‘landing’
- Therefore all that matters is the angle subtended by the edge
This is an appealingly simple argument. Referring to the drawing above, this argument would lead to
Plotted below, as you’d hope this gives the expected behaviour – starting at 0 and approaching 0.5:
If you were a theorist you’d stop here – write the paper, job done, let’s get a coffee and chat about LaTeX citation styling for the next couple of weeks.
However, keen readers of this blog will understand my experimental background, and thus appreciate the need for some actual data to test a model against.
Unfortunately for them, for the last 5 years I’ve been writing software rather than working in a physics lab, so my data here will have to be strictly computational – at this point I’m essentially no better than a theorist.
Sweeping that detail away, here I actually used the Python pymunk library to run some 2D simulations of coin flips for various thicknesses – here’s the data alongside the simple model:
If I were just doing a PhD and not something important like a blog post, I’d probably stop here and join the theorists for a coffee (let’s not kid ourselves – they’ve definitely moved onto the beers by now).
This model has the right overall features to satisfy our requirements above, but it’s obviously not right. As your friendly neighbourhood
spider man statistician David Spiegelhalter was fond of saying in his talks – even if the error bars overlap, sometimes you don’t need a p-value: it’s just wrong.
A better model
I’ve a confession to make here, reader. In search of a better model I found a great paper which covers everything you need to get a handle on the coin flip situation and then some, and it’s not even the main focus of the paper! I also note that it mentions the ‘three sided coin’ a full 11 years before Dr Parker, so perhaps I held his social media savvy in too high esteem.
To skip to the punchline, let’s add the model from this paper to the plot above. The model looks a little more complicated, and involves an adjustable constant :
What a beauty! In common with the best models you’ll come across in physics, it isn’t completely qualitatively different to the best ‘simple’ model, but it’s so much better that the comparison is in no doubt. I’m sure my buddy David will agree that we don’t need no stinkin’ p-values here.
The other feature of great physical models is that they grant you the opportunity to learn more about the physics in question, so I think it’s worth discussing it a bit here. The idea behind this model (model 5 in the paper) is that when the coin hits the surface, a number of different events can follow:
- The coin bounces back up, and has enough energy to bounce high enough that it can rotate such that any side is facing the surface.
- The coin lands nearly on a face, and doesn’t have enough energy to bounce high enough to rotate to another face – it is stuck on this one.
- The coin lands nearly on an edge, and doesn’t have enough energy to bounce high enough to rotate to another face – it is stuck on an edge.
The factor is the fraction of kinetic energy that the coin loses on every bounce. Clearly if then the coin will never actually land, and if then the coin never bounces at all.
The difficulty of landing a coin on its edge then comes from two places:
- The range of rotation angles that allows a coin to rest on an edge is small
- The energy well preventing a coin from leaving an edge orientation is shallow
The second point is well illustrated by figure 2 from the paper – here the authors plot the ‘energy landscape’ of the coin orientation. On a face (angle = 0, , ) the coin is in a deep energy well that it’s difficult to escape from. On an edge (angle = , ), the coin is in a shallow energy well that it’s easy to escape from.
You may worry that the additional parameter makes this a worse model than the simple one, as surely one is simply free to adjust the parameter until the model fits the data? That’s a reasonable concern, to which I would say:
- Physics dictates in this case that the extra parameter is helpful, perhaps mandatory – it incorporates real physical processes after all.
- The fit is, like, really good when you get that parameter right. (David nods his head.)
- If you want to get all technical about it, actually the real point of this paper is comparing different models of varying complexity using Bayesian methods (David really perks up at this) – definitely have a read if that interests you. In short, if additional parameters really help improve the model fit, they may well be warranted – check out the Akaike information criterion for example.
Blimey, that’s enough maths for today. While the theorists are almost certainly onto the hard stuff by now, I reckon it’s worth dusting off our jokes about differential equations and joining them in the pub. If they won’t buy you a pint, perhaps suggest flipping a coin for it.