Go back
Corona Virus and Exponential Growth

Corona Virus and Exponential Growth

Science

1 edit

@deepthought said
I can't help noticing that more Southern and warmer places have been hit harder in Europe and the more Northerly places less hard. This implies to me that the virus is not harmed by warmer weather and the effective social distancing in Winter is what's held up the virus in the meantime. That might also explain why the outbreak was more easily controlled in China.
Is it 90-110 degrees F yet? Once summer temps arrive, we will have a better look.

1 edit
Vote Up
Vote Down

@joe-shmo said
@Eladar

I think I figured out the issue. The computation is crashing when it is working with numbers in the high hundreds/thousands ( its probably trying to do exponentials with those numbers and failing ). If I divide all the Y data by 10, it produces a curve. I just have to figure out how the actual curve relates to the adjusted curve. I suspect since I'm not adjustin ...[text shortened]... numbers are changing significantly. @Deepthought was obviously correct about very large error bars.
For the Data as of the 30th. I'm seeing for the first time a DECREASE in estimated deaths from the regression, for past data the number of peak deaths ( constant "a" ) has continually increased. The IP was reached yesterday ( March 30th) in this latest regression.

a= 6118
b= 21870.9714
c= -0.334316
d=20.76

L(x) = a/(1+b*e^(c*x) ) + d

Vote Up
Vote Down

@joe-shmo said
For the Data as of the 30th. I'm seeing for the first time a DECREASE in estimated deaths from the regression, for past data the number of peak deaths ( constant "a" ) has continually increased. The IP was reached yesterday ( March 30th) in this latest regression.

a= 6118
b= 21870.9714
c= -0.334316
d=20.76

L(x) = a/(1+b*e^(c*x) ) + d
I can't see any inflection in the data the r value for my original curve is 0.99 with yesterdays' numbers i and today doesn't look better.

Vote Up
Vote Down

The point of inflection is supposed to be in two weeks.

Vote Up
Vote Down

@ponderable said
I can't see any inflection in the data the r value for my original curve is 0.99 with yesterdays' numbers i and today doesn't look better.
Yeah, I've realized I have a scaling issue. I believe my logistical regression is failing to compute because of the sizeable data points ( My calculator has limited processing capabilities and its probably trying to exponentiate very large numbers ). I originally had thought that if I scaled the Y data by a factor, I could just multiply the resulting function by said factor after to regain the solution. Scaling the Y produces a result, but further inspection of Least Squares method led me to realize it is in no way a "clean relationship" for rescaling. It is going to be rather tedious to translate all the scaled coefficients back to the original data coefficients.

SQError = Σ ( f (a,b,c,d, X) - Y/k )^2

all the coefficients are going to be some different function of k ( the factor by which I scaled the Y data ). So in theory, I believe I can solve for all the scaled coefficients, and relate them back to the coefficients of what the original unscaled Y data would produce. It looks atrocious in practice so far.

So..I'm working on it now, not sure if I'll finish before the epidemic is over...

In the mean time, suppose your approach ( for the early part of the data) was pretty reasonable after all according to:

https://covid19.healthdata.org/

April 11 ( I believe your day 42 ) has between 17,642 - 26,602 Cumulative Deaths.

Vote Up
Vote Down

@joe-shmo said
Yeah, I've realized I have a scaling issue. I believe my logistical regression is failing to compute because of the sizeable data points ( My calculator has limited processing capabilities and its probably trying to exponentiate very large numbers ). I originally had thought that if I scaled the Y data by a factor, I could just multiply the resulting function by said facto ...[text shortened]... healthdata.org/

April 11 ( I believe your day 42 ) has between 17,642 - 26,602 Cumulative Deaths.
You're doing this on a pocket calculator. Can you not do it on a computer, I'm sure that there's a maths package that'll do the curve fitting for you.

Vote Up
Vote Down

@DeepThought

I think he was using a computer program, but was having isdues so tried the calculator.

3 edits
Vote Up
Vote Down

@deepthought said
You're doing this on a pocket calculator. Can you not do it on a computer, I'm sure that there's a maths package that'll do the curve fitting for you.
Your a fun sucker! Now how am I supposed to make my wife mad at me...

No, great idea. I never thought to check if that existed.

https://mycurvefit.com/

You get 20 data points if you sign up, and 50 analysis/predictions per month. It has the desired regressions.

If I use the 4PL Symmetrical Sigmoidal on the latest data ( within 20 data points)

1656
1759
1869
1979
20103
21127
22142
23214
24261
25318
26444
27560
28717
29947
301213
311597
322027
332473
342991
353867

y(x) = 161093.3 + (43.39054 - 161093.3)/(1 + (x/56.94069)^7.660269)

y(42) = 14306

Vote Up
Vote Down

@Eladar

No I wasn't using a program, Excel didn't have the Logistic Regression, and PTC Mathcad ( which I also use ) doesn't have it in the free version. I believe it was you who mentioned the calculator was capable of the Logistical Regression.

@Deepthought Its not a pocket calculator, but yeah a hand held graphing calculator.

Vote Up
Vote Down

@joe-shmo said
Your a fun sucker! Now how am I supposed to make my wife mad at me...

No, great idea. I never thought to check if that existed.

https://mycurvefit.com/

You get 20 data points if you sign up, and 50 analysis/predictions per month. It has the desired regressions.

If I use the 4PL Symmetrical Sigmoidal on the latest data ( within 20 data points)

1656
1759
...[text shortened]... 991
353867

y(x) = 161093.3 + (43.39054 - 161093.3)/(1 + (x/56.94069)^7.660269)

y(42) = 14306
Hi joe, I've got a way of doing this on a spreadsheet. The logistic function is:

f(x) = a/(1 + b exp(-mx)) + d

Notice that if we send x to minus infinity we get f = d. Since we expect the total number of deaths far in the past to be zero I'm setting d = 0. This makes the analysis a lot easier. Also I've replaced c with m for reasons that'll become clear below. The next thing to notice is that for small x we have:

f(x) ~ exp(mx)

So we can get m by taking the log of our data and do linear regression, m gives us the slope of the linear regression which is why I renamed it. We can always write:

b = exp(m*x0) = exp(c) where c is the intercept from linear regression.

In other words b just determines when our zero in time is. Let's choose b so that f(0) = 1. In other words the date of the first case. Then we can write:

f(0) = 1 = a/(1 + b)

So, a = 1 + b, and we have:

f(x) = a/(1 + (a - 1) exp(-mx))

Note that we've shifted x doing this x --> x' = x + c/m. Rearranging we get:

a = f(x) (1 - exp(-mx))/(1 - f(x)exp(-mx))

What I then did for the UK's deaths was work out m doing linear regression on the deaths from the 16th of March (a fairly arbitrarily selected date, chosen so the signal's not too small compared with the noise but still giving us about a fortnight's time series).

This gave m = 0.2406 and c = -6.8111. I haven't done an error calculation for these yet. So our zero of time is at -c/m = 28.3115 days. Then I calculated a for each input using the above formula, but with 28.3115 subtracted from the day count I'd used for linear regression. This gave a fairly large range of answers, some were negative. I took the average of those over 10,000 (I'll repeat the calculation to eliminate only negative results, and using all data the regression was over, if it changes much I'll post). I also got an error estimate by working out the standard deviation of the values I'd calculated from.

Total deaths from Covid-19 in the UK (SD) - 22,100 (10,324)

So my 95% confidence interval is (1,800 to 42,750)

I'll repeat the calculation with the US data.

Vote Up
Vote Down

Using the data from worldometers.com I get 76,500 deaths in the US with a standard deviation of 92,900 and the top of the 95% confidence interval at 186,000. I need to have a think about how to integrate errors in the linear regression into this.

Vote Up
Vote Down

@deepthought said
Using the data from worldometers.com I get 76,500 deaths in the US with a standard deviation of 92,900 and the top of the 95% confidence interval at 186,000. I need to have a think about how to integrate errors in the linear regression into this.
So not exactly a normal distribution.

Vote Up
Vote Down

@eladar said
So not exactly a normal distribution.
The method's a bit of a hack. I'm trying to predict the outcome using a really small amount of data. The top of the US 95% confidence interval should be 262,000 - I forgot to add the central value.

Using this I have the inflection point on the 9th of this month for the UK and the 11th for the US. That figure goes as the log of the number of deaths so the confidence interval's pretty tight.

1 edit
Vote Up
Vote Down

@deepthought said
Using the data from worldometers.com I get 76,500 deaths in the US with a standard deviation of 92,900 and the top of the 95% confidence interval at 186,000. I need to have a think about how to integrate errors in the linear regression into this.
The online regression software is predicts 75,800 Deaths by the Inflection Point ( Day 56 - April 21), totaling 161,100. So they seem to be in agreement, with the exception of the inflection point date.

Vote Up
Vote Down

@joe-shmo said
Your projecting 3 times the current worldwide deaths ( in which some stats have been accumulating for several months, or at least a month in most cases ) to occur in the US alone over the next 3 weeks? I don't buy it.
you buy it now?