I just saw that there were a bunch of comments on old articles that I never noticed. Blogspot was putting comments on hold until they could be moderated, but somehow I didn't see any notification to check them. I changed the settings so it should work better now.
Saturday, December 5, 2020
Trends in Social Distancing
I came across some interesting data while researching the coronavirus. Social contact is a key factor in explaining the disease's spread. About a week or two before the shutdowns, social contact fell dramatically. After a while, it started to rise, but it is still well below normal. Ideally, we would track everyone and measure how many times they got within 6 feet of someone else, weighted by the amount of time that they were in close contact. That data does not exist. There is measurement error in the available data. However, all my sources tell the same story. That's why I think this pattern is real.
My first source is the Device Exposure Index (DEX) (link to the methodology). It uses smartphone location data. When you go to a store, how many other devices were in that store? One issue is that if someone stays at home, their smartphone drops out of the sample. The Adjusted DEX fixes that problem. I averaged the Adjusted DEX across all US counties, weighting by population.
My last source is data from SafeGraph (downloaded from Carnegie Mellon: link). If a smartphone leaves the house for 3-6 hours, they assume you are working part-time. If it's away for 6+ hours, then it's full-time.
Part-time:
Full-time:
The numbers are suspiciously low. Back in February, only 9% of people worked full-time and 13% worked part-time? That can't be right. I almost threw out this dataset due to the measurement error. However, it might still have some uses. It does display the same trend: social distancing began a week or two before the shutdowns. Contact starts rising again, but it's far from normal.
Social distancing began voluntarily, but that doesn't prove that government policies were unnecessary. Right now, I'm studying optimal policy. No results yet - just sharing some data that I found along the way. Take care
Monday, July 27, 2020
The Curve is Starting to Flatten Again
-Because the growth rate is exponential, it's best to take logs of the data
-I prefer data on active cases rather than total confirmed cases. This is because people who have recovered or died aren't spreading the disease anymore. Unfortunately, I haven't found good data on recoveries. That is why I look at the total number of confirmed cases.
-I run statistical tests to find significant changes in the trend
-The curve was flattening for a while until late June
The tests found 7 distinct periods. The first period was the beginning until March 22. Growth was very rapid back then. You can see that in the table below; the coefficients are circled. The number next to "t1" is the slope in the first period. The slope drops from 0.14 to 0.12 for the second period (March 23-April 13). It keeps falling but then it begins to rise in period 5, which began on June 17. It rises again on June 27. But now we are in period 7. It started on July 18 and the slope began to decline again. The number of cases is still going up, but at a slower rate now.
Saturday, June 27, 2020
Coronavirus - Statistics Update
My data comes from Bing's COVID tracker. I prefer to focus on active cases, since you can't be infected by people who have recovered. However, I noted earlier that the recovery data is not very reliable. First, not every county's recovery data is reflected in Bing's tracker. The data that is reported appears to be cumulative recoveries rather than daily recoveries. That's fine, but on some days, the cumulative total of recoveries goes down - which should be impossible. It can't be daily recoveries because the sum of them all eclipses the total number of cases - also impossible.
Instead, I focus on total confirmed cases. Since the virus spreads exponentially, it's best to take logs (see my explanation in an earlier post). In the graph below, "logC" is the log of confirmed cases and "t" is time. The rapid growth slowed around late March and early April. It continued to slow for a while until the very end of the graph. It's hard to see, but that's why we rely upon statistical tests rather than just eyeballing pictures.
The tests found that there were 6 different periods. In each period, the slope is significantly different from the previous period. For the first 5 periods, the slopes were getting closer and closer to 0. That's a good thing. It means that the disease's spread is slowing down. Unfortunately, Period 6 (June 21 - present) is different. The slopes for Periods 5 and 6 are circled in the picture below.
Monday, June 1, 2020
America is Reopening, but the Curve is Still Flattening
My data comes from Bing's Covid-19 tracker. I focus on active cases (active = confirmed - recovered - deaths). Neither the dead nor the recovered can spread the virus - that's why active cases are the relevant factor. My earlier blog post was about total confirmed cases, but when I turn my attention to active cases, I still get the same result: the curve started to flatten in early April.
Here is the graph of active cases in the US.
Friday, May 15, 2020
K+Q vs. K+R: How to Win This Tricky Ending
Over the last few weeks, I have been exploring ChessTempo's Endgame Benchmark problems. Most of them weren't too hard and my rating rose steadily. But then I ran into a bunch of Queen vs. Rook exercises. They were extremely difficult. I don't think most players realize how tough they are. Successfully solving them would often take more than an hour plus a bit of "luck." (I.e., the computer playing a move that delays checkmate but is easy to refute). In a practical game, this could be even harder. The defensive techniques are very simple, you won't have hours and hours of time on the clock, and you'll be exhausted from the long battle that preceded the endgame. So here is my guide to winning this tricky ending.
Tip #1: *Always* watch out for stalemate
I was working on a problem, and the following position came up in my calculations. You can quickly verify that there is no safe square for the rook. Either it falls immediately or it falls a few moves later due to tactics. I was about to head for this position, but then I remembered to look for stalemate.
The next position is well known.
Tip #2: Centralize the queen
We all know that a centralized queen controls more squares than a cornered queen. Thus, if you keep your queen in the center, she can often pick off the rook with a fork. So far I'm just stating the obvious. But if you combine the first 2 tips, you may learn something new: when you push back the defender, lead with your king, not your queen. To see this, change the last diagram just a little.
Tip #3: The Temporary Retreat
At first, it's easy to push the defender back. The tough part is once they are near the edge, it's hard to make further progress due to stalemate threats. The defender should keep the rook on the third rank. This simple idea will probably frustrate the attacker unless he knows about the Temporary Retreat.
Thus, the Temporary Retreat is very effective. However, it's so counterintuitive that you probably wouldn't find it during a game. Voluntarily giving up ground looks is very unnatural; almost everyone will prefer 1.Qb6+ instead and then struggle to break the blockade. Now there is one more paradoxical idea to know, which brings us to Tip #4.
Tip #4: Letting the King escape
And that is how you win Queen vs. Rook. Stay healthy everyone!
Tuesday, April 14, 2020
The Curve is Almost Certainly Flattening
| Confirmed cases in the US |
(Source: CDC)
However, the trend is exponential, so it can be hard to spot changes in the growth rate. That's why we take logarithms:
| Log of confirmed cases in the US |
Now there does appear to be a recent slowdown in the growth rate. I checked this with a simple model. New York State announced a lockdown on 3/20. Within a few days, other states with big outbreaks made similar announcements. It can take a week or two for an infected person to show symptoms. Thus, even if the social distancing is working, you might not see results until the end of March or early April. So does the curve flatten starting in late March/early April? Yes, it does. In the picture below, "time73" is for the curve after the first week of April. "Time" is for the whole curve. You can see that the number next to "time73" is substantially smaller - this means that the curve started to flatten in early April.










