How Many People Do I Overtake On My Run?

Armen Bodossian
6 min readNov 13, 2023

Co-Authored with Hannah Bavcic

Battersea Park in Autumn. (Img Source)

When I was recently running my regular route around the scenic and serenely joyful Battersea Park, my thoughts (as they often do) started to daydream about trivial musings. I began to notice the other runners passing me and I passing them, running the same loop as me (approx. 3 km per lap):

A view of my 3km regular loop around the park. Taken from Google Earth

Specifically, I found I usually overtook more people running in the same direction than they overtook me — though I guarantee faster runners were present on the circuit. Conversely, I noticed that I would see many more people running in the opposite direction to me (naturally); in my frame of reference it could have felt as if fellow runners had a preferential direction to run the circuit the other way. I wanted to understand the mechanisms behind these interactions and thus answer the following questions (using probability):

  1. What is the expected number of people I overtake in 1 lap? In N laps?
  2. What is the expected number of people who overtake me?
  3. How many more people should I expect to encounter running the other way?

Mathematical Outline

In order to model this problem we’ll need to make a few assumptions and generalisations. Let’s consider the following:

  1. Everyone (including myself) is running at a constant speed
  2. The speeds of the other runners are normally distributed
  3. The distances between other runners and myself on the circuit are uniformly distributed

For ease, let’s think about our circuit as a straight line from 0 to L (the length of the circuit), with my starting point at 0. Then every other runner i is some distance dᵢ ahead of me.

With this mind, how many runners do I expect to overtake? To calculate expectation 𝔼[X], where X is the number of runners overtaken, consider the indicator function for each runner:

where

Since the speed of each runner is sampled from the same normal distribution, the expected outcome is the same for every runner. Hence, if we consider a general runner i, we can re-write the sum above as

By the definition of expectation,

Thus, the key calculation for this problem is to figure out the probability that we overtake a general runner i. Say we run the circuit at a fixed speed v and it takes us time t to complete one lap. Then we overtake runner i if the distance they run in that time, plus their plus their initial displacement from us, is smaller than course length L:

where vᵢ is their speed.

For easier notation, let’s re-write these variables as V and D. Then by our assumptions earlier we have:

The cumulative density function (CDF) of a function of two random variables can be expressed as

where f x​(x) and f y​(y) are the probability density functions of X and Y, respectively. Thus we can express our probability as

The integral of the uniform variable is over its range, 0 to L — and since t > 0, we have

so we integrate the normal variable (speed) between this value and -∞.

This integral has no closed form expression, however we can use a handy solver in Python to figure out its value.

Plugging in numbers: For one lap

(The notebook containing the code to solve this problem can be found in this repository and run on Google Colab)

Simulation showing positions of runners in circuit (0, L=3000), with me (green dot) at zero. As I complete the lap, any runners that are overtaken are marked with red; in this example, 8 runners.

To do this calculation we will need the following values: the length of the circuit (L), the time it takes me to lap (t), the number of runners in the park (N), their average speed (μ), and standard deviation (σ). It is not easy to find definitive values for the last two but this website provides some sensible values which we convert from km/h to m/s. Similarly, we convert my speed of 4:30/km ~ 3.7 m/s. Dividing L by this value gives us t, since time = distance / speed. The snippet below prints values used in notebook:

# L: Circuit distance (m)
L = 3000

# N: number of runners (in both directions)
N = 100

# MY_SPEED, T: My speed (m/s) and corresponding time taken to run circuit
MY_SPEED = 3.7
T = L/MY_SPEED

# MU: Average speed of a runner, converted to m/s
MU = 2.77165

# SIGMA: Standard deviation, m/s (sensible estimate)
SIGMA = 0.536

We choose 100 runners, and assume that 50% of them run in the same direction as me since the park appears to have no definitive preference for circuit direction.

We construct the probability integral in the previous section and use the scipy.integrate package to solve, giving us the following observations:

The probability of passing a runner in the same direction is 0.253

The total expected number of passes therefore is 50 * 0.253 = 12.67 ≈ 13 people

Expect to pass 50 / 13 ≈ 4X more people running in the opposite direction

The code also contains a brute force simulator which randomly assigns each runner an initial displacement and speed and calculates their end displacement to see if they are overtaken. Running the simulation 50,000 times happily yields the same total expectation of around 13 people.

For N laps

We also thought about what would the expectation look like if I ran more than one lap? After all, the displacement of the other runners this time would be somehow dependent on where they ended up on their previous lap. Does this fact make a difference to our setup?

Somewhat conveniently the answer is no. Since their initial displacement was uniformly random, after running one lap with a normally-distributed set of speeds the runners after lap one are still uniformly distributed across the circuit. Therefore, the probability remains the same, and to calculate the expected passes after nlaps, you simply multiply nlaps * 12.67. So after 3 laps, I expect to have done 38 overtakes. Again, this can be tested using the simulator in the notebook.

Thanks for reading!

With a few assumptions we were able to reach a sensible answer. Enjoy counting other runners next time you’re out on your jog!

--

--