Predicting COVID-19 Cases in Kenya by Quadratic and Exponential Models
Predicting COVID-19 Cases in Kenya Based on Model 1: 5-Day Moving Average and
Quadratic Polynomial Model; Model 2: Exponential Model: Outlook for First 50 Days (13th March - 30th April 2020) by Prof. Sibilike K.
Makhanu, MMUST
Hey guys are you there? The
COVID-19 pandemic is with us in Kenya. Do not make any mistake about it. You
must strictly observe all instructions issued so far.
As we talk right now numbers are
increasing by the second. The world has recorded a total of over 2,000,000 cases, on 19th April 2020, a very psychological figure indeed.
The rate at which we are moving beyond this figure is scaring. My be we shall hit
it before I complete this article. Total deaths recorded so far are over 150,000. These are innocent souls. 150,000 people dying from a cause that is
alien to us is the most unfortunate occurrence during our modern time on this
earth.
Why? Why? Why? has God forsaken us. In 1st Corinthians 1:28-29 we are told that God uses what is not there, the lowly, the insignificant to undo what was there and what was mighty. This is in order to demonstrate to the mighty and awaken us as not to boast. This statement could not have been truer.
Why? Why? Why? has God forsaken us. In 1st Corinthians 1:28-29 we are told that God uses what is not there, the lowly, the insignificant to undo what was there and what was mighty. This is in order to demonstrate to the mighty and awaken us as not to boast. This statement could not have been truer.
I am writing this article from a
small village in western part of Kenya, just a couple of kilometers from an
extremely small village called Kimalewa in Bungoma County. This is the village
whose son, the only senior Engineer in the entire community became the first
causality of the Corona Virus in Kenya. He was my mentor and colleague, as we
are in the same profession of Civil Engineering. Good people of the world, do
not get bored. I am writing this because this is my way of mourning my
colleague since we are barred from attending the funeral service.
In this 3rd article on
Corona Virus in Kenya I make a contribution to the sensitization and awareness
by making an academic prediction of the COVID-19 confirmed cases based on
available data so far. The data is scanty and so it is extremely difficult for
us to make any meaningful contribution. We want to applaud the Government of
Kenya for the firm resolve that it has taken to institute measures that may
just help to contain this pandemic. Even as we look at the repercussions and
change any necessary strategy we urge all Kenyans to take this matter
seriously. The banning of crowds and assemblies, enforcement of social distancing, contact tracing and outlawed gatherings of any nature seems
to be an effective approach to combat this pandemic.
Methodology
In order to make any meaningful
prediction, we have used available data from 13th March 2020 when
the 1st confirmed case was reported in Kenya. We have looked at the data as
reported up to 3rd April 2020 which is Day Number 22.
I. Model 1: Quadratic Model
We smoothened these data series by using the 5-day Moving Average up to Day Number 12. The smoothened data set was then modeled by use of a quadratic polynomial. We used data for Day Number 6, 7 and 8 to calibrate the model then thereafter used data for Day number 3, 4 and 5 to validate the error term, in order to eliminate the perturbations and noise.
II. Model 2: Exponential Model
We used 22 sets of available data from 13th March 2020 up to and including 3rd April 2020.
I. Model 1: Quadratic Model
We smoothened these data series by using the 5-day Moving Average up to Day Number 12. The smoothened data set was then modeled by use of a quadratic polynomial. We used data for Day Number 6, 7 and 8 to calibrate the model then thereafter used data for Day number 3, 4 and 5 to validate the error term, in order to eliminate the perturbations and noise.
II. Model 2: Exponential Model
We used 22 sets of available data from 13th March 2020 up to and including 3rd April 2020.
Model Limitations:
· We could not establish the actual extent that
removes oscillations or noise. In the case of Corona virus reporting, the human
role is significant. For instance, suppose that the cases are not tested and
reported regularly on each day. Suppose the figures reported are not the true
picture on the ground. These are issues that may magnify errors.
·
We assume that the trend can be linearized within short intervals of time. But clearly Corona Virus spread has been unique in every region due to the highly diversified background conditions. Italy is not Kenya. Spain is not USA and China is not Africa. It is therefore most unlikely that we may develop a universally acceptable model.
We assume that the trend can be linearized within short intervals of time. But clearly Corona Virus spread has been unique in every region due to the highly diversified background conditions. Italy is not Kenya. Spain is not USA and China is not Africa. It is therefore most unlikely that we may develop a universally acceptable model.
· - Not all terms can be modeled. We have
attempted to model the confirmed number of cases. We have not modeled the
deaths, recoveries or detections.
· -Projections into long term future may be
erroneous as circumstances and conditions are constantly changing.
Results from the Prediction Models
In Kenya, the Ministry of Health, through the Principal Secretary (PS), has predicted that in the first week of April Kenya may have over 1,000 confirmed cases with these numbers rapidly rising to over 5,000 by mid-April and 10,000 at end of April. Our models predict otherwise.
Prediction by Model 1: Quadratic Model
If all conditions remained the same, we predict that by end of the first week of April Kenya may have almost 100 cases. These cases may double to over 200 by mid April and exceed the 300 mark at end of April 2020. To get predicted number of cases use the following formula:
No. of COVID-19 cases in Kenya = (DAY x DAY)/10 + (DAY x 29)/10 - 2. This formula is valid from 13th March 2020 (DAY = 1) to 11th April 2020 (DAY = 30).
Prediction by Model 2: Exponential Model
We used more data this time to fit a simple exponential function. The model is as follows:
No. of COVID-19 Cases in Kenya = 1144/1000 x (EXP(17xDAY/80)) where DAY is as discussed above and as defined below.
Conversion Table for Dates
The first case of Corona Virus in Kenya was tested on 12th March 2020. The case was however reported to the public on 13th March. In order to keep to consistency we have adopted the date of reporting results to be the day number. Thus 13th March 2020 is our DAY = 1, 19th March 2020 is DAY = 7, 26th March 2020 is DAY = 14, 2nd April 2020 is DAY = 21, 11th April 2020 is DAY = 30 and so on.
Illustrations:
(i) Model 1: Quadratic Model
For example on 30th March 2020 (DAY = 18, Predicted Number of Cases = 83); On 6th April 2020 (DAY = 25, Predicted Number of Cases = 133); on 13th March 2020 (DAY = 1 , Predicted Number of cases = 1); On 30th April 2020 (DAY = 49, Predicted Number of cases = 380). Please note that this model is for planning purposes only and is based on availed data by the Ministry of Health, Kenya.
Application of Quadratic Model in Planning:
This is an initial model based on first few data sets. With more data we shall be able to fit possibly an exponential rather than quadratic model. Once we detect the flattening of the curve we shall fit an appropriate model. But my fellow Kenyans this is not just an academic discourse. We must avoid death by all means. Thus such a model can inform planners on the effectiveness of measures being taken. Let's look at predicted and actual figures.
Prediction by Model 1: Quadratic Model
Date: 13Mar 19Mar. 26Mar. 2April. 3April
DAY: 1 7. 14. 21 22
Predicted: 1 23 58. 103 110
Actual:. 1. 7. 29. 110. 122
Date: 4Apr. 5Apr. 6Apr 7Apr 8Apr. 9Apr.
DAY: 23 24. 25 26 27 28
Predicted: 118 125. 133. 141. 149. 158
Actual:. 126. 142. 158. 172. 179. 184
Date: April: 10 11 12 13 14 15
DAY: 29 30. 31 32 33 34
Predicted:. 166. 175 184. 193 202 212
Actual:. 189. 191 197. 208 216. 225
Date: April: 16 17 18 19 20 21
DAY: 35 36. 37 38 39 40
Predicted:. 222. 232 242. 253 263 274
Actual:. 234. 246 262 270 281. 296
Date: April: 22 23 24 25 26 27.
DAY: 41 42. 43 44 45 46
Predicted:. 285 296 308. 319 331 343
Actual:. 303. 320 336 343. 355 363
Analysis of the table shows that initially, in the first two weeks, the model consistently shows higher numbers than those that were actually reported. At end of first week the model shows three times what was reported. This could be attributed to aggressive efforts taken by the Government or initial hiccups in the testing procedure. Please not that initially before Kenya acquired testing kits, samples had to be verified in other foreign laboratories including South Africa. This is seen at end of second week when what the model predicted was now only double what was actually reported. On 1st April 2020 or DAY = 20 reported cases were 81, almost similar to predicted number which is 96. Surprisingly at end of the 3rd week, on 2nd April 2020, which is DAY = 21, the actual reported numbers surpursed the model Prediction by 7 cases. On 3rd April which is DAY = 22 the reported cases have surpursed the predicted by 12 cases. This is significant. The question is whether we are losing the war or the growth rate has become exponential instead of quadratic?
Of most concern to us Kenyans is what happens in case we reach those numbers. If the corona virus patients pass the 300 mark then we shall be in really trouble. Although total number of ICU beds in Kenya are over 500, already over 450 are occupied and continue to be occupied by patients suffering from other ailments. This leaves a paltry 70 beds available for Corona Virus patients. Most of these beds are concentrated in Nairobi. Indeed some regions in this country do not have even a single functional ICU bed.
In Kenya, the Ministry of Health, through the Principal Secretary (PS), has predicted that in the first week of April Kenya may have over 1,000 confirmed cases with these numbers rapidly rising to over 5,000 by mid-April and 10,000 at end of April. Our models predict otherwise.
Prediction by Model 1: Quadratic Model
If all conditions remained the same, we predict that by end of the first week of April Kenya may have almost 100 cases. These cases may double to over 200 by mid April and exceed the 300 mark at end of April 2020. To get predicted number of cases use the following formula:
No. of COVID-19 cases in Kenya = (DAY x DAY)/10 + (DAY x 29)/10 - 2. This formula is valid from 13th March 2020 (DAY = 1) to 11th April 2020 (DAY = 30).
Prediction by Model 2: Exponential Model
We used more data this time to fit a simple exponential function. The model is as follows:
No. of COVID-19 Cases in Kenya = 1144/1000 x (EXP(17xDAY/80)) where DAY is as discussed above and as defined below.
Conversion Table for Dates
The first case of Corona Virus in Kenya was tested on 12th March 2020. The case was however reported to the public on 13th March. In order to keep to consistency we have adopted the date of reporting results to be the day number. Thus 13th March 2020 is our DAY = 1, 19th March 2020 is DAY = 7, 26th March 2020 is DAY = 14, 2nd April 2020 is DAY = 21, 11th April 2020 is DAY = 30 and so on.
Illustrations:
(i) Model 1: Quadratic Model
For example on 30th March 2020 (DAY = 18, Predicted Number of Cases = 83); On 6th April 2020 (DAY = 25, Predicted Number of Cases = 133); on 13th March 2020 (DAY = 1 , Predicted Number of cases = 1); On 30th April 2020 (DAY = 49, Predicted Number of cases = 380). Please note that this model is for planning purposes only and is based on availed data by the Ministry of Health, Kenya.
Application of Quadratic Model in Planning:
This is an initial model based on first few data sets. With more data we shall be able to fit possibly an exponential rather than quadratic model. Once we detect the flattening of the curve we shall fit an appropriate model. But my fellow Kenyans this is not just an academic discourse. We must avoid death by all means. Thus such a model can inform planners on the effectiveness of measures being taken. Let's look at predicted and actual figures.
Prediction by Model 1: Quadratic Model
Date: 13Mar 19Mar. 26Mar. 2April. 3April
DAY: 1 7. 14. 21 22
Predicted: 1 23 58. 103 110
Actual:. 1. 7. 29. 110. 122
Date: 4Apr. 5Apr. 6Apr 7Apr 8Apr. 9Apr.
DAY: 23 24. 25 26 27 28
Predicted: 118 125. 133. 141. 149. 158
Actual:. 126. 142. 158. 172. 179. 184
Date: April: 10 11 12 13 14 15
DAY: 29 30. 31 32 33 34
Predicted:. 166. 175 184. 193 202 212
Actual:. 189. 191 197. 208 216. 225
Date: April: 16 17 18 19 20 21
DAY: 35 36. 37 38 39 40
Predicted:. 222. 232 242. 253 263 274
Actual:. 234. 246 262 270 281. 296
Date: April: 22 23 24 25 26 27.
DAY: 41 42. 43 44 45 46
Predicted:. 285 296 308. 319 331 343
Actual:. 303. 320 336 343. 355 363
Date: April: 28 29 30 1. 2. 3 4.
DAY: 47 48. 49 50 51 52. 53.
Predicted:. 355. 368.380 393 408 419 433
Actual:. 374 384. 396 411. 435 465 490
Date: May: 5 6. 7. 8. 9. 10. 11
DAY: 54. 55. 56. 57. 58. 59. 60
Predicted:. 446. 460 474. 488 503 517 532
Actual:. 535. 582. 607 621. 649. 672 700
Date: May: 12 13 14 15 16 17 18
DAY: 61. 62. 63. 64 65. 66. 67
Predicted:. 547. 562. 578. 593 609 625 641
Actual:. 715. 737. 758. 781 830 887 912
Actual:. 715. 737. 758. 781 830 887 912
Date: May: 19 20 21 22. 23 24.
DAY: 68. 69. 70. 71 72. 73.
Predicted:. 658. 674. 691. 708 725. 743.
Actual:. 963. 1029 1109 1161 1192 1214
Actual:. 963. 1029 1109 1161 1192 1214
Date: May: 25 26 27. 28 29 30 31
DAY: 74. 75. 76. 77 78. 79. 80
Predicted:. 760. 778 796 814. 832. 851 870
Actual:.1286. 1348 1471 1618 1745 1888 1962
Date: June: 1 2 3 4 5 6 7
DAY: 81. 82 83. 84 85. 86. 87
Predicted:.
Actual:.
Analysis of the table shows that initially, in the first two weeks, the model consistently shows higher numbers than those that were actually reported. At end of first week the model shows three times what was reported. This could be attributed to aggressive efforts taken by the Government or initial hiccups in the testing procedure. Please not that initially before Kenya acquired testing kits, samples had to be verified in other foreign laboratories including South Africa. This is seen at end of second week when what the model predicted was now only double what was actually reported. On 1st April 2020 or DAY = 20 reported cases were 81, almost similar to predicted number which is 96. Surprisingly at end of the 3rd week, on 2nd April 2020, which is DAY = 21, the actual reported numbers surpursed the model Prediction by 7 cases. On 3rd April which is DAY = 22 the reported cases have surpursed the predicted by 12 cases. This is significant. The question is whether we are losing the war or the growth rate has become exponential instead of quadratic?
Of most concern to us Kenyans is what happens in case we reach those numbers. If the corona virus patients pass the 300 mark then we shall be in really trouble. Although total number of ICU beds in Kenya are over 500, already over 450 are occupied and continue to be occupied by patients suffering from other ailments. This leaves a paltry 70 beds available for Corona Virus patients. Most of these beds are concentrated in Nairobi. Indeed some regions in this country do not have even a single functional ICU bed.
(ii) Model 2: Exponential Model
This is an illustration on how to use the Exponential Model. It is that simple. Try it. On 30th March 2020 which is DAY = 18, Predicted Number of Cases = 52 while the reported is 50.); On 3rd April 2020 (DAY = 22, Predicted Number of Cases = 123 while reported is 122); on 13th March 2020 (DAY = 1 , Predicted Number of cases = 1 and reported is also 1); On 29th March 2020 (DAY = 17, Predicted Number of cases = 42 and reported is also 42). Please note that this model is for planning purposes only and data up to 3rd April was used in it's calibration. It is more or else a fitting model based on availed data by the Ministry of Health, Kenya.
Application of Exponential Model in Planning:
This is an initial model based on first few data sets. With more data we shall be able to refine these models. Let's look at predicted and actual figures based on Exponential Model 2.
Model 2: Prediction by Exponential Model
Date: 13Mar 19Mar. 26Mar. 2April. 3April
DAY: 1 7. 14. 21 22
Predicted: 1 6 22 99 123
Actual:. 1. 7. 29. 110. 122
Date: 4Apr. 5Apr. 6Apr 7Apr 8Apr. 9Apr.
DAY: 23 24. 25 26. 27. 28
Predicted: 152 188. 232. 287 355. 439
Actual:. 126. 142. 158. 172 179. 184
Date: April: 10 11 12 13 14 15
DAY: 29 30. 31 32 33 34
Predicted:. 528. 672 830 1027 1270 1571
Actual:. 189. 191 197. 208. 216. 225
Date: April: 16 17 18 19 20 21
DAY: 35 36. 37 38 39. 40
Predicted:. 1943 2403 2972 3676 4546 5622
Actual:. 234. 246 262. 270. 281. 296
Date: April: 22 23 24 25
DAY: 41 42. 43 44
Predicted:. 6954 8600 10,636 13,155
Actual:. 303. 320. 336. 343
Date: April: 26 27 28 29. 30
DAY: 45 46. 47 48. 49
Predicted:. 16,269 20,121 25,885. 30,777. 38,064
Actual:. 355 363 374. 384. 396
Comparison Between Quadratic and Exponential Models
A look at the above two sets of results shows that the exponential model provided a better fitting of the observed Corona Virus spread in Kenya up to the 3rd week but thereafter it gives much higher figures than actual numbers. This clearly shows that the Corona virus growth is not exponential. For instance on 5th April 2020, which is the 24th day, the Quadratic Model gives 125 cases while the Exponential model gives 188 cases. The cumulative actual number of cases reported is however 142. This is 14 percent higher than the Quadratic Model prediction but 25 percent less than that predicted by the Exponential Model.
Further application of the two models has brought out two interesting findings:
(i) the quadratic model has a better fit than the exponential model. Predicted values are within 90 - 95 % of the reported values. This clearly shows that Corona virus spread in Kenya, at least in the first 40 days is expressed by Quadratic model. For example on 17th April 2020 which is the 37th day the quadratic model predicts 242 cases, which is 92% of 262, the actual number of cases.
(ii) The exponential model has consistently predicted values that are much higher than actual numbers. For example on 17th April 2020, which is the 37th day the exponential model predicts 2,972 cases against the actual number of 262.
We shall continue applying the two models for the first 30 days up to 11th April 2020.
This is an illustration on how to use the Exponential Model. It is that simple. Try it. On 30th March 2020 which is DAY = 18, Predicted Number of Cases = 52 while the reported is 50.); On 3rd April 2020 (DAY = 22, Predicted Number of Cases = 123 while reported is 122); on 13th March 2020 (DAY = 1 , Predicted Number of cases = 1 and reported is also 1); On 29th March 2020 (DAY = 17, Predicted Number of cases = 42 and reported is also 42). Please note that this model is for planning purposes only and data up to 3rd April was used in it's calibration. It is more or else a fitting model based on availed data by the Ministry of Health, Kenya.
Application of Exponential Model in Planning:
This is an initial model based on first few data sets. With more data we shall be able to refine these models. Let's look at predicted and actual figures based on Exponential Model 2.
Model 2: Prediction by Exponential Model
Date: 13Mar 19Mar. 26Mar. 2April. 3April
DAY: 1 7. 14. 21 22
Predicted: 1 6 22 99 123
Actual:. 1. 7. 29. 110. 122
Date: 4Apr. 5Apr. 6Apr 7Apr 8Apr. 9Apr.
DAY: 23 24. 25 26. 27. 28
Predicted: 152 188. 232. 287 355. 439
Actual:. 126. 142. 158. 172 179. 184
Date: April: 10 11 12 13 14 15
DAY: 29 30. 31 32 33 34
Predicted:. 528. 672 830 1027 1270 1571
Actual:. 189. 191 197. 208. 216. 225
Date: April: 16 17 18 19 20 21
DAY: 35 36. 37 38 39. 40
Predicted:. 1943 2403 2972 3676 4546 5622
Actual:. 234. 246 262. 270. 281. 296
Date: April: 22 23 24 25
DAY: 41 42. 43 44
Predicted:. 6954 8600 10,636 13,155
Actual:. 303. 320. 336. 343
Date: April: 26 27 28 29. 30
DAY: 45 46. 47 48. 49
Predicted:. 16,269 20,121 25,885. 30,777. 38,064
Actual:. 355 363 374. 384. 396
Comparison Between Quadratic and Exponential Models
A look at the above two sets of results shows that the exponential model provided a better fitting of the observed Corona Virus spread in Kenya up to the 3rd week but thereafter it gives much higher figures than actual numbers. This clearly shows that the Corona virus growth is not exponential. For instance on 5th April 2020, which is the 24th day, the Quadratic Model gives 125 cases while the Exponential model gives 188 cases. The cumulative actual number of cases reported is however 142. This is 14 percent higher than the Quadratic Model prediction but 25 percent less than that predicted by the Exponential Model.
Further application of the two models has brought out two interesting findings:
(i) the quadratic model has a better fit than the exponential model. Predicted values are within 90 - 95 % of the reported values. This clearly shows that Corona virus spread in Kenya, at least in the first 40 days is expressed by Quadratic model. For example on 17th April 2020 which is the 37th day the quadratic model predicts 242 cases, which is 92% of 262, the actual number of cases.
(ii) The exponential model has consistently predicted values that are much higher than actual numbers. For example on 17th April 2020, which is the 37th day the exponential model predicts 2,972 cases against the actual number of 262.
We shall continue applying the two models for the first 30 days up to 11th April 2020.
Our only hope is thus in the prevention. Kenyans remain at home. Minimize travels. Avoid gatherings like a plague. Sanitize and keep yourself clean at all times. Observe all the guidelines issued by the Ministry of Health. Above all trust in your Creator, our God the Almighty.
Very informative Prof.The best option is prevention,let us stay at home and be safe.
ReplyDeleteFantastic prediction Prof , although today the number of cases in Kenya have reached 110 thus increasing by over 20 cases per day yesterday and today. May God Almighty intervene and let us all follow guidelines from Ministry of Health.
ReplyDeleteThis is quite informative! Thank you prof.
ReplyDeleteExtremely useful especially as we enter vulnerable phases,,, shared widely with students of Disaster Management and Humanitarian Assistance
ReplyDeleteVery informative, however prevention in our case brings other dynamics .
ReplyDeleteGovernance, humanitarianism and livelihoods. We are a developing country most people are still struggling with the basic needs ie food..how do we implement preventive measures ie lockdown, quarantine etc and ensuring that we observe humanitarianism?
Last week we witnessed frustrated Kenyans refusing to comply with lock down citing hunger, does this bring another aspect of the role played by pandemics in conflicts and mostly in developing countries??
A very educative projection prof, showing how it has come to a point where each one of us has to take personal responsibility by seriously adhering to the given guidelines.
ReplyDeleteThats the way the curve will flatten and drop down...
An excellent insight into the way we can predict the spread of this pandemic and also to assess when it might be coming to an end.
ReplyDeleteQuite informative Prof. Looking on the predictions the numbers are increasing the only way to overcome this is adhering to health guidelines not forgetting the main key prayer and fasting so that Almighty God can protect us
ReplyDeleteThis is very informative Considering what is going on , breaking out from quarrantine facilities, how does it affect the model. That is the human behaviour.
ReplyDeleteSalute you Prof.
ReplyDeleteYour student at EU 2016