Came across another wonderful bit of wisdom from the late great Professor Sir David Mackay when going back through his text book, Information Theory, Inference and Learning Algorithms. This is probably one of my favourite books and I keep picking up on a little nuances every time I read it.

The chapter I was reading this time is “Random Inference Topics” and the section is titled “What do I know if I’m ignorant”. The big takeaway of this section is to remind us that ignorance doesn’t necessarily imply uniform distributions over possible outcomes. Mackay illustrates this with a few simple puzzles and I particularly enjoyed one that I’m calling “Mackay’s Needle”.

Mackay’s Needle

There’s a famous probability puzzle knows and Buffon’s needle which asks the following: “If I drop a needle onto a stripy floor, what’s the probability that the needle lands at the intersection between two stripes?”

“Mackay’s needle” takes a similar flavour and asks the following:

“A pin is thrown tumbling in the air. What is the probability distribution of the angle between the pin and the vertical at a moment while it is in the air? The tumbling pin is photographed. What is the probability distribution of the angle between the pin and the vertical as imaged in the photograph?”

Spoiler ALert

The problem is fairly straightforward and if you’d like to solve it yourself then I’d advise pausing here.

My solution

A naive first response to this problem is to say that since we know nothing about the position of the needle, all angles from the vertical are equally likely. i.e we might naively say that takes a uniform distribution between and

If you think about the problem for a little longer you’ll notice that actually it isn’t quite that simple. For any value of we can rotate the needle around the vertical axis by any angle and we still wont change the value of . For larger values of the circle traced out by the tip of the needle as we rotate it is bigger, so there are in some sense more ways to achieve larger values of .

We can make this more concrete by calculating the density, . We know that the density will be proportional to the size of the circle traced out by the tip of the needle so:

Where r is the distance of the centre of the needle to its tip.

Since integrates to 1 in the range this is already normalised and so we have our denstity .

In the case that we suppress one dimension (like the photograph described above), we actually do return to a uniform distribution over .