Saturday, October 31, 2020

Data Analysis of the CA Covid-19 Data

 

  If one wants a fit that is useful for predictions the fit function for dK/dt should tend to zero as K becomes large. Since polynomials tend to infinity as K goes to infinity we can try fitting dK/dt=1/P(K). An even power for P(K) will guarantee that the function will go to zero as K goes to ±∞. Fitting a fourth power in this manner gave the following results for a dt/dK fit.




Another advantage is that extrapolation of the data gives more realistic prediction results.



Finding a mathematical model for the data was challenging. To do so I tried modifying the SIR pandemic model to give something closer to the data. If one replaces rS-a with Q in the SIR formula for dI/dt one can derive a formula for Q in terms of the polynomial P(K).



This can be used to define a function S* which is related to S. 



Comparing S* with I for the given data shows A is small but not quite constant.



This is as far as I've been able to get so far in analyzing the given date. More data appears to be needed to determine the parameters r and a.


Supplemental (Nov 2): The coefficients given above are those for a polynomial of X=K-K0 with K0=356834.7 being the value of K for the peak of dK/dt for the fit. X was used to get a more symmetrical fit about the peak with a positive 4th power coefficient of X so dK/dt would approach zero as the magnitude of X grew large.


Supplemental (Nov2): I probably made a mistake using a SIR model formula to calculate Q which assumes the logistic function for dI/dt. It is probably more general and the mathematical model associated with the fit may be the best one.


Wednesday, October 21, 2020

A Higher Order Fit for the CA Covid-19 Data

 

  Fitting a fifth degree polynomial to the rate of change, dK/dt, gave an even better fit to the CA Covid-19 Data. The coefficients of the powers of K were,



The resulting fits were,




Unfortunately, the signs of the lower order terms did not permit an estimate of the SIR model parameters.


Supplemental (Oct 22): It's doubtful this fit would make a good predictor over the long term since it is subject to errors near the end.


A Fit for the CA Covid-19 Data

 

  I managed to get a fit for the CA coronavirus data presented in the last blog. The first step was fit a cubic polynomial of the known cases, K, to dK/dt.



Which gave the following results. 




This equation was then integrated numerically to construct an integral table for Δt as a function of K. The initial value of Δt was chosen to give the best fit for K.



This table was interpolated to determine the value of K for a given value of Δt. Then the value of Δt0 was chosen to minimize ΔK.




The values of N, r, a and ρ given with the coefficients of the polynomial for dK/dt are estimates of the parameters for the SIR pandemic model. The reduced value of N may be the result of imperfect mixing.


Sunday, October 18, 2020

Monitoring CA Covid-19 Data

 

  One can download California Covid-19 statistics which come in a Comma Separated Value (CSV) file format that one can open with a spreadsheet program or app and save.



To get daily data for the entire state one can use the SUMIF function. The F column contains the dates.



One can then plot the daily data.




The last date plotted is 10/15/2020. Note there doesn't appear to be any evidence of a "second wave" yet contrary to media reports.


Friday, October 9, 2020

A Closer Look at US Population Growth


  Since undergoing open heart surgery last month I've been trying to analyze the US census data in hopes of being able to make a better prediction of future growth. If we assume the rate of change in the number of people, X, is a linear function of X and integrate we find X is a simple exponential function of the time.  


Separating factors involving the variable X from constant factors we can simplify the function that we need to fit.


If one tries to fit blocks of five census population observations one finds the exponential rate of growth is not constant but slowly decreases. 




After 1920 the rate drops to zero for the exponential term. The reason for this is X is replaced by a linear function of time.




So instead of the rate of change of X being a quadratic function of X which involved a carrying capacity K, the census fits suggest the constants for the fits changed with time and the current rate of change in the US population is now a linear function of time. 

Supplemental (Oct 9): The census fits were 3 point fits centered on the year indicated and using the census values +/- 20 years.