<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJMSi</journal-id><journal-title-group><journal-title>Open Journal of Modelling and Simulation</journal-title></journal-title-group><issn pub-type="epub">2327-4018</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojmsi.2021.93016</article-id><article-id pub-id-type="publisher-id">OJMSi-110620</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  A Comparison of Deterministic and Stochastic Susceptible-Infected-Susceptible (SIS) and Susceptible-Infected-Recovered (SIR) Models
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Abdelmalik</surname><given-names>Moujahid</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Fernando</surname><given-names>Vadillo</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Mathematics, University of the Basque Country, Biscay, Spain</addr-line></aff><pub-date pub-type="epub"><day>21</day><month>05</month><year>2021</year></pub-date><volume>09</volume><issue>03</issue><fpage>246</fpage><lpage>258</lpage><history><date date-type="received"><day>31,</day>	<month>March</month>	<year>2021</year></date><date date-type="rev-recd"><day>16,</day>	<month>July</month>	<year>2021</year>	</date><date date-type="accepted"><day>19,</day>	<month>July</month>	<year>2021</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  In this paper we build and analyze two stochastic epidemic models with death. The model assume
  s
   that only susceptible individuals (S) can get infected (I) and may die from this disease or a recovered individual becomes susceptible again (SIS model) or completely immune (SIR Model) for the remainder of the study period. Moreover, it is assumed there are no births, deaths, immigration or emigration during the study period; the community is said to be closed. In these infection disease models, there are two central questions: first it is the disease extinction or not and the second studies the time elapsed for such extinction, this paper will deal with this second question because the first answer corresponds to the basic reproduction number defined in the bibliography. More concretely, we study the mean-extinction of the diseases and the technique used here first builds the backward Kolmogorov differential equation and then solves it numerically using finite element method with FreeFem++. Our contribution and novelty 
  are
   the following: however the reproduction number effectively concludes the extinction or not of the disease, it does not help to know its extinction times because example with the same reproduction numbers has very different time. Moreover, the SIS model is slower, a result that is not surprising, but this difference seems to increase in the stochastic models with respect to the deterministic ones, it is reasonable to assume some uncertainly.
 
</p></abstract><kwd-group><kwd>Persistence Time</kwd><kwd> Epidemic Dynamics</kwd><kwd> Stochastic Epidemic Models</kwd><kwd> Finite Element Method</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The ordinary differential equations in epidemic models has been a well-known topic for some time, there exist classic book like ( [<xref ref-type="bibr" rid="scirp.110620-ref2">2</xref>], Chap. 10) or [<xref ref-type="bibr" rid="scirp.110620-ref3">3</xref>] and more recent monographs: [<xref ref-type="bibr" rid="scirp.110620-ref4">4</xref>] and [<xref ref-type="bibr" rid="scirp.110620-ref5">5</xref>]. All these deterministic models serve as a framework for formulating analogous stochastic models and as a source of comparison with the stochastic models (see for example [<xref ref-type="bibr" rid="scirp.110620-ref6">6</xref>] for a complete reference guide to all important contributions in stochastic epidemic models). In this way, there have been two ways to pass from the ordinary system to the stochastic system, one of them is simply adding new stochastic terms, for example in [<xref ref-type="bibr" rid="scirp.110620-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref10">10</xref>]. The other one is explained in [<xref ref-type="bibr" rid="scirp.110620-ref11">11</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref12">12</xref>] and it is used in this paper. This technique begins by assuming different probabilities of the changes and calculating means and covariance matrix to obtain a stochastic differential system. But later we’ll see that the stochastic parts are different and this will cause great differences in the asymptotic behavior of the solutions (see for example this results in [<xref ref-type="bibr" rid="scirp.110620-ref13">13</xref>] for a simple example about a population model).</p><p>The Stochastic Differential Equation (SDE) system for the dynamics of n variables has the form</p><p>d X = μ ( t , X ) + B ( t , X ) d W , (1)</p><p>where X = ( X 1 , ⋯ , X n ) T and W = ( W 1 , ⋯ , W n ) T are n independent Wiener processes. The vectorial function μ ( t , X ) is called the drift, and B ( t , X ) the diffusion matrix. Moreover, the components μ j = E ( X j ) , j = 1 , ⋯ , n and the diffusion term is the square root of the covariance matrix D ( t , X ) i.e. B ⋅ B = D .</p><p>Obviously, a key question in the epidemic models is to understand the constrains that lead to extinction or not of the disease and when. In order to study this question, let define the random variable T that indicates the persistence time i.e. the time it takes for the size of either variables to reach zero.</p><p>T ≡ inf { t ≥ 0 : X j = 0 ,     for   some   j = 1 , ⋯ , n } ,</p><p>obviously T depends on the initial value X ( 0 ) although it is not explicitly indicated.</p><p>As discussed in ( [<xref ref-type="bibr" rid="scirp.110620-ref2">2</xref>], p. 150), the mean persistence-time τ ≡ E ( T ) for (1) satisfies the stationary backward Kolmogorov equation</p><p>L ( τ )   ≡   ∑ j = 1 n     μ j   ∂ τ x j   +   1 2   ∑ j = 1 n   ∑ k = 1 n     D j k   ∂ 2 τ ∂ x j ∂ x k   =   − 1. (2)</p><p>and with boundary conditions</p><p>{ τ ( ⋯ , x j − 1 , 0 , x j + 1 , ⋯ ) = 0 , ∂ τ ∂ x j ( ⋯ , x j − 1 , M j , x j + 1 ⋯ ) = 0 , (3)</p><p>assuming that x j ≤ M j ,   j = 1 , ⋯ , n .</p><p>The Equation (2) is an Elliptic Partial Differential Equations of Second Order [<xref ref-type="bibr" rid="scirp.110620-ref14">14</xref>], really it is a advection diffusion equation, and as the name suggests, the mean persistence-time will depend on the operator D . These comments would explain the results in [<xref ref-type="bibr" rid="scirp.110620-ref13">13</xref>]. Moreover in [<xref ref-type="bibr" rid="scirp.110620-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref10">10</xref>] the matrices B are diagonals which implies that the variables are not correlated, an unreasonable hypothesis. As already commented in the abstract, we will solved numerically the backward Kolmogorov equation using finite element method with FreeFem++. These authors et. al. have used this technique en several paper: [<xref ref-type="bibr" rid="scirp.110620-ref13">13</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref16">16</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] or [<xref ref-type="bibr" rid="scirp.110620-ref18">18</xref>] with very hopeful results to spread more complex problems.</p><p>This paper is organized as follows. In Section 2, we describe the SIS and SIR models with death and obtain the backward Kolmogorov equations. In Section 3 we explain the numerical methods with their results, with special attention to variational formulation of the problem (10) - (11). Finally in Section 4 we analyze the numerical results and draw the main conclusions.</p><p>Our numerical methods were implemented in Matlab&#169; and FreeFem++ which is freely available and particularly efficient, see [<xref ref-type="bibr" rid="scirp.110620-ref19">19</xref>]. The experiments were carried out in an Intel(R) Core(TM)i7-8665U CPU @ 1.90 GHz, 16.0 GB of RAM. The codes for the numerical tests are available on request.</p></sec><sec id="s2"><title>2. Two Models with Death</title><sec id="s2_1"><title>2.1. Stochastic SIS Model</title><p>In the SIS epidemic models the variable X = ( S , I ) T where S = S ( t ) is the susceptible population size and I = I ( t ) is the infected population size. In this model an individual starts off susceptible, at some stage catches the disease and after a short infectious period become susceptible again. Such a model is appropriate for a bacterial disease such as pneumococcus.</p><p>The SIS model without demography is considerably simpler than the one considered here (see for example [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] and its references). The SIS model with demography was proposed in [<xref ref-type="bibr" rid="scirp.110620-ref20">20</xref>] or [<xref ref-type="bibr" rid="scirp.110620-ref21">21</xref>], in particular we consider only death of infected individuals with rate β . The changes and their probabilities to the first order in Δ t are given in <xref ref-type="table" rid="table1">Table 1</xref> with x = ( S , I ) T .</p><p>Following ( [<xref ref-type="bibr" rid="scirp.110620-ref11">11</xref>], p. 148) we obtain the following deterministic model:</p><p>{ d S d t   =   μ 1 ( S , I )   = − α S I S + I + γ I , d I d t   =   μ 2 ( S , I )   =   α S I S + I − ( γ + β ) I , (4)</p><p>This model has a fixed point at I = 0 because μ 1 ( S , 0 ) = μ 2 ( S , 0 ) = 0 and the solution approaches the disease-free equilibrium lim t → ∞ I ( t ) = 0 when a</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Possible change in x = ( S , I ) T and their probabilities</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Change</th><th align="center" valign="middle" >Propability</th></tr></thead><tr><td align="center" valign="middle" >Δ x ( 1 ) [ − 1,1 ] T</td><td align="center" valign="middle" >α S I / ( S + I ) Δ t</td></tr><tr><td align="center" valign="middle" >Δ x ( 2 ) [ 0, − 1 ] T</td><td align="center" valign="middle" >β I Δ t</td></tr><tr><td align="center" valign="middle" >Δ x ( 3 ) [ 1, − 1 ] T</td><td align="center" valign="middle" >γ I Δ t</td></tr></tbody></table></table-wrap><p>new basic reproduction number satisfies R = α / ( γ + β ) ≤ 1 (see [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] or [<xref ref-type="bibr" rid="scirp.110620-ref22">22</xref>] ).</p><p>The covariance matrix</p><p>D ( S , I ) =   ( d ( S , I ) − d ( S , I ) − d ( S , I ) d ( S , I )   +   β   I ) , (5)</p><p>with d ( S , I ) = α S I S + I + γ I .</p><p>Then if S ( 0 ) = x , I ( 0 ) = y its backward Kolmogoronv equation is</p><p>μ 1 ( x , y ) ∂ τ ∂ x + μ 2 ( x , y ) ∂ τ ∂ y + 1 2 d ( x , y ) ( ∂ 2 τ ∂ x 2 − 2 ∂ 2 τ ∂ x ∂ y + ∂ 2 τ ∂ y 2 ) + β   y 2 ∂ 2 τ ∂ y 2 = − 1 , (6)</p><p>with a singularity at the boundary y = 0 because for this value the coefficient of the second derivative is cancelled, which is why boundary payer will arise. The boundary conditions are:</p><p>{ τ ( 0 , x ) = τ ( y , 0 ) = 0 , ∂ τ ∂ x ( M x , y ) = 0 , ∂ τ ∂ y ( x , M y ) = 0 , (7)</p><p>provided that the number of x and y cannot exceed some values M x and M y respectively.</p></sec><sec id="s2_2"><title>2.2. Stochastic SIR Model</title><p>In the SIR epidemic models the variable X = ( S , I , R ) T where S = S ( t ) is the susceptible population size, I = I ( t ) is the infected population size and R ( t ) the recovered individuals because are assumed that individuals are immune after recovering from the disease. For example, [<xref ref-type="bibr" rid="scirp.110620-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.110620-ref10">10</xref>] proposes a model that in view of the results of [<xref ref-type="bibr" rid="scirp.110620-ref13">13</xref>] does not have any practical value, in my opinion.</p><p>Now, the changes and their probabilities to the first order in Δ t are given in <xref ref-type="table" rid="table2">Table 2</xref> with x = ( S , I , R ) T .</p><p>Quite similar the model in [<xref ref-type="bibr" rid="scirp.110620-ref23">23</xref>] plus a new parameter β . The deterministic model is</p><p>{ d S d t   =   − α S I S + I , d I d t   =   α S I S + I   −   ( γ + β ) I , d R d t   =   γ I , (8)</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Possible change in x = ( S , I , R ) T and their probabilities</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Change</th><th align="center" valign="middle" >Propability</th></tr></thead><tr><td align="center" valign="middle" >Δ x ( 1 ) [ − 1,1,0 ] T</td><td align="center" valign="middle" >α S I / ( S + I ) Δ t</td></tr><tr><td align="center" valign="middle" >Δ x ( 2 ) [ 0, − 1,1 ] T</td><td align="center" valign="middle" >γ I Δ t</td></tr><tr><td align="center" valign="middle" >Δ x ( 3 ) [ 0, − 1,0 ] T</td><td align="center" valign="middle" >β I Δ t</td></tr></tbody></table></table-wrap><p>In this differential system, the surface I = 0 is fix and its jacobian has three eigenvalues: λ = 0 doble and λ = α − ( γ + β ) and then when</p><p>γ   +   β   −   1   &lt; α &lt;   1   +   γ   +   β ,</p><p>and the matrix covariance</p><p>D ( S , I , R ) =   ( α S I S + I − α S I S + I 0 − α S I S + I α S I S + I +   ( γ + β ) I − γ I 0 − γ I γ I ) . (9)</p><p>Now assuming S ( 0 ) = x , I ( 0 ) = y , R ( 0 ) = z the backward Kolmogoronv equation is</p><p>− d ( x , y ) ∂ τ ∂ x + ( d ( x , y ) − ( γ + β ) y )   ∂ τ ∂ y + γ y ∂ τ ∂ z + 1 2   d ( x , y ) ( ∂ 2 τ ∂ x 2 − 2 ∂ 2 τ ∂ x ∂ y + ∂ 2 τ ∂ y 2 ) + 1 2   ( γ + β ) y ∂ 2 τ ∂ y 2 + 1 2   γ y ∂ 2 τ ∂ z 2 − γ y ∂ 2 τ ∂ y ∂ z = − 1 (10)</p><p>where d ( x , y ) = α x y x + y , and the boundary conditions</p><p>{ τ ( 0 , y , z ) = τ ( x , 0 , z ) = τ ( x , y , 0 ) = 0 ,     on     Γ 1 , ∂ τ ∂ x ( M x , y , z ) = 0 ,     on     Γ 2 , ∂ τ ∂ y ( x , M y , z ) = 0 ,     on     Γ 3 , ∂ τ ∂ z ( x , y , M z ) = 0 ,     on     Γ 4 , (11)</p><p>provided that the number of x, y and z cannot exceed some values M x , M y and M z respectively.</p></sec></sec><sec id="s3"><title>3. Numerical Results</title><sec id="s3_1"><title>3.1. Deterministic Models</title><p>In the deterministic models, the value of the basic reproductive number ℜ 0 = α β + γ determines persistence or extinction of the disease. If ℜ 0 &lt; 1 , the disease is eliminated, whereas if ℜ 0 &gt; 1 , the disease persists in the population (see for example [<xref ref-type="bibr" rid="scirp.110620-ref22">22</xref>] when the total population size remains constant). However, this parameter does not inform about the speed towards one situation or another.</p><p>Because these kinds of models are appropriate for a bacterial disease such as pneumococcus consider in [<xref ref-type="bibr" rid="scirp.110620-ref21">21</xref>], they study the pneumococcus in the population of Scottish children under two years, first we test this realistic example (Case 1) and later two example with similar value for ℜ 0 .</p><p>Let’s consider the following example.</p><p>Case 1: In [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] we studied the pneumococcus in the population of Scottish children with α = 0.0214 , γ = 0.0211 , β = 0.00137 ⇒ ℜ 0 = 0.9986 &lt; 1 .</p><p>Case 2: For α = 0.1997 , γ = 0.1 , β = 0.1 ⇒ ℜ 0 = 0.9986 &lt; 1 .</p><p>Case 3: For α = 0.3994 , γ = 0.3 , β = 0.1 ⇒ ℜ 0 = 0.9986 &lt; 1 .</p><p>We solved the two deterministic models (4) and (8) using Matlab. In <xref ref-type="fig" rid="fig1">Figure 1</xref> we have plotted two paths for 0 ≤ t ≤ 25000 in blue is the SIS Model with S ( 0 ) = 1000 , I ( 0 ) = 10 and in red the SIR Model with S ( 0 ) = 1000 , I ( 0 ) = 10 , R ( 0 ) = 1 , in both path I ( t ) → 0 but in very different directions, a result that we would expect. Moreover, it would be more natural to ask Matlab to return the time t * such that 0 &lt; I ( t * ) = I * ≪ 1 , which can be done using the event location facility. The highlighted numerical results are summarized in <xref ref-type="table" rid="table3">Table 3</xref>. In this table we have noted the time t 0 where I ( t * ) ≈ 0.99 in the first line, and I ( t * ) ≈ 10 − 3 in the second.</p><p>These three examples with the same reproduction number already have slight differences in their extinction, the third case is by far the fastest as well as the second model SIR.</p><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> Time t * for S ( 0 ) = 1000 , I ( 0 ) = 10 </title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Case 1</th><th align="center" valign="middle" >Case 2</th><th align="center" valign="middle" >Case 3</th></tr></thead><tr><td align="center" valign="middle" >SIS</td><td align="center" valign="middle" >24,181.70</td><td align="center" valign="middle" >1853.74</td><td align="center" valign="middle" >744.63</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >234,701.69</td><td align="center" valign="middle" >20,987.26</td><td align="center" valign="middle" >8869.11</td></tr><tr><td align="center" valign="middle" >SIR</td><td align="center" valign="middle" >10,945.86</td><td align="center" valign="middle" >1174.60</td><td align="center" valign="middle" >587.31</td></tr><tr><td align="center" valign="middle" >R ( 0 ) = 1</td><td align="center" valign="middle" >87,243.82</td><td align="center" valign="middle" >9795.86</td><td align="center" valign="middle" >4897.89</td></tr></tbody></table></table-wrap></sec><sec id="s3_2"><title>3.2. Mean Extinction-Time in Each Model</title><p>These authors have resolved the boundary problems (6) - (7) using the Finite Element Method (FEM) and the software FreeFem++ which is freely available [<xref ref-type="bibr" rid="scirp.110620-ref19">19</xref>], this is a standard technique hence we will skip the details [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>]. In <xref ref-type="fig" rid="fig2">Figure 2</xref> we can see the numerical solution of (6) - (7) with M x = 1000 , M y = 100 . Note that the three graphs are very similar but the scale is quite different, the value of its peaks can be read in <xref ref-type="table" rid="table4">Table 4</xref>.</p><table-wrap id="table4" ><label><xref ref-type="table" rid="table4">Table 4</xref></label><caption><title> Maximum τ for 0 ≤ I ( 0 ) , R ( 0 ) ≤ 100 </title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Case 1</th><th align="center" valign="middle" >Case 2</th><th align="center" valign="middle" >Case 3</th></tr></thead><tr><td align="center" valign="middle" >SIS</td><td align="center" valign="middle" >2759.2611</td><td align="center" valign="middle" >241.1770</td><td align="center" valign="middle" >124.7920</td></tr><tr><td align="center" valign="middle" >SIR in S ( 0 ) = 1000</td><td align="center" valign="middle" >1373.1032</td><td align="center" valign="middle" >149.9456</td><td align="center" valign="middle" >74.1740</td></tr></tbody></table></table-wrap><p>On the other hand, the boundary problem (10) - (11) has three independent variables which further complicates its numerical study, although the technique is similar. Let us multiply multiple (10) by a regular function ϕ ( x , y , z ) satisfying the homogeneous Dirichlet boundary conditions on Γ 1 . Integrating over the domain Ω = [ 0 , M x ] &#215; [ 0 , M y ] &#215; [ 0 , M z ] , the following terms with will appear:</p><p>∫ Ω     d ( x , y ) ∂ 2 τ ∂ x 2 ϕ = − ∫ Ω     d ∂ τ ∂ x ∂ ϕ ∂ x   − ∫ Ω ∂ d ∂ x ∂ τ ∂ x ϕ   + ∫ ∂ Ω     d ( x , y ) ϕ ( ∂ τ ∂ x n x ) ,</p><p>∫ Ω     c ( x , y ) ∂ 2 τ ∂ y 2 ϕ = − ∫ Ω     c ∂ τ ∂ y ∂ ϕ ∂ y   − ∫ Ω ∂ c ∂ y ∂ τ ∂ y ϕ + ∫ ∂ Ω     c ( x , y ) ϕ ( ∂ τ ∂ y n y ) ,</p><p>∫ Ω     γ y ∂ 2 τ ∂ z 2 ϕ = − ∫ Ω     γ y ∂ τ ∂ z ∂ ϕ ∂ z + ∫ ∂ Ω     γ y ϕ ( ∂ τ ∂ z n z ) ,</p><p>− ∫ Ω     d ( x , y ) ∂ 2 τ ∂ x ∂ y ϕ = ∫ Ω     d ∂ τ ∂ y ∂ ϕ ∂ x   + ∫ Ω ∂ d ∂ x ∂ τ ∂ y ϕ   − ∫ ∂ Ω     d ϕ ( ∂ τ ∂ y n x ) ,</p><p>− ∫ Ω     γ y ∂ 2 τ ∂ y ∂ z ϕ = ∫ Ω     γ y ∂ τ ∂ z ∂ ϕ ∂ y   + ∫ Ω     γ ∂ τ ∂ z ϕ   − ∫ ∂ Ω     γ y ϕ ( ∂ τ ∂ z n y ) ,</p><p>and c ( x , y ) = d ( x , y ) + ( γ + β ) y and where the boundary terms are of the following form:</p><p>∫ ∂ Ω     d ϕ ( ∂ τ ∂ x n x ) = ∫ ∂ Ω     c ϕ ( ∂ τ ∂ y n y )   =   ∫ ∂ Ω     γ y ϕ ( ∂ τ ∂ z n z ) = 0 , ∫ ∂ Ω     d ϕ ( ∂ τ ∂ y n x ) = ∫ Γ 2     d ϕ ∂ τ ∂ y , ∫ ∂ Ω     γ y ϕ ( ∂ τ ∂ z n y ) = ∫ Γ 3     γ y ϕ ∂ τ ∂ z . .</p><p>In <xref ref-type="fig" rid="fig3">Figure 3</xref> we can see the numerical solution (10) - (11) in S ( 0 ) = x = 1000 and M y = 100 , M z = 100 , again the three graphs are very similar but the scale is quite different and the value of its peaks can be read in <xref ref-type="table" rid="table4">Table 4</xref>. Note that the value of its peaks are close to half of the SIS model, it now appears that the distance between the two models is greater than the deterministic case.</p></sec><sec id="s3_3"><title>3.3. Numerical Simulation of the Stochastic Models</title><p>In view of the results of the two previous subsections: the great difference in extinction time between deterministic and stochastic models, we thought it reasonable to use some numerical simulation of stochastic differential equations in order to have more information. Our numerical simulations for the two stochastic</p><p>models have been done using the classic Euler-Maruyama numerical method, although it has strong order 1/2 and weak order 1 (we refer to [<xref ref-type="bibr" rid="scirp.110620-ref24">24</xref>] or [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] for a review on the numerical solutions of SDEs). This method applied to stochastic SIS model is straightforward and may be described as follows:</p><p>Algorithm 3.1. Given α , β and γ , let Δ t be the time-step, nrun, the number of simulations, and Tol the tolerances. Then, we have:</p><disp-formula id="scirp.110620-formula1"><graphic  xlink:href="//html.scirp.org/file/3-2860207x119.png?20210716170042362"  xlink:type="simple"/></disp-formula><p>This Algorithm obtains the mean and standard deviation of the stopping time T * = i n f { I n   or   S n   &lt; T o l } . The numerical results are in <xref ref-type="table" rid="table5">Table 5</xref> with S ( 0 ) = 1000 , I ( 0 ) = 10 , Δ t = 10 − 3 , n r u m = 100 . Note first that deviations from mean are very high, to obtain conclusions it would be necessary to decrease the step and increase the number of trials, which would cost a lot of computing time with doubtful results due to possible on numerical stability problems. In other words, we needed more precise and reliable numerical methods. However, note that the times are less than the estimates in the previous subsection and much further away from the deterministic problem. For the SIR model the results are very similar.</p><table-wrap id="table5" ><label><xref ref-type="table" rid="table5">Table 5</xref></label><caption><title> Euler-Maruyama for S ( 0 ) = 1000 , I ( 0 ) = 10 </title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Case 1</th><th align="center" valign="middle" >Case 2</th><th align="center" valign="middle" >Case3</th></tr></thead><tr><td align="center" valign="middle" >SIS</td><td align="center" valign="middle" >1134.5123</td><td align="center" valign="middle" >101.4930</td><td align="center" valign="middle" >52.2847</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >904.1301</td><td align="center" valign="middle" >97.7477</td><td align="center" valign="middle" >40.6314</td></tr><tr><td align="center" valign="middle" >SIR</td><td align="center" valign="middle" >870.9902</td><td align="center" valign="middle" >90.7511</td><td align="center" valign="middle" >45.4430</td></tr><tr><td align="center" valign="middle" >R ( 0 ) = 1</td><td align="center" valign="middle" >742.2000</td><td align="center" valign="middle" >67.9975</td><td align="center" valign="middle" >34.6920</td></tr></tbody></table></table-wrap></sec></sec><sec id="s4"><title>4. Conclusions</title><p>In summary, in this paper first we have found the stochastic SIS and SIR models with death and computed the mean of the extinction-time analyzing and simulating its backward Kolmogorov differential equation. The more important conclusions are the following:</p><p>1) Although the reproduction number concludes the extinction or not of the disease, however, this number it does not help to know its extinction times because example with the same reproduction numbers has quite different time.</p><p>2) The cases that increase the value of the first parameter α also disappear more quickly, although always with the reproduction number ℜ 0 &lt; 1 .</p><p>3) Infection disappears much earlier in stochastic models than in the corresponding deterministic models.</p><p>4) Finally, we again encounter a stochastic model, as we saw in [<xref ref-type="bibr" rid="scirp.110620-ref18">18</xref>], which is verydifferent from the deterministic model.</p><p>Perhaps the most important problem now is to describe techniques to computer the parameter values using data set, i.e. a calibration of the model, in [<xref ref-type="bibr" rid="scirp.110620-ref17">17</xref>] these authors have researched an academic example.</p></sec><sec id="s5"><title>Acknowledgements</title><p>This work was supported by Spanish Ministry of Sciences Innovation and Universities with the project PGC2018-094522-B-100 and by the Basque Government with the project IT1247-19. The authors would like to thank the referees for the constructive and helpful comments and suggestions on the manuscript.</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Moujahid, A. and Vadillo, F. (2021) A Comparison of Deterministic and Stochastic Susceptible-Infected-Susceptible (SIS) and Susceptible-Infected-Recovered (SIR) Models. Open Journal of Modelling and Simulation, 9, 246-258. https://doi.org/10.4236/ojmsi.2021.93016</p></sec></body><back><ref-list><title>References</title><ref id="scirp.110620-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Brockman, J. (1995) The Third Culture: Beyond the Scientific Revolution. Simon and Shuster, New York.</mixed-citation></ref><ref id="scirp.110620-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Murray, J.D. (2002) Mathematical Biology I: An Introduction. 3rd Edition, Springer-Verlag, New York. https://doi.org/10.1007/b98868</mixed-citation></ref><ref id="scirp.110620-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Daley, D.J. and Gani, J. (1999) Epidemid Modelling: An Introduction. Cambridge University Press, Cambridge.</mixed-citation></ref><ref id="scirp.110620-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Brauer, F. and Castillo-Chaves, C. (2012) Mathematical Models in Population Biology and Epidemiology. Springer, New York.</mixed-citation></ref><ref id="scirp.110620-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Brauer, F., Castillo-Chaves, C. and Feng, Z. (2019) Mathematical Models in Epidemiology. Springer, New York. https://doi.org/10.1007/978-1-4939-9828-9</mixed-citation></ref><ref id="scirp.110620-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Britton, T. (2010) Stochastic Epidemic Model: A Survey. Mathematical Biosciences, 225, 24-35. https://doi.org/10.1016/j.mbs.2010.01.006</mixed-citation></ref><ref id="scirp.110620-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Jiang, D., Yu, J., Ji, C. and Shi, N. (2011) Asymptotic Behavior of Global Positive Solution to a Stochastic SIR Model. Mathematical and Computer Modelling, 54, 221-232. https://doi.org/10.1016/j.mcm.2011.02.004</mixed-citation></ref><ref id="scirp.110620-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Zhao, Y. and Jiang, D. (2014) The Threshold of a Stochastic SIRS Epidemic Model with Saturated Incidence. Applied Mathematics Letter, 34, 90-93. https://doi.org/10.1016/j.aml.2013.11.002</mixed-citation></ref><ref id="scirp.110620-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Rajasekar, S.P. and Pitchaimani, M. (2020) Ergodic Stationary Distribution and Extinction of a Stochastic SIRS Epidemic Model with Logistic Growth and Nonlinear Incidence. Applied Mathematics Letter and Computation, 337, Article ID: 125143. https://doi.org/10.1016/j.amc.2020.125143</mixed-citation></ref><ref id="scirp.110620-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Liu, Q. and Jiang, D. (2020) Threshold Behavior in a Stochastic SIR Epidemic Model with Logistic Birth. Physica A: Statistical Mechanics and its Applications, 540, Article ID: 123488. https://doi.org/10.1016/j.physa.2019.123488</mixed-citation></ref><ref id="scirp.110620-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Allen, E. (2007) Modeling with It&amp;#244 Stochastic Differential Equations. Vol. 22, Springer, Dordrecht. https://doi.org/10.1007/978-1-4020-5953-7</mixed-citation></ref><ref id="scirp.110620-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Allen, L.J.S. (2010) An Introduction to Stochastic Processes with Applications to Biology. 2nd Edition, CRC Press, New York. https://doi.org/10.1201/b12537</mixed-citation></ref><ref id="scirp.110620-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Vadillo, F. (2019) Comparing Stochastic Lotka-Volterra Predator-Prey Models. Applied Mathematics and Computation, 360, 181-189. https://doi.org/10.1016/j.amc.2019.05.002</mixed-citation></ref><ref id="scirp.110620-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Gilbarg, D. and Trudinger, N. (1983) Elliptic Partial Differential Equations of Second Order. 2nd Edition, Vol. 224, Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-61798-0</mixed-citation></ref><ref id="scirp.110620-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">de la Hoz, F. and Vadillo, F. (2012) A Mean Extinction-Time Estimate for a Stochastic Lotka-Volterra Predator-Prey Model. Applied Mathematics and Computation, 219, 170-179. https://doi.org/10.1016/j.amc.2012.05.060</mixed-citation></ref><ref id="scirp.110620-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">de la Hoz, F., Doubova, A. and Vadillo, F. (2015) Persistence-Time Estimation for Some Stochastic SIS Epidemic Models. Discrete and Continuous Dynamical Systems Series B, 20, 2933-2947. https://doi.org/10.3934/dcdsb.2015.20.2933</mixed-citation></ref><ref id="scirp.110620-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Vadillo, F. (2020) On a Stochastic SIS Epidemic Model with Demography and its Calibration. Submitted.</mixed-citation></ref><ref id="scirp.110620-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Vadillo, F. (2020) On Multiple Pathogen Models: Deterministic or Stochastic? Submitted.</mixed-citation></ref><ref id="scirp.110620-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Hecht, F. (2012) New Development in Freefem++. Journal of Numerical Mathematics, 20, 251-265. https://doi.org/10.1515/jnum-2012-0013</mixed-citation></ref><ref id="scirp.110620-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Nasell, I. (2002) Stochastic Models for Some Epidemical Infections. Mathematical Biosciences, 179, 1-19. https://doi.org/10.1016/S0025-5564(02)00098-6</mixed-citation></ref><ref id="scirp.110620-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Greenhalgh, D., Liang, Y. and Mao, X. (2016) SDE SIS Epidemic Model with Demographic Stochasticity and Varying Populationsize. Applied Mathematics and Computation, 276, 218-238. https://doi.org/10.1016/j.amc.2015.11.094</mixed-citation></ref><ref id="scirp.110620-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Allen, L.J.S. and Burgin, A.M. (2000) Comparison of Deterministic and Stochastic SIS and SIR Models in Discrete Time. Mathematical Biosciences, 163, 1-33. https://doi.org/10.1016/S0025-5564(99)00047-4</mixed-citation></ref><ref id="scirp.110620-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Allen, L.J.S. (2017) A Primer on Stochastic Epidemic Models: Formulation, Numerical Simulation, and Analysis. Infectious Disease Modeling, 2, 128-142. https://doi.org/10.1016/j.idm.2017.03.001</mixed-citation></ref><ref id="scirp.110620-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Kloeden, P.E. and Platen, E. (1998) Numerical Solution of Stochastic Differential Equations. Cambridge University Press, Cambridge.</mixed-citation></ref></ref-list></back></article>