I was click-baited at the weekend. Wired published an article entitled “The Elegant Maths of Social Distancing“. Sounded just my cup of tea, but was all waffle and no maths. Not terrible waffle, but not great either. So I decided to try to write the article that I wanted to read.

(BTW Wired have since retitled it to “Social Distancing: How Many People is Too Many?”. I’m not sure it answers that question either).

## Social distancing

Covid-19 has now caused global chaos and social distancing has become a key element in slowing its spread. The basic idea is simple: the less people you are in contact with, the less likely you are to contract it. But how many is too many or too few? The answer lies in the maths, and its not as complicated as you might think!

Suppose we have a population of size *N* and the number of infected people in that population is *n*. It helps to identify what the relevant population might be. If you are looking at a crowd for an international rugby match, anyone in the country might come. For visiting my local coffee shop, it is really just Edinburgh inhabitants (for me), or perhaps even just the neighbourhood.

So estimating the population is quite easy. In round numbers, the UK has 60m people, Scotland 6m and Lothian has 900,000.

### How many people have Covid-19?

This is the 64-trillion dollar question! The government tracks the number of confirmed cases here. As of 17 March, it had 1,950 in the UK and 195 in Scotland and (from The Scotsman) 30 cases in Lothian. Easy! Alas, its not that simple.

These are cases that have been tested and confirmed. But there are also plenty of people with covid-19 that have not been tested. How do we estimate these?

Lets make a simple assumption: all those tested and confirmed are showing meaningful symptoms. We know that almost 80% of people who get this only have mild or no symptoms. Now some of those with mild symptoms may be tested, but probably they will have to be noticeable. This suggests that we should multiply the numbers by 2.5 to 5 times. That would put the real number of UK cases at between 5,000 to 10,000.

Sadly we aren’t finished yet. Those tested will be symptomatic and the incubation period for this averages almost a week. Unfortunately, people are contagious in this incubation period. According to WHO, the R0 for Covid-19 is around 2 to 2.5. This number estimates the average number of people that an infected person will transmit the virus to.

The ease of transmission suggests that for each person, there will be 2-2.5 others who they infected. These people have probably also infected others too. This suggests we need to multiply the numbers above by 4 to 6.25. This would put UK figures at between 20,000 and 60,000 (excessive rounding – no-one can be confident).

Or put another way, the real figures may be between 10 (2.5 times 4) and 31 (5 times 6.25) bigger than what we can see. And given the crudeness of the estimation, these could even be out by an order of magnitude.

## Back to social distancing

So how do we find our risk on being with someone who may be carrying the virus? We borrow a trick from the famous birthday problem. It is easier to calculate the probability that noone is carrying it and, by deducting this from one, we find the actual risk.

The calculation is the same as in sampling without replacement. There will be *N-n* people without the virus. Thus the probability one person chosen at random is virus free is *(N-n)/N*. With two people, the population fro choosing the second person is one smaller and the probability that second person is clear is *(N-n-1)/(N-1)*.

Multiplying these together gives the probability that neither of them have it as:

The same principle applies for the third person, the fourth person, etc. We just get a probability for each and multiply them together. So in a group of size *k*, the probability that noone has the virus is given by:

This, finally, is the elegant maths that we wanted!

## Measuring our risk

People usually prefer to see the risk of something, rather than the risk of that not happening. To get this we simply deduct our probability from 1. For example, lets take the middle of our multiplier range, to give 600 infected people in the Lothians. Now supposed four people meet for tea and cake (always get cake!), the probability that neither of them is infected is:

Now, a curious thing about this is that the probabilities work out almost the same for the UK, Scotland or the Lothians: it just depends on the group size.

If we take our small and large multiples, we can get the range of probabilities. For two people having an intimate dinner, the probability of at least one of them having the virus is 0.07% to 0.20%. A ten person dinner party rises to 0.33% to 1.0% while 50 people in a restaurant have 1.6% to 5.0%. As the numbers grow, the risks multiply.

A lot of people could accept some of those, but when we get into the crowds people should become more circumspect:

- 100 people: 3.2% to 9.6%
- 500 people: 15% to 40%
- 1000 people: 28% to 64%
- 5000 people: 80% to 99%

So social distancing is well justified!

## More thoughts

When looking at these figures, you need to bear a couple of things in mind. The first is that the number of cases will keep growing at an exponential rate. Those figures are out of date. If we change the number of cases in Scotland to 1,950, the probabilities jump to 3.2% to 9.6%: the same as for 100 people before. Basically, for each group size it is the same probabilities as before, but for scaled down group sizes.

The second thought is this somewhat ignores the consequences. In finance, the expected loss can be the probability of default times your expected loss in the event of default. For some of us – the young and healthy – the effects of the virus are likely to be weak. For others, the consequence could be fatal. I might accept group sizes above that should horrify my, older, mother. But I’m alone at home and she’s off on holiday, so perception is still an individual thing!

Anyway, stay safe. Even if not isolating, keep your contacts small. And wash your hands!

Pingback: Why estimating the number of people with Covid-19 is hard - BM Research