Data-driven prediction of infection by the SIR model

We use data on confirmed COVID-19 cases to calibrate the parameters of the SIR model with interventions through Bayesian inference. The inferred parameters indicate the time of interventions and their effect on the reproduction number. See our article Data-driven inference of the reproduction number for COVID-19 before and after interventions for 51 European countries for more details.
Link to share: 🔗

Country 1

Total infected for each day
Population (

Country 2

Total infected for each day
Population (

Common Parameters

(infer a second intervention increasing the reproduction number)
Prediction horizon (
Data points to leave out to verify the prediction (
Number of samples (
(using more samples produces better estimates but requires longer computation times)
Credible interval (


The SIR model estimates the number of susceptible (\( S \)), infected (\( I \)) and removed (\( R \); recovered or dead) in time \( t \), using the following set of differential equations: \[ \frac{dS}{dt} = -\frac{\GAMMA R_t I S}{N}, \quad \frac{dI}{dt} = \frac{\GAMMA R_t I S}{N} - \GAMMA I, \quad \frac{dR}{dt} = \GAMMA I \text{,} \] where \( N \) is the total population, \( R_t \) is the effective reproduction number and \( \GAMMA \) is the recovery rate. Interventions, such as lockdown and social distancing, are modelled by the effective reproduction number \[ R_t= \begin{cases} R_0 , & t \leq t_\text{int} - \tfrac{1}{2} \delta_\text{int}, \\ \text{linear}, & t_\text{int} - \tfrac{1}{2} \delta_\text{int} < t < t_\text{int} + \tfrac{1}{2} \delta_\text{int}, \\ k_\text{int}\,R_0 , & t \geq t_\text{int} + \tfrac{1}{2} \delta_\text{int}, \end{cases} \] where \( R_0 \) is the basic reproduction number, \( t_\text{int} \) the intervention time, \( k_\text{int} \in (0,1) \) the intervention factor, and \( \delta_\text{int} = 10 \text{ days} \) the intervention transition time. Parameters \( R_0 \), \( t_\text{int} \) and \( k_\text{int} \) are inferred from the historical data on the number of new infections per day \( I_\text{daily}(t) = S(t - 1) - S(t) \) using Bayesian uncertainty quantification.

The country presets do not contain initial days with number of reported cases smaller than 2 per million or smaller than 5 in absolute value. Countries with fewer than 3 data points are not listed.

Related Work

These calculations represent a model-based estimation from the provided data and should not be considered as an expert opinion of the authors or ETH Zürich. The input data above is transmitted to our server for computing the results and briefly deleted afterwards. We do not collect or share any data for other purposes.
Article: P. Karnakov, G. Arampatzis, I. Kičić, F. Wermelinger, D. Wälchli, C. Papadimitriou, and P. Koumoutsakos.
Data-driven inference of the reproduction number for COVID-19 before and after interventions for 51 European countries. 2020. 10.4414/smw.2020.20313
Data: Confirmed COVID-19 cases from University of Washington HGIS Lab.
Country population from samayo/country-json and Wikipedia.
The Korali Framework

ETH Zürich, March-May 2020