A ladybug lands on the 12 of a clock, and every second she moves randomly to a neighbouring number, either one step clockwise or one step counterclockwise. Each time she touches a number, we are colouring it red. What is the probability that the very last number to get coloured is the 6?
At first glance, it seemed like , being the farthest point from , should have a special probability. It also seemed like my intuition was wrong.
The simplest solution is to run the experiment twenty thousand times and see what happens.
IMPORTANT
No ladybugs were harmed during the making of this post.
Run the simulation a few times and see how she reaches the last number. It looks a bit random at first. Once you are tired of playing around, click Run 10000x to see the probability distribution emerge.
TIP
Spam the Run 10000x button.
The probability that is the last number colored is converging to or . So is the probability for every number!
Why?
To understand that, let’s look at what must happen for any number to be the last one visited.
Think of the clock as a cycle of nodes. The ladybug starts at (position ) and at each step moves to a neighboring number with equal probability.
For any number to be the last visited, the ladybug must:
- First reach one of its neighbors (either or )
- Then travel all the way around the clock to reach the other neighbor
- Only then, finally, step onto
This maps to the Gambler’s Ruin problem.
Picture a gambler who starts with dollars. Each round, she flips a fair coin: heads, she wins a dollar; tails, she loses one. She keeps playing until she either goes bankrupt ( dollars) or hits her target ( dollars).
The probability of reaching before is:
Start with dollar and try to reach ? Your odds are . Not great.
Our ladybug is doing the exact same thing: moving randomly with equal probability in either direction. Let’s apply this to position .
Step 1: The ladybug must first reach either or (without visiting ).
By symmetry (the clock is symmetric around the - axis), there’s a chance she reaches first and chance she reaches first.
Step 2: Say she reaches first (having visited along the way). For to be last, she must now go all the way around the clock (), before stepping onto .
From position , she’s step away from and steps away from (going the long way). Sound familiar? She’s our gambler, starting with dollar and trying to reach before going broke. Using the formula:
Step 3: Combining both cases:
The same argument works for every number (except , of course, which is already visited at the start).
For any number to be last, you must reach one of its neighbors first, then go the long way around ( steps) before taking the short way ( step) to . The “long way” is always steps, and the “short way” is always step, regardless of which number you’re considering.
Once you’ve visited one neighbor of a number, you’ve necessarily visited all the other numbers on that side of the clock. The structure is the same for every position.
The positions aren’t symmetric in terms of distance from but they are symmetric in terms of the structure of the random walk reaching them last.
Thanks to the smart people on the YouTube comment section, without whom I would not have been able to piece this together.
As I was exploring solutions to this problem, I came across Austin Z. Henley’s blog post where he also made a simulation!

