## To log-lin, to log-log, or not to log at all?

WarningDiscussing mathematics is difficult, and if you feel you will be offended by this discussion, please don’t read any further.
========================================

One oddity of our current COVID-19 epidemic, is the use of so-called logarithmic axes on graphical illustrations for the general public.

Normally, such axes are confined to arcane technical publications. So it is a measure of how essential they are for describing epidemic growth that they have become relatively common.

But while useful for making certain features of epidemic growth clear, the use of logarithmic axes can also hide other important trends.

Here is my guide to when to use each type of graph using images generated by the Epidemic Calculator website for an epidemic with a single source of origin in a population of 70 million. The data simulate:

• An initial growth phase up to day 100 with R0 = 2.2
• An intervention at day 100
• An active epidemic phase  after day 100 with R0 = 0.73

Initial Epidemic Growth.

If we say a quantity is growing exponentially we mean that at each point, its rate of growth is proportional its value at that point. So as a quantity increases, so does its rate of growth.

In an epidemic, each infected person becomes a new source of infection, so the rate of spread of a virus is proportional to the number of people already infected.

In a population with no resistance, this leads to exponential growth in the early stages of an epidemic.

In order to visualise this behaviour, a logarithmic vertical scale is especially helpful.

Let me first show you an example of epidemic behaviour plotted with a linear vertical scale.

On this graph it looks like almost nothing is happening for the first 80 days of the epidemic. There is a single death after 41 days… and then infections seem to ‘explode’ – apparently without warning. This is qualitatively my recollection of what happened in the UK.

However the same data plotted on a logarithmic scale show that even during its early days, the magnitude of what would eventually happen was apparent – it is exactly the same behaviour throughout this phase.

These so-called “Log-linear” graphs  – where the vertical axis is logarithmic and the horizontal axis is linear are helpful for visualizing the first phases of an epidemic where the epidemic growth is exponential.

Their key feature is that regular steps along a logarithmic axis correspond to regular multiplying factors. The effect is to allow us to see both small and large numbers on the same graph, without the small numbers ‘disappearing’ in comparison with the larger ones.

Active Epidemic Phase

In this epidemic simulation, action is taken after day 100. And after that point, the changes no longer cover such vast ranges of numbers.

In this phase – which is where we are in the UK at the moment – we want to take note of small changes in the numbers. In this phase, a linear vertical axis is the most appropriate for allowing us to see these small changes which are ‘squashed’ by the logarithmic axis.

Notice that even though the processes underlying the epidemic progress are highly complex, the trends are roughly linear over relatively extended periods – just as we see in the UK data. This is the reason I have allowed myself to linearly extrapolate trends from the data in my previous blog articles.

The Epidemic End Phase

While perusing these outstanding data visualisations of the Epidemic progress in New Zealand, I came across a final combination of axes that shows a way of summarising how an epidemic ends – something I am sure we all long to see.

In this representation,

• The vertical axis shows the daily death rate
• The horizontal shows the cumulative total number of deaths

Both axes are logarithmic and so this is called a log-log plot. Now we can see the full trajectory of an epidemic. Its initial exponential growth; the gritty struggle to control viral spread; and the final extinguishing of the viral flame.

The odd data points on the graph above arise from anomalies in the recording of daily deaths. This data is taken from John Hopkins University.

And after the End Phase…?

The movie of this epidemic would end as the infection rate reaches zero. But in reality, there are never any closing credits.

As long as this infection – or the prospect of another one like it  – exists somewhere on Earth, then we have to accept that, however rare, we must live with the possibility that it could all happen again.

I find this thought appalling.

• Do we really want to live in a socially-distanced world where we forever fear to hug our loved ones?
• Will we really have to quarantine ourselves on arrival at every foreign destination, and on our return?

Charting how an epidemic evolves helps us to understand the nature of what we are facing. But it does not tell us how we should face it.

=========================================

Discussing mathematics is difficult, and if you have been offended by this discussion, I apologise. The reason I have written this is that I feel it is important that we all try to understand what is happening.

### 4 Responses to “To log-lin, to log-log, or not to log at all?”

1. abc Says:

Very interesting, as always!
I like your new disclaimer, “Discussing mathematics is difficult”. 🙂

2. Ross Mason Says:

I’ll still give you a hug Michael.

3. COVID-19: Day 142: Population Prevalence Projections | Protons for Breakfast Says:

[…] it is difficult to see both the large numbers and the small numbers on the same graph. So, time to use a logarithmic vertical axis! The graph below shows the same data as the previous graph, but plotted on a logarithmic […]