COVID-19 Predictions: An Initial Attempt

Last date of data: 28-May-2020

Best Fit Daily data 3-day moving average 5-day moving average 7-day moving average
DailyCumulative DailyCumulative DailyCumulative DailyCumulative
India (All States)
Tamil Nadu
Madhya Pradesh
Uttar Pradesh
West Bengal

Relevant Information

How to Use the Code

This utility is best suited to Linux platforms, because it uses xfig images. Suppose that you want to plot the curves for Foobar Pradesh. Follow these steps. Let us first look at the daily-data predictor.

Using the moving-average predictor is similar. Download the source code, and store in some directory. If you want to get w-day moving-average predictions, create a subdirectory maw. The pictures are dumped there. You should preferably take an odd value of w. Here is an example with 5-day moving averages.

mkdir ma5
gcc -Wall movavg-predictor.c -lm
./a.out FB 30 5
gcc -Wall -D_BESTFIT movavg-predictor.c -lm
./a.out FB 5
fig2dev -L jpeg -b 20 -m 1.25 -S 4 -q 95 ma5/FB30.fig ma5/FB30.jpg
fig2dev -L jpeg -b 20 -m 1.25 -S 4 -q 95 ma5/FBBF.fig ma5/FBBF.jpg
fig2dev -L jpeg -b 20 -m 1.25 -S 4 -q 95 ma5/FBCM.fig ma5/FBCM.jpg



The logistic model and the nonlinear regression method are theoretically perfect. But the real-life data is too noisy to fit the theory gracefully. It is evident that no meaningful predictions can be obtained from these experiments. I am clueless how or whether more reliable predictions can be made possible.

The concept of best-fit curves is based on the minimization of the root-mean-square error. The minimum is taken over all values of N in the range 30 to the total number of days for which data are available.

In order to smooth out daily fluctuations without sacrificing tracking the trend, the idea of moving averages is implemented. An odd-length window is used. The average is assigned to the central day of the window. Therefore the predictions for (2k + 1)-day moving-average method is actually k days old although it partially incorporaates the data for the last k days. The daily-data predictions are essentially 1-day moving-average predictions.

The fixed-day predictions will no longer appear in this page. Only the best predictions will show. If needed, fixed-day data can be generated from the source codes.

These curves should not be considered as time-invariant. They evolve as more and more new data points are available. The predictions of today may be significantly different from what the program will do after a week (since seven new data points will be available by then). This model does not capture (neither does the SIR model) population size, density, mobility, age distribution, and so on. All these factors are clubbed together in a single parameter called the infection rate.

This is a free-lancing activity conducted soley by me, so far. Constructive suggestions are very welcome.