Thursday, July 23, 2020

Can masks really help?

One of the big problems in looking at math in a situation like the pandemic, is that people, even people who are generally good at math, tend to be really bad at getting an intuitive feel for probability. Particularly in cases where there are a lot of probabilistic outcomes to factor in. To help my students understand this, I created a simple simulation to model contagion spread. It is based on the ZooSimulation that I do in my AP Computer Science and IB Computer Science classes every year. Basically you create autonomous agents that are placed in a simulated environment and interact. 

For my contagion simulation I ran simulations of 300 people moving about an environment randomly. For a baseline, I ran the simulation assuming everyone moves at every step of the simulation and that if an infectious person (infected are red) gets next to someone who is not infected and not immune (these people are blue) they will infect that person. In this stage of the simulation I also gave each infected person a 5% chance of "getting over" the infection at each step in the simulation. If they get over the infection they turn purple. These people cannot infect anyone else and are immune forever in the simulation. (Yes, I know that we now realize that immunity likely only last for a period of months, but this simulation was created to demonstrate how the math works. I will probably update it so that after some number of steps the purple people can turn blue again.) Here is a typical run for the baseline:


So the next thing I simulated was to add in social distancing. To do this, I simply made the people move less frequently. That would reduce their interactions with others. For this round, I made everyone in the simulation have the same chance of moving at each stage of the simulation. This was for simplicities sake. One of the more advanced versions a few of my students worked on this spring allows for a range of movement likelihoods in order to figure what percentage of population needs to socially distance in order to really inhibit spread. It does turn out that the average chance of moving is what really matters. So in this next run I had everyone move only 1/3 of the time.


You can see that this does tend to inhibit spread. But we decided that this was too optimistic to be realistic. So for the run after that we used everyone moves 2/3 of the time. 


This still was a lot better than everyone moving all of the time. Next we considered masks. For this first run we had masks be 25% effective at preventing infection. Note that this does not necessarily mean that everyone is wearing 25% effective masks. If a mask reduces the chance to you give an infection to someone by 40% and the chance you get an infection by 10% (both of those are lower that current estimates for cloth masks) and everyone is wearing masks then there is only a 54% chance of the infection passing from the infected to the non infected person. (0.6 x 0.9) In other words, that makes the masks 46% effective if everyone is wearing masks. 

The situation is a little more complicated if not everyone wears a mask. Using the above masks (and remember those are considerable less effective than current estimates), with 2/3 of the population wearing masks, you get  (4/9)*.54 + (1/9)*1 + (2/9)*.6 + (2/9)*.9 = 0.6844 or masks being net 32% effective in stopping infections. A little more on this math later. Now here is a simulation run with masks being 25% effective and people moving 2/3 normal. So not super effective masking or distancing, but something. 


Now we the infection spreading much more slowly. This is important not just for bending the curve purposes, but also because it makes contact tracing and isolation much easier to do and much more effective. I have some later models that estimate how likely it is a person gets tested and assumes that 90% of those who test positive will isolate themselves. If you can slow down spread this allows you to prevent outbreaks from ever growing out of control.

So let's think about mask effectiveness for a little bit. The masks above were only 40% effective in reducing the chance you infect someone else and 10% effective in preventing you from getting infected. If everyone wore them we could cut the infection chance by 46%. If only 2/3 of people wore the masks we could cut infection rates by almost 1/3 (32%). Here is a run with 50% social distancing and 33% effective masks.


That is starting to look like something actually controllable. Actual cloth mask effectiveness is difficult to measure, because so many factors like regular washing, wearing it correctly, tightness of fit and other things intrude. Meta-analysis is heading toward about a 70% reduction in the chance you spread the virus on the average and about a 20% chance to protect you from getting infected. If everyone worse masks that would mean masks would stop 75% of infections. 

There is more research showing the effect of masks all the time now. I have read three new articles in the past week. Think of a mask this way, effectively it amplifies the distance between you and someone else and decreases the time you are near each other. A mask traps some particles, and reduces the velocity of others. So infected droplets spread out more slowly over less distance. Effectively doing the same thing that spending less time in contact and being further apart do.

Masks are not magic. Only complete isolation can guarantee you won't get infected. And that isn't practical. But masks coupled with distancing efforts could actually make this pandemic something that we could navigate much more safely. We would be able to shut down just areas where infections were spiking, and shut down for far less time. We would be able to contact trace because the speed of infections would slow so that for a lot of places there would be no need to go on full lockdowns. 





No comments: