1 Introduction

The dramatic effects of the ongoing COVID-19 pandemic have increased the awareness among policymakers that infectious diseases may generate devastating economic, social and health consequences not only in developing countries but also in industrialized economies. This has strongly revived the economic epidemiology literature which aims to understand the working mechanisms of disease containment policies, in the form of prevention and treatment, and to assess which policy measure may be most effective in limiting disease spreading and supporting economic activity (Philipson, 2000; Gersovitz & Hammer, 2004; Goenka & Liu, 2012; La Torre et al., 2020). In the aftermath of the COVID-19 pandemic an extensive number of works has discussed the health-economic trade-off involved in social distancing, which represents the most commonly used policy tool in the fight of the disease, in order to determine its optimal intensity from a normative perspective (Acemoglu et al., 2021; Alvarez et al., 2021; Eichenbaum et al., 2021; La Torre et al., 2021). Despite the unpredictability that has characterized the evolution and diffusion of COVID-19, very limited have been though the attempts to account for the implications of uncertainty of the effectiveness of different disease control strategies (Federico & Ferrari, 2021; Hong et al., 2021; Shevchenko et al., 2022; La Torre et al., 2023). Among these, only (La Torre et al., 2023) explore the consequences of state-dependent probabilities, that is the possibility that the probability of shock realizations depends on the level of disease prevalence. In particular, they assume that shocks give rise to the diffusion of a new disease strain which affects both the number of infectives and the growth rate of infection, showing that containment policies in the form of treatment allows to effectively shift leftward the support of the steady state distribution of disease prevalence improving thus long run epidemiological outcomes. However, they focus on a very peculiar framework which cannot be directly compared to those traditionally discussed in mathematical and economic epidemiology, since they abstract completely from the compartmental framework typically employed in literature. Our goal in this paper is thus to reassess (La Torre et al., 2023) conclusions in a standard mathematical epidemiological context in which containment policy takes the form of social distancing, clarifying thus its relation with the state-dependency of shock realizations and epidemiological outcomes.

We consider a susceptibles-infectives-susceptibles (SIS) framework in which individuals contract the disease by socially interacting with others and in which recovery from infection does not provide any sort of immunity (Kermack & McKendrick, 1927; Hethcote, 2000). This setup is traditionally employed to describe the spread of a number of diseases such as the seasonal flu and the common cold, but by abstracting from issues associated with temporary immunity it can also be used to characterize in a simplistic and intuitive way other diseases such as COVID-19 (La Torre et al., 2021). Typical SIS dynamics are affected by random shocks which as in La Torre et al. (2023) determine the diffusion of a new strain of the disease affecting the evolution of infectives both additively (i.e., the number of infectives increase without passing through the social interactions channel) and multiplicatively (i.e., the average biological characteristics of the pathogen causing the disease change, and in particular the overall infectivity rate increases while the recovery rate decreases). We analyze the long run epidemiological outcome which is characterized by a stochastic steady state represented by an invariant distribution of disease prevalence supported on positive levels of infections. In this context we analyze how social distancing implemented in a feedback form to automatically respond to changes in the number of infectives affects the shape and spread of the steady state distribution over its support (Gori et al., 2022). We show that social distancing may have a priori ambiguous long run effects on epidemiological outcomes, since on the one hand it reduces the variability of disease prevalence by shrinking the size of the support of its steady state distribution, and on the other hand it allows for more infections by shifting its support rightward. Nevertheless, social distancing is an effective control measure since it increases the probability of lower disease prevalence levels by concentrating most of the mass of the distribution toward the lower extreme of its support.

Our paper relates to two different branches of the economics literature. We contribute to the field of economic epidemiology by analyzing the effectiveness of automatic social distancing in stochastic compartmental SIS framework in which the probability of shock occurrence is endogenous and state-dependent, showing its implications on the steady state prevalence distribution (Goldman and Lightwood, 2002; Chakraborty et al., 2010; Goenka et al., 2014). Indeed, social distancing has been extensively discussed in deterministic compartmental models and stochasticity has been considered in non-compartmental settings, while the role of social distancing in stochastic compartmental contexts has not been investigated yet. Methodologically, we contribute to the literature employing iterated functions systems (IFS) in economics applications by analyzing a nonlinear IFS with state-dependent probabilities (SDP), characterizing a nonlinear IFSSDP (Montrucchio & Privileggi, 1999; Mitra et al., 2003; Mitra & Privileggi, 2009; La Torre et al., 2015). To the best of our knowledge, all IFS explored thus far, both with and without state-dependent probabilities, take an affine form and nonlinearities in the IFS along with the complications that they give rise to have never been specifically explored. Clearly, the paper most closely related to ours is La Torre et al. (2023)’s which focuses on the role of treatment in an affine IFSDP considering how the monotonicity properties of the state-dependent probability function affect the invariant distribution. We distinguish from them since we analyze the implications of social distancing in a nonlinear IFSSDP and we explore how non-monotonicity properties of the state-dependent probability function affect long run epidemiological outcomes.

The paper proceeds as follows. Section 2 briefly recalls some basic concepts from the IFS theory that are useful in our later analysis. Section 3 discusses our purely epidemiological model without disease containment policies in order to clarify the impact of state-dependent probabilities on the steady state outcome. Section 4 introduces social distancing in our benchmark framework to assess the effects of containment measures on the support and the characteristics of the invariant distribution. Section 5 numerically compares the steady state distribution of disease prevalence without and with social distancing to clarify the implications of the state-dependency of the shocks probability. Section 6 presents concluding remarks and proposes directions for future research. The proofs of our Technical results are instead postponed to Appendix A.

2 Fractal transforms

In recent years a lot of work has been done in the area of Fractal Transforms (FT) and their application to mathematical modeling in different domains. In general the action of a fractal transform T on an element u of the complete metric space (Xd) can be summarized in the following steps: (i) It first produces a set of spatially-contracted copies of u, (ii) It then modifies the values of these copies by means of suitable mappings, (iii) Finally, it recombines these altered copies by means of an operator to produce the image element.

One well known family of fractal transforms is the definition of Iterated Function System (IFS). The notion of IFS was firstly introduced by Barnsley et al. 1988 and Hutchinson (1981) and then extended in different contexts (see (Kunze et al., 2012), and the references therein).

Given a compact metric space \(\left( X,d\right) \), an N-map Iterated Function System (IFS) on X, \(\textbf{w}=\left\{ w_{1},\ldots ,w_{N}\right\} \), is a set of N contraction mappings on X, i.e., \(w_{i}:X\rightarrow X\), \(i=1,\ldots ,N\), with contraction factors \(c_{i} \in \left[ 0,1\right) \). It can be proved that under these assumptions the following set-valued mapping \(\hat{\textbf{w}}\) defined on the space \({\mathcal {H}}\left( X\right) \) of nonempty compact subsets of X:

$$\begin{aligned} \hat{\textbf{w}}\left( S\right) :=\bigcup _{i=1}^{N}w_{i}\left( S\right) ,\qquad S\in {\mathcal {H}}\left( X\right) . \end{aligned}$$

is a contraction on the complete metric space \({\mathcal {H}}\left( X\right) \) endowed with the classical Hausdorff distance h defined as:

$$\begin{aligned} h\left( A,B\right) =\max \left\{ \sup _{x\in A}\inf _{y\in B}d\left( x,y\right) ,\sup _{x\in B}\inf _{y\in A}d\left( x,y\right) \right\} . \end{aligned}$$

This result implies the existence and uniqueness of a fixed point A such that \(\hat{\textbf{w}}\left( A\right) =A\). Moreover, A is self-similar, that is, it is the union of distorted copies of itself and it is also attracting, that is, for any \(B\in {\mathcal {H}}\left( X\right) \), \(h\left( A,\hat{\textbf{w}}^{t}B\right) \rightarrow 0\) as \(t\rightarrow \infty \).

Another well known definition of fractal transform is the one defined by means of iterated function system with (constant) probabilities \(\left( \textbf{w},\textbf{p}\right) \). It is composed by an N-map IFS \(\textbf{w}\) with associated probabilities \(\textbf{p}=\left\{ p_{1},\ldots ,p_{N}\right\} \), \(\sum _{i=1}^{N}p_{i}=1\). It can be proved that the Markov operator defined by \(\nu (S)=(M\mu )(S)\):

$$\begin{aligned} \nu \left( S\right) =\left( M\mu \right) \left( S\right) =\sum _{i=1} ^{N}p_{i}\mu \left( w_{i}^{-1}\left( S\right) \right) . \end{aligned}$$

is a contraction mapping on the space \({\mathcal {M}}\left( X\right) \) composed by all probability measures on (Borel subsets of) X with respect to the Monge-Kantorovich distance defined as follows: For any pair of probability measures \(\mu ,\nu \in {\mathcal {M}}\left( X\right) \), we have

$$\begin{aligned} d_{MK}\left( \mu ,\nu \right) =\sup _{f\in Lip_{1}\left( X\right) }\left[ \int fd\mu -\int fd\nu \right] , \end{aligned}$$

where \(Lip_{1}\left( X\right) =\left\{ f:X\rightarrow {\mathbb {R} }\,:\left| f\left( x\right) -f\left( y\right) \right| \le d\left( x,y\right) \right\} \). These assumptions imply the existence of a unique attracting measure \({\bar{\mu }}\in {\mathcal {M}}\left( X\right) \).

The definition of IFS with state-dependent probabilities is also a fractal transform which extends the above definitions. Within this framework, the probabilities \(p_{i}\) are no longer constant but they are are state-dependent, i.e., \(p_{i}:X\rightarrow \left[ 0,1\right] \) such that:

$$\begin{aligned} \sum _{i=1}^{N}p_{i}\left( x\right) =1,\qquad \text {for all }x\in X. \end{aligned}$$

The result is an N-map IFS with state-dependent probabilities (IFSSDP). The Markov operator \(M:{\mathcal {M}}\left( X\right) \rightarrow {\mathcal {M}}\left( X\right) \) associated with an N-map IFSSDP, \(\left( \textbf{w},\textbf{p}\right) \), is defined as:

$$\begin{aligned} \nu \left( S\right) =M\mu \left( S\right) =\sum _{i}\int _{w_{i}^{-1}\left( S\right) }p_{i}\left( x\right) d\mu \left( x\right) , \end{aligned}$$
(1)

where \(\mu \in {\mathcal {M}}(X)\) and \(S\subset X\) is a Borel set.

It can be proved that the operator M as defined in Eq. (1) maps \({\mathcal {M}}\left( X\right) \) to itself. Under appropriate conditions, the above Markov operator can be contractive with respect to the Monge-Kantorovich metric (see also La Torre et al., 2018a).

Theorem 1

Suppose that there is a \(\delta >0\) so that \(p_{i}\left( x\right) >\delta \) for all \(x\in X\) and \(i=1,2,\ldots ,N\) and suppose further that the moduli of continuity of the \(p_{i}\)s satisfy Dini’s condition (see Elton, 1987; and Barnsley et al., 1988). Then there is a unique stationary distribution \({\bar{\mu }}\) for the Markov operator. Furthermore, for each continuous function \(f:X\rightarrow {\mathbb {R}}\),

$$\begin{aligned} \frac{1}{t+1}\sum _{i=0}^{t}f\left( x_{i}\right) \rightarrow \int _{X}f\left( x\right) \ d{\bar{\mu }}\left( x\right) . \end{aligned}$$

Theorem 1 can be used to show the following result.

Corollary 1

Suppose that the IFSSDP \(\left\{ \textbf{w},p_{i}\right\} \) satisfies the hypothesis of Theorem 1. Then the support of the invariant measure \({\bar{\mu }}\) of the N-map IFSSDP \(\left( \textbf{w},\textbf{p}\right) \) is the attractor A of the IFS \(\textbf{w}\), i.e.,

$$\begin{aligned} {\text {*}}{supp}{\bar{\mu }}=A. \end{aligned}$$

Therefore the invariant measure \(\mu \) satisfies the following equation

$$\begin{aligned} \mu \left( S\right) =\sum _{i}\int _{w_{i}^{-1}\left( S\right) }p_{i}\left( x\right) d\mu \left( x\right) , \end{aligned}$$

for any subset S of X. This equation shows how the invariant measure can be obtained by combining different distorted copies of itself. This justifies why the invariant measure is a self-similar object. These basic concepts related to the theory of IFSSDP will be useful to derive the steady state equilibrium and understand its characteristics in our economic-epidemiological model.

3 The benchmark model

We present first the epidemiological framework abstracting from containment policies in order to clarify the implications of our modeling approach, while the role of containment policies in the form of social distancing will be discussed in the next section. We extend a basic SIS setting to allow for random shocks to give rise to the diffusion of a new disease strain characterized by different biological characteristics with respect to the extant pathogen. The diffusion of a new disease strain generates thus two effects: on the one hand it yields new infections without passing through the social interactions channel, and on the other hand it changes the average biological characteristics of the pathogens responsible for the disease.

According to a standard single-strain SIS epidemiological model (Kermack & McKendrick, 1927), at any point in time the constant population (normalized to unity for the sake of simplicity), \(N\equiv 1\), is composed by infectives, \(I_{t}\), and susceptibles, \(S_{t}\): \(1=S_{t}+I_{t}\). Susceptible individuals may become infected through contacts with infectives, while infectives naturally recover from the disease and become susceptibles again. The dynamics of the two groups is determined by the speed of recovery, \(\delta >0\), and the rate of contact, \(\vartheta _{t}>0\), where the contacts between infectives and susceptibles occur randomly through the following matching function: \(\vartheta _{t}=\alpha S_{t}I_{t}\), where \(\alpha >0\) measures the average number of contacts required for infection to effectively take place (i.e., the infectivity rate). Therefore, the disease dynamics can be summarized as follows:

$$\begin{aligned} S_{t+1}&=S_{t}+\delta I_{t}-\alpha S_{t}I_{t}\\ I_{t+1}&=I_{t}+\alpha S_{t}I_{t}-\delta I_{t} \end{aligned}$$

We now consider the effects of random shocks which determine the diffusion of a new disease strain, whose occurrence is subject to state-dependent probabilities. Consistent with the recent COVID-19 experience which has shown that when the disease is widely circulating within the population it may not be possible to keep track of the number of individuals infected by different disease strains but we can only track the overall number of infectives, we add together in the same infectives group all individuals infected by different strains (La Torre et al., 2023). The shock term \(z_{t}\), can take one of two values, 0 or \(r>0\) with probability \(p(I_{t})\) or \(1-p(I_{t})\) respectively, that is disease prevalence determines the likelihood of the realization of the shock. The diffusion of a new disease strain affects the epidemiological dynamics as follows:

$$\begin{aligned} S_{t+1}&=S_{t}+\left( 1-\gamma z_{t}\right) \delta I_{t}-\left( 1+\beta z_{t}\right) \alpha S_{t}I_{t}-\theta z_{t}S_{t}\\ I_{t+1}&=I_{t}+\left( 1+\beta z_{t}\right) \alpha S_{t}I_{t}-\left( 1-\gamma z_{t}\right) \delta I_{t}+\theta z_{t}S_{t} \end{aligned}$$

The discovery of a new disease strain has two major effects. (i) It generates some infections without passing through social contacts channel, that is some susceptibles become infectives even if they do not get in contact with individuals infected by the extant strain. (ii) It also modifies (on average) the biological properties of disease, and in particular we assume that it increases its infectivity rate and decreases its recovery rate. The parameters \(\theta >0\), \(\beta \ge 0\) and \(\gamma \ge 0\) measure the extent to which the shock affects susceptibles, infectivity and recovery, respectively. Therefore, random shocks affect epidemiological dynamics both additively (through the \(\theta z_{t}\) term) and multiplicatively (through the \(\beta z_{t}\) and \(\gamma z_{t}\) terms).

By exploiting the fact that \(1=S_{t}+I_{t}\), we can analyze the dynamics of one group only, say infectives, which is given by the following expression:

$$\begin{aligned} I_{t+1}&=\left[ 1-\left( 1-\gamma z_{t}\right) \delta \right] I_{t}+\left( 1+\beta z_{t}\right) \alpha \left( 1-I_{t}\right) I_{t}+\theta z_{t}\left( 1-I_{t}\right) \nonumber \\&=-\left( 1+\beta z_{t}\right) \alpha I_{t}^{2}+\left[ 1-\left( 1-\gamma z_{t}\right) \delta +\left( 1+\beta z_{t}\right) \alpha -\theta z_{t}\right] I_{t}+\theta z_{t}, \end{aligned}$$
(2)

where \(\left\{ z_{t}\right\} _{t=0}^{\infty }\) is a Bernoulli process such that, at each date t, \(z_{t}=0\) with probability \(p\left( I_{t}\right) \) and \(z_{t}=r\) with probability \(1-p\left( I_{t}\right) \). Note that, if \(\beta =0\), the new disease strain does not affect the infectivity rate, which remains entirely deterministic. If \(\gamma =0\), it is the speed of recovery which remains deterministic, while if \(\gamma =\frac{1}{r}\) the new strain generates permanent infections (i.e., infectives never recover from it and thus never return being susceptibles).

By borrowing from the IFS literature (Kunze et al., 2012), it is possible to characterize the random dynamics in (2) in terms of an IFSSDP as follows:

$$\begin{aligned} I_{t+1}=\left\{ \begin{array}{l} w_{1}\left( I_{t}\right) =-\alpha I_{t}^{2}+\left( 1-\delta +\alpha \right) I_{t}\qquad \qquad \qquad \qquad \text {w. prob. }p\left( I_{t}\right) \\ \begin{array}{l} w_{2}\left( I_{t}\right) =-\left( 1+\beta r\right) \alpha I_{t} ^{2}+\left[ 1-\left( 1-\gamma r\right) \delta \right. \\ \qquad \qquad \quad \left. +\left( 1+\beta r\right) \alpha -\theta r\right] I_{t}+\theta r \end{array} \qquad \quad \text {w. prob. }1-p\left( I_{t}\right) . \end{array} \right. \end{aligned}$$
(3)

Note that the range of the lower map \(w_{1}\) for \(I\in \left[ 0,1\right] \) is the interval \(\left[ 0,1-\delta \right] \), which, having 0 as its lower endpoint, in principle allows for the elimination of the infection. Instead, the lower endpoint of the range of the upper map \(w_{2}\) for \(I\in \left[ 0,1\right] \) is \(\theta r>0\), so that repeated (stochastic) occurrences of novel strains of the disease renders the infection endemic.

Tedious algebra allows us to prove the following result, which determines the parameter conditions required for the model to be well behaved and for the epidemic dynamics to converge to a long run attractor. Specifically, according to Theorem 1 and Corollary 1, for (3) to have a unique compact attractor on which an invariant limiting distribution is supported, the two maps \(w_{1}\left( I\right) \)and \(w_{2}\left( I\right) \) must be strictly monotone and contractive, while the state-dependent probabilites \(p\left( I\right) \) an \(1-p\left( I\right) \) must be Lipschitz and bounded away from 0, i.e., \(0<p\left( I\right) <1\) must hold for all \(0\le I \le 1\). For the sake of simplicity, in the following Proposition 1 (and similarly in Proposition 2 under social distancing) we will seek conditions for the attractor to be contained in the interval \(\left[ 0,1\right] \).

Proposition 1

Assume that

$$\begin{aligned} 0&<\alpha <\min \left\{ \delta ,1-\delta \right\} ,\qquad \text {and} \end{aligned}$$
(4)
$$\begin{aligned} 0&<\gamma <\frac{\alpha \beta +\theta }{\delta }. \end{aligned}$$
(5)

Then, both maps \(w_{i}\) in the IFS (3) are strictly increasing, contractive, and the attractor of the system is a subset of the space \(X=\left[ 0,1\right] \) provided that either one of the following conditions holds:

$$\begin{aligned} \alpha \beta +\gamma \delta&\le \theta \qquad \text {and}\qquad 0<r\le \min \left\{ \frac{1}{\gamma },\frac{1-\delta -\alpha }{\alpha \beta -\gamma \delta +\theta }\right\} \qquad \text {or}\end{aligned}$$
(6)
$$\begin{aligned} \alpha \beta +\gamma \delta&>\theta \qquad \text {and}\qquad 0<r\le \min \left\{ \frac{1}{\gamma },\frac{1-\delta -\alpha }{\alpha \beta -\gamma \delta +\theta } ,\frac{\delta -\alpha }{\alpha \beta +\gamma \delta -\theta }\right\} . \end{aligned}$$
(7)

If \(r=\frac{1}{\gamma }\), the largest fixed point of the higher map \(w_{2}\) in (3) turns out to be \(I_{2}^{st}=1\); as the largest fixed point of the lower map \(w_{1}\) in (3) is \(I_{1}^{st}=0\), in this case the trapping region of the system becomes the full interval \(\left[ 0,1\right] \).

If, in place of (5), it holds \(\gamma =0\), conditions (4) and (5) boil down to

$$\begin{aligned} \alpha \beta&\le \theta \qquad \text {and}\qquad 0<r\le \frac{1-\delta -\alpha }{\alpha \beta +\theta }\qquad \text {or}\end{aligned}$$
(8)
$$\begin{aligned} \alpha \beta&>\theta \qquad \text {and}\qquad 0<r\le \min \left\{ \frac{1-\delta -\alpha }{\alpha \beta +\theta },\frac{\delta -\alpha }{\alpha \beta -\theta }\right\} . \end{aligned}$$
(9)

The proof of Proposition 1 is presented in Appendix A. Note that the second inequality in all conditions (6), (7), (8) and (9) are nontrivial, as, together with conditions (4) and (5), or if \(\gamma =0\), allow for positive values of r. It is also worth noticing that when \(r=\frac{1}{\gamma }\), the coefficient \(-\left( 1-\gamma r\right) \delta \) in the expression of the higher map \(w_{2}\) in (3) cancels out, so that the speed of recovery under the shock \(z_{t}=r\) becomes zero; in this case, the fixed point of the higher map \(w_{2}\) turns out to be \(I_{2}^{st}=1\) and the trapping region of the system becomes the full interval \(\left[ 0,1\right] \), allowing for the full population to be infected (see the proof of Proposition 1 in Appendix A).

Unfortunately, in general the nonlinearity of our IFSSFP makes it not possible to explicitly characterize in a meaningful way the support of the invariant measure and thus we cannot determine analytically the range or any other measure of variability of the steady state distribution, thus we will need to rely on numerical analysis to understand the relation between state-dependent probabilities and the invariant measure (see Sect. 5). However, it may be useful to consider a special case in which this can be done. Indeed, whenever \(r=\frac{1}{\gamma }\) the support of the invariant measure is the the full interval [0, 1], from which it is clear that the uncontrolled epidemic dynamics may result in a prevalence distribution allowing for both the extreme full eradication and full endemicity outcomes, along with intermediate outcomes characterized by partial endemicity.

4 The role of social distancing

We now analyze the effectiveness of containment policies in reducing the spread of the infectious disease. We focus on social distancing (i.e, lockdown, physical distancing, travel bans) which by limiting contacts between individuals allows to reduce the effective infectivity rate, \(\tilde{\alpha }\). Specifically, we consider a situation in which the intensity of social distancing is automatically changed according to the level of disease prevalence, thus public policy takes a feedback form responding directly to the change in the number of infectives. A similar setup has been recently employed to describe from a positive perspective the implementation of lockdown measures during the first COVID-19 wave in a number of countries (Gori et al., 2022). Consistent with real world experiences, we assume that social distancing becomes stronger when disease prevalence increases, such as the effective infectivity rate decreases with the number of infectives, \(\tilde{\alpha }\left( I_{t}\right) \) with \(\tilde{\alpha }^{\prime }<0\). For the sake of analytical tractability we consider the following functional form: \(\tilde{\alpha }\left( I_{t}\right) =\frac{\alpha }{I_{t}}\), which leads to the following dynamics for disease prevalence:

$$\begin{aligned} I_{t+1}&=\left[ 1-\left( 1-\gamma z_{t}\right) \delta \right] I_{t}+\left( 1+\beta z_{t}\right) \frac{\alpha }{I_{t}}\left( 1-I_{t} \right) I_{t}+\theta z_{t}\left( 1-I_{t}\right) \\&=\left[ 1-\left( 1-\gamma z_{t}\right) \delta -\left( 1+\beta z_{t}\right) \alpha -\theta z_{t}\right] I_{t}+\left( 1+\beta z_{t}\right) \alpha +\theta z_{t}, \end{aligned}$$

which suggests that, different from our benchmark model in which disease incidence depends on the interactions between susceptibles and infectives, \(S_{t}I_{t}=\left( 1-I_{t}\right) I_{t}\), the implemented policy measures make disease incidence depend only on the number of susceptibles, \(S_{t}=1-I_{t}\). Therefore, by automatically responding to the level of disease prevalence, social distancing allows to limit the epidemic spreading through its effects on disease incidence, which does not grow any longer more than proportionally with prevalence (as in the case of an uncontrolled epidemic) but it grows proportionally with it.

In this context under social distancing, both maps in the IFSSDP become affine:

$$\begin{aligned} I_{t+1}=\left\{ \begin{array}{l} w_{1}\left( I_{t}\right) =\left( 1-\delta -\alpha \right) I_{t}+\alpha \qquad \qquad \qquad \qquad \qquad \text {w. prob. }p\left( I_{t}\right) \\ \begin{array}{l} w_{2}\left( I_{t}\right) =\left[ 1-\left( 1-\gamma r\right) \delta -\left( 1+\beta r\right) \alpha -\theta r\right] I_{t}\\ \qquad \qquad \quad +\left( 1+\beta r\right) \alpha +\theta r \end{array} \qquad \text {w. prob. }1-p\left( I_{t}\right) . \end{array} \right. \end{aligned}$$
(10)

Note that the range of the lower map \(w_{1}\) for \(I\in \left[ 0,1\right] \) now is a smaller subset than the range \(\left[ 0,1-\delta \right] \) of \(w_{1}\) in the IFSSDP (3) without containment policies: now it is \(\left[ \alpha ,1-\delta \right] \), that is, its lower endpoint is strictly bounded away from 0. Similarly, the lower endpoint of the range of the upper map \(w_{2}\) for \(I\in \left[ 0,1\right] \) now is larger than the lower endpoint of the same range for \(w_{2}\) in the IFSSDP (3): in fact, \(\left( 1+\beta r\right) \alpha +\theta r>\theta r\).

The following proposition states that the IFSSDP (10) works fine for our purposes under substantially the same conditions used in Proposition 1 for the spontaneous (without social distancing measures) epidemic dynamics; this is a useful property when it comes to comparisons between dynamics in the scenarios without and with containment measures. In fact, only the weak inequalities in some of the conditions in Proposition 1 need to become strict in order for the maps \(w_{1}\) and \(w_{2}\) in (10) to be strictly increasing.

Proposition 2

Assume that

$$\begin{aligned} 0<\alpha <\min \left\{ \delta ,1-\delta \right\} . \end{aligned}$$
(11)

If, moreover,

$$\begin{aligned} 0<\gamma<\frac{\alpha \beta +\theta }{\delta },\qquad 0<r\le \frac{1}{\gamma } \qquad \text {and}\qquad r<\frac{1-\delta -\alpha }{\alpha \beta -\gamma \delta +\theta }, \end{aligned}$$
(12)

then, both maps \(w_{i}\) in the IFS (3) are strictly increasing, contractive, and the attractor of the system is a proper subset of the space \(X=\left[ 0,1\right] \); specifically, it is contained in the trapping region

$$\begin{aligned} \left[ I_{1}^{st},I_{2}^{st}\right] =\left[ \frac{\alpha }{\alpha +\delta },\frac{\alpha +\left( \alpha \beta +\theta \right) r}{\alpha +\delta +\left( \alpha \beta -\gamma \delta +\theta \right) r}\right] , \end{aligned}$$
(13)

where \(I_{1}^{st},I_{2}^{st}\) are the fixed points of the maps \(w_{1}\) and \(w_{2}\) in the IFSSDP (10) respectively. The interval in (13) is nontrivial as \(I_{1}^{st}<I_{2}^{st}\). Moreover, the lower map \(w_{1}\) is always steeper than the upper map \(w_{2}\), \(w_{1} ^{\prime }\left( I\right) >w_{2}^{\prime }\left( I\right) \) for all \(I\in \left[ I_{1}^{st},I_{2}^{st}\right] \).

If \(r=\frac{1}{\gamma }\), the largest fixed point of the higher map \(w_{2}\) in (10) turns out to be \(I_{2}^{st}=1\); in this case the trapping region of the system becomes the interval \(\left[ I_{1}^{st},I_{2} ^{st}\right] =\left[ \frac{\alpha }{\alpha +\delta },1\right] \).

If \(\gamma =0\), the three conditions in (12) boil down to the unique inequality

$$\begin{aligned} 0<r<\frac{1-\delta -\alpha }{\alpha \beta +\theta }, \end{aligned}$$
(14)

and the trapping region of the system becomes

$$\begin{aligned} \left[ I_{1}^{st},I_{2}^{st}\right] =\left[ \frac{\alpha }{\alpha +\delta },\frac{\alpha +\left( \alpha \beta +\theta \right) r}{\alpha +\delta +\left( \alpha \beta +\theta \right) r}\right] . \end{aligned}$$
(15)

The proof of Proposition 2 is presented in Appendix A. Again, also under the containment policy, if \(r=\frac{1}{\gamma }\) the coefficient \(-\left( 1-\gamma r\right) \delta \) in the expression of the higher map \(w_{2}\) in (10) cancels out, so that the speed of recovery under the shock \(z_{t}=r\) becomes zero; therefore, as it is clear from the expression of \(I_{2}^{st}\) in (13), also under the containment policy, the fixed point of the higher map \(w_{2}\) becomes \(I_{2}^{st}=1\) and the trapping region of the system is \(\left[ I_{1} ^{st},I_{2}^{st}\right] =\left[ \frac{\alpha }{\alpha +\delta },1\right] \), allowing for the full population to be infected.

Since under social distancing our IFSSDP is affine, in Proposition 2 we can explicitly determine the support of the invariant measure but unfortunately the absence of a corresponding result in Proposition 1 makes it not possible to compare the two outcomes. We can though make an explicit comparison in the special case \(r=\frac{1}{\gamma }\), where we have seen that the steady state distribution has support on the full interval [0, 1] without social distancing and support on its subset \(\left[ \frac{\alpha }{\alpha +\delta },1\right] \) under social distancing. Social distancing thus allows to reduce the size of the support reducing thus the variability of disease prevalence, but in so doing it also shifts the support rightward suggesting that the steady state may be characterized by a larger number of infectives compared to the purely uncontrolled epidemiological scenario. However, in order to understand whether social distancing effectively helps in improving the long run epidemiological outcome we need to analyze also where most of the mass of the distribution is located within the support, and this is exactly the goal of our numerical analysis in the next section. Note that despite the fact that these conclusions have been derived from a peculiar case of our general model, they are well illustrative of the results that we will present through our numerical simulations.

5 Numerical simulations

In this section we apply a Maple algorithmFootnote 1 that approximates successive iterations of the Markov operator (1), based on Algorithm 1 in La Torre et al. (2019), always starting from the uniform density \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st}-I_{1}^{st}}\), in order to perform some numerical simulations with the purpose of comparing how the (approximations of the) invariant distributions generated by our IFSSDPs differ without [for the IFSSDP (3)] and with [for the IFSSDP (10)] social distancing under the same set of parameters’ values. We shall keep the same values

$$\begin{aligned} \alpha =0.1,\quad \delta =0.4,\quad \beta =1,\quad \gamma =1,\quad \theta =1\quad \text {and}\quad r=0.614 \end{aligned}$$
(16)

in all simulations while we shall consider different state-dependent probabilities associated to the IFS. Note that the parameters’ values in (16) satisfy conditions (4), (11) and (5) of Propositions 1 and 2, as well as all inequalities in conditions (6) and (12), with r strictly less than \(\min \left\{ \frac{1}{\gamma },\frac{1-\delta -\alpha }{\alpha \beta -\gamma \delta +\theta }\right\} =\frac{1-\delta -\alpha }{\alpha \beta -\gamma \delta +\theta }=0.714\). It turns out that the fixed point of \(w_{2}\) in the IFSSDP (3) is \(I_{2}^{st}=0.829\), so that its trapping region is the interval \(\left[ 0,0.829\right] \), while the fixed point of \(w_{2}\) in the IFSSDP (10) is \(I_{2}^{st}=0.834\), so that its trapping region is the interval \(\left[ \frac{\alpha }{\alpha +\delta },\frac{\alpha +\left( \alpha \beta +\theta \right) r}{\alpha +\delta +\left( \alpha \beta -\gamma \delta +\theta \right) r}\right] =\left[ 0.2,0.834\right] \). This confirms what we have earlier discussed by focusing on the peculiar \(r=\frac{1}{\gamma }\) case. As in both IFSSDPs the images of \(w_{1}\) and \(w_{2}\) do not overlap, in both cases the supports of the invariant measure are Cantor-like sets.

Fig. 1
figure 1

Initial uniform density over \(\left[ I_{1}^{st},I_{2}^{st} \right] \) (left), 1st (mid) and 6th (right) iterations of our Algorithm to approximate the Markov operator (1) associated to the IFSSDP (3) (top) or (10) (bottom) for \(\theta =1\), \(\alpha =0.1\), \(\delta =0.4\), \(\beta =1\), \(\gamma =1\) and \(r=0.614\) when \(p\left( I\right) =0.8I+0.1\)

In Fig. 1 we assume that the state-dependent probability is affine and increasing: \(p\left( I\right) =0.8I+0.1\). Figure 1a,b and c show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.829}=1.206\), the first and the sixth iterations of operator (1) associated to IFSSDP (3), when no containment policy is implemented, respectively. Similarly, Fig. 1d,e andf show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.834-0.2}=\frac{1}{0.634}=1.577\), the first and the sixth iterations of operator (1) associated to IFSSDP (10), when the feedback containment policy is implemented, respectively. By comparing the top and bottom right panels, we can conclude that despite the fact that the support of distribution is rightward shifted under social distancing, most of its mass is concentrated toward lower disease prevalence levels than the uncontrolled epidemiological framework. Therefore, social distancing as a disease containment measure works by reducing the variability of prevalence and concentrating its distribution in lower levels.

In Fig. 2 we assume that the state-dependent probability is affine and decreasing: \(p\left( I\right) =-0.8I+0.9\). Figure 2a, b and c show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.829}=1.206\), the first and the sixth iterations of operator (1) associated to IFSSDP (3), when no containment policy is implemented, respectively. Similarly, Fig. 2d, e and f show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.834-0.2}=\frac{1}{0.634}=1.577\), the first and the sixth iterations of operator (1) associated to IFSSDP (10), when the feedback containment policy is implemented, respectively. Comments similar to those discussed for the previous figure apply, suggesting that the effects of social distancing in the context of increasing and decreasing state-dependent probabilities do not substantially differ.

Fig. 2
figure 2

Initial uniform density over \(\left[ I_{1}^{st},I_{2}^{st} \right] \) (left), 1st (mid) and 6th (right) iterations of our Algorithm to approximate the Markov operator (1) associated to the IFSSDP (3) (top) or (10) (bottom) for \(\theta =1\), \(\alpha =0.1\), \(\delta =0.4\), \(\beta =1\), \(\gamma =1\) and \(r=0.614\) when \(p\left( I\right) =\)-\(0.8I+0.9\)

In Fig. 3 we assume that the state-dependent probability is hyperbolic and increasing: \(p\left( I\right) =\frac{100I^{2}+0.001}{100I^{2}+1}\). Figure 3a, b and c show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st}-I_{1}^{st}}=\frac{1}{0.829}=1.206\), the first and the sixth iterations of operator (1) associated to IFSSDP (3), when no containment policy is implemented, respectively. Similarly, Fig. 3d,e and f show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.834-0.2}=\frac{1}{0.634}=1.577\), the first and the sixth iterations of operator (1) associated to IFSSDP (10), when the feedback containment policy is implemented, respectively. Qualitatively speaking, our previous comments still apply, thus the effects of social distancing do not change even accordingly to the linearity or nonlinearity of the state-dependent probability function.

In Fig. 4 we assume that the state-dependent probability is neither increasing nor decreasing: it is oscillating according to \(p\left( I\right) =0.5-0.49\sin \left( 1.809\pi I\right) \); specifically, it is decreasing for \(0\le I\le 0.276\) while it is increasing for \(0.276<I\le I_{2}^{st}\). Figure 4a, b and c show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st}-I_{1}^{st}}=\frac{1}{0.829}=1.206\), the first and the sixth iterations of operator (1) associated to IFSSDP (3), when no containment policy is implemented, respectively. Similarly, Figs. 4d, e and f show the initial uniform density, \(\mu _{0}\left( I\right) \equiv \frac{1}{I_{2}^{st} -I_{1}^{st}}=\frac{1}{0.834-0.2}=\frac{1}{0.634}=1.577\), the first and the fifthFootnote 2 iterations of operator (1) associated to IFSSDP (10), when the feedback containment policy is implemented, respectively. Also in this case our previous comments apply, suggesting that our conclusions are robust even to the monotonicity property of of the state-dependent probability function.

Fig. 3
figure 3

Initial uniform density over \(\left[ I_{1}^{st},I_{2}^{st} \right] \) (left), 1st (mid) and 6th (right) iterations of our Algorithm to approximate the Markov operator (1) associated to the IFSSDP (3) (top) or (10) (bottom) for \(\theta =1\), \(\alpha =0.1\), \(\delta =0.4\), \(\beta =1\), \(\gamma =1\) and \(r=0.614\) when \(p\left( I\right) =\frac{100I^{2}+0.001}{100I^{2}+1}\)

All our numerical examples support the conclusion that social distancing is an effective disease containment measure since it concentrates most of the mass of the steady state distribution of disease prevalence toward lower levels. This is true independent of the characteristics of the state-dependent probabilities, and if the state-dependent probability function is increasing or decreasing, linear or nonlinear, monotonic or non-monotonic, the same conclusion applies. It is also possible to show that this result is robust to different parametrizations, thus we can safely confirm the importance and validity of social distancing as a disease containment strategy.

6 Conclusions

Following the COVID-19 pandemic a growing need to understand how to control the spread of infectious diseases has emerged. Several works have contributed to this debate from different perspectives but the attempts to analyze the role of random shocks in this context have been limited, often abstracting from the traditional compartmental framework typically employed in literature. Our paper aims to fill this gap by discussing how shocks associated with the diffusion of a new disease strain affect epidemiological dynamics and the effectiveness of social distancing measures whenever the probability of shocks realization depends on the level of disease prevalence. In particular, we analyze how the properties of the state-dependent probability function affect the long run epidemiological outcome which is characterized by an invariant probability distribution supported on a range of positive prevalence levels. We show that social distancing reduces the size of the support of the steady state distribution decreasing thus the variability of disease prevalence, but in so doing it also shifts the support rightward allowing eventually for more infectives than in an uncontrolled framework. Nevertheless, social distancing is an effective control measure since it concentrates most of the mass of the distribution toward the lower extreme of its support.

Fig. 4
figure 4

Initial uniform density over \(\left[ I_{1}^{st},I_{2}^{st} \right] \) (left), \(1^{st}\) (mid) and \(6^{th}\) (top right)—or \(5^{th} \) (bottom right)—iterations of our Algorithm to approximate the Markov operator (1) associated to the IFSSDP (3) (top) or (10) (bottom) for \(\theta =1\), \(\alpha =0.1\), \(\delta =0.4\), \(\beta =1\), \(\gamma =1\) and \(r=0.614\) when \(p\left( I\right) =0.5-0.49\sin \left( 1.809\pi I\right) \)

To the best of our knowledge, this is the first paper analyzing how the features of the state-dependent probability function affect long run epidemiological outcomes in a traditional SIS-type compartmental framework. In order to discuss the implications of social distancing in intuitive terms we have assumed that its policy intensity is automatically determined to respond to changes in disease prevalence. Clearly, this setup has precluded us from the possibility to analyze from a normative perspective the optimality of social distancing measures, which is instead a critical point to effectively support policymaking. Extending the analysis along this direction is left for future research.