Generalized Counting Processes in a Stochastic Environment

This paper addresses the generalization of counting processes through the age formalism of Lévy Walks. Simple counting processes are introduced and their properties are analyzed: Poisson processes or fractional Poisson processes can be recovered as particular cases. The stationarity assumption in the renewal mechanism characterizing simple counting processes can be modified in different ways, leading to the definition of generalized counting processes. In the case that the transition mechanism of a counting process depends on the environmental conditions—i.e., the parameters describing the occurrence of new events are themselves stochastic processes—the counting processes is said to be influenced by environmental stochasticity. The properties of this class of processes are analyzed, providing several examples and applications and showing the occurrence of new phenomena related to the modulation of the long-term scaling exponent by environmental noise.


Introduction
A counting process is nothing but a stochastic process N(t), t ≥ 0 that counts the number of events that have occurred up to the current time t, equipped with the following assumptions [1,2]: • N(0) = 0; • N(t) ∈ 0, 1, 2, .., ∀t ∈ R + ; • for 0 < t < t , N(t ) − N(t) is the number of events occurring in the interval (t, t ] In recent decades, Poisson processes have found wide application in different research areas [3,4], such as medicine and biomedicine, economy, epidemiology, finance, physics and biology [4][5][6][7][8][9]. The exponential decay predicted by the standard Poisson process is used to estimate the inter-arrival distribution of phenomena as phone communication connections even if, recently, a failure of this model has been shown for different complex systems in which the long-term memory effects involve long-tailed properties. Many contributions have been focused on the generalization of the standard Poisson process using fractional calculus and fractional operators providing a fractional version of the Poisson process that allows a power law decay of the counting probabilities to be predicted [10][11][12][13] A representative example of application of this class of processes is the power-law decay of the duration of network sessions at large session-times. This has led to several important contributions related to fractional Poisson processes [14], introduced by N. Laskin [15] as a generalization of the Kolmogorov-Feller equation and recovered by E. Orsingher and L. Beghin [16], by replacing the time derivative with the fractional Dzerbayshan-Caputo derivative of order ω ∈ (0, 1]. This paper is aimed at providing several generalization of counting processes possessing anomalous power-law scaling without applying fractional operators, enforcing the transition structure of Lévy Walks (LW) [17] described by means of the transitional age-formalism [18][19][20], where the age is defined as the time that has elapsed from the latest transition; i.e., from the latest event.
The article is organized as follows. Section 2 presents the general structure of simple counting processes, considering Poisson processes and fractional Poisson processes as particular cases. The evolution equations for the probability density with respect to the transition age τ are obtained through the age-time dynamics of an LW process, and the boundary conditions are specified and discussed. Section 3 introduces the concept of generalized counting processes, showing how the stationary assumption in the renewal mechanism can be modified. The case in which the transitional age depends on the actual number of transitions that has occurred is analyzed. In Section 4, doubly stochastic counting processes [21,22], introduced by Cox [23] and developed by Bartlett [24], are recovered by assuming that the parameters describing the occurrence of a new event stochastically depend on time. The hierarchical level of stochasticity of these processes can be attributed to environmental fluctuations (environmental stochasticity) that interact with the intrinsic level of stochasticity in the occurrence of events. A scaling analysis is performed, showing that by considering an asymmetrical Poisson-Kac process [25][26][27][28], the long-term scaling exponent of the counting probability hierarchy can be modulated. Extensions to the model defined in Section 4 are given and analyzed, focusing on the case in which the stochastic process characterizing the transition rate is associated with the transition mechanism of an LW process. This leads to the presence of two different transition ages related to the occurrence of events and to transitions in the environmental fluctuations.

Simple Counting Processes
The age description of LWs [18,19] allows for a simple and natural generalization of counting processes. In this section, we consider the general structure of simple counting processes containing Poisson processes and fractional Poisson processes as particular cases. The exact meaning of the concept of "simple counting processes" is given below; see Equation (13).
Consider the renewal mechanism of an LW for particle dynamics that proceeds via a sequence of events determining a change in the velocity direction. The process is specified by the probability density function T(τ) for the transition time τ ∈ [0, ∞), corresponding to the time interval between two subsequent events or, equivalently, by the transition rate λ(τ) ≥ 0, related to T(τ) by the equation Let p k (t; τ) be the probability density with respect to the transition age τ that k events (corresponding to changes in the velocity direction) have occurred in the time interval [0, t), described by the counting stochastic variable N(t). Age τ = 0 corresponds to the state immediately after a transition (event). We indicate with T (t) the stochastic process representing particle transition age at time t. Then, Thus, p k (t, τ) represents the fraction of particles with an age between τ and τ + dτ that have already performed k transitions at time t. The probabilities P k (t) of the strict counting process can be obtained as the marginal of this joint density with respect to N(t); i.e., where P k (t) represents the probability that k events have occurred up to time t. The evolution equations for p k (t, τ) thus follow from the age-time dynamics of an LW process; i.e., ∂p k (t, τ) ∂t where k = 0, 1, . . . , equipped with the renewal boundary condition that holds for k = 1, 2, . . . , as no boundary condition defines the dynamics of p 0 (t, τ). The initial condition for p k (0, τ) in a counting process can be assumed as where δ(τ) is an impulsive Dirac delta distribution centered at τ = 0, i.e., p k (0, τ) = δ(τ) δ k,0 , and δ k,0 are the Kronecker symbols, corresponding to the fact that at time t = 0, all the particles possess vanishing transitional age. This corresponds to the classical initial condition used for Continuous Time Random Walks, as discussed in [20]. Other initial conditions are also possible as thoroughly discussed in [20], corresponding to a different age preparation of the system. Consider Equation (3) for k = 0; it simply propagates the initial condition (5), so that its solution can be expressed as where Consequently, Next, consider a generic k > 0. Using the method of characteristics for first-order linear partial differential equations, the solution of Equation (3) takes the form while p k (t, τ) = 0 for τ ≥ t. That is, the functions b k (θ) are defined for θ > 0 and vanish for θ ≤ 0. Substituting this equation into the boundary condition (4), one obtains where T(τ) = λ(τ) e −Λ(τ) is the probability density function for the transition times and " * " indicates the convolution operation. Since for In terms of the counting probabilities P k (t), this implies Observe that it is possible to express the counting probability recursively as with P 0 (t) given by Equation (8).
If it is possible to represent the system of counting probabilities via the recursive convolutional expression (13), the counting process is said to be simple. For simple counting processes, the renewal of the generations is determined by a single function, say λ(τ) (or T(τ) or Λ(τ)); its knowledge defines the process completely. Moreover, giving the expression of the counting probability P k * (t) for some value k * as a function of time, Equation (13) permits the prediction of the probabilities P k (t) for k > k * . Essentially, a simple counting process is characterized by the fact that the renewal equation between subsequent generations (a generation is characterized by a given value of N(t), say N(t) = k, so its probabilistic description is given by P k (t)) is "autonomous"; i.e., it does not change as either time or generational evolution proceeds.
As expected from the theory of fractional Poisson processes, the counting probabilities scale in the long-term regime as  (15) with τ 0 = 1, ξ = 1.5. Lines (a) to (c) refer to k = 0, 1, 2, respectively. Line (d) corresponds to the asymptotic scaling

Generalized Counting Processes
The stationarity assumption in the renewal mechanism can be generalized in several different ways, and the processes so defined can be referred to as generalized counting processes (GCP). This kind of process can find applications in all fields, such as biology or economy, in which changes occur in the environment determining a progressive variation in the dynamics of events (transitions). The simplest example is taken from the analysis of LW processes addressed in [19,20], in which the transition age after any transition is not reset to zero but attains a non-vanishing value that depends on the number of transitions that have occurred. This means that a non decreasing sequence of real numbers {τ 0 k } ∞ k=0 can be introduced, τ 0 k+1 ≥ τ 0 k , such that, while Equation (3) still holds for the evolution of the densities p k (t, τ), the renewal boundary condition takes the form Since in most of the cases of interest in connection with LW, the transition rates λ(τ) are decreasing functions of τ, such as for Equation (15), the boundary condition (17) determines a slowing down in the occurrence of the transitions, corresponding to a structural aging of the process. The scaling implication of Equation (17) as regards the dynamics of a LW has been addressed in [19].
As an initial condition, we can still take Equation (5). Consequently, with regards to p 0 (t, τ) and P 0 (t), Equations (6) and (8) are still valid. Consider k = 1, in the presence of the boundary condition (17). The density p 1 (t, τ) for any t > 0 is different from zero solely for τ ∈ (τ 0 1 , τ 0 1 + t) and can be expressed in this interval as where the function b 1 (θ) is defined for positive arguments θ > 0. The boundary condition (17) allows the determination of this function Therefore, (20), the expression for the overall counting probability P 1 (t) follows in which the function Λ 1 (τ), τ ≥ 0, has been introduced. The same approach can be applied to all the elements of the system of densities and counting probabilities, and the final result for k = 1, 2 . . . is and vanishes otherwise, where and T k (t), k = 1, 2, . . . are given by As regards the overall counting probabilities P k (t), one obtains where we have set The notation used in Equation (24) means that T 0 (t) = T(t), T 1 (t) = T(t) * T 1 (t) and so forth. The proof of this result is developed in Appendix A. It is important to observe that the counting probabilities P k (t) defined by Equation (26) do not fulfill the requirement (13) characteristic of a simple counting scheme because of the presence of the factor e −Λ k (t) that depends explicitly on k. This result is physically intuitive as the renewal mechanism depends on the generation k, via the shifts τ 0 k providing a progressive aging of the process. Observe that the function T k (t) as well as T k (t) are indeed probabilistically normalized; i.e., they represent density functions, which follows straightforwardly from their definitions (24)- (25).
As an example, consider the process defined by Equation (15) and considered in the previous section (i.e., τ 0 = 0) and with where τ c > 0 is a characteristic aging time, so that the aging process depends linearly on the generation number, with τ 0 1 = 0. Figure 2 depicts some transition functions T k (t) defined by Equation (25) (25), for the generalized counting process defined by Equations (17) and (29) with ξ = 1.5, τ c = 10. The arrow indicates increasing values of k = 1, 2, 10. Figure 3 compares of the analytical expressions for the counting probabilities Equation (26) and the results of the stochastic simulation, performed as described in the previous section, with the difference that, at the occurrence of a new event (transition), the age is reset according to the values of τ 0 k . The first two counting probabilities P 0 (t) and P 1 (t) are not shown as they are identical to the corresponding simple counting problem with τ 0 k = 0.  Figure 4 depicts the counting probabilities P 2 (t) and P 3 (t)-panel (a) and (b), respectivelyfor the same process at ξ = 1.5, by changing the value of τ c , from τ c = 0 (simple process) to τ c = 100. Furthermore, for this class of processes, the asymptotic scaling of the counting probabilities follows Equation (16), as it is controlled by the functions e −Λ k (t) , and Λ k (t) ∼ t −ζ , t τ 0 k for any k.

Counting Processes in a Stochastic Environment
It is possible to introduce a further level of complexity (stochasticity) in a counting process by assuming that the parameters describing the occurrence of a new event (such as the transition rate) are not fixed but depend on time in a stochastic way. In other words, they represent a stochastic process.
This generalization could correspond to the case in which the transition mechanism depends on the environmental conditions, and the latter evolve in some random way. Consider for example the statistics of the number of telephone calls within a city, which is a typical phenomenon that can be straightforwardly mapped into a counting process. Its normal statistics can be specified by the function λ(τ). However, the number of telephone calls can be significantly influenced by the environmental conditions: the sudden occurrence of a calamity (a hurricane, an earthquake, etc.) significantly influences the transition mechanism of the process. Since calamities cannot be easily predicted, it is natural to consider them as stochastic processes. Analogous examples can be provided in biology, especially as regards epidemic spreading or macroevolutionary processes, in which "the event" can be thought of as the origin of a new species (speciation) and the external stochasticity is intrinsic to environmental conditions in geological times.
It is also evident that this kind of counting processes implies a double (hierarchical) level of stochasticity: the intrinsic stochasticity in the occurrence of an event and the environmental stochasticity controlling the variation in the statistical parameters of the process. For these reasons, such processes can be referred to as "doubly stochastic counting processes" or, alternatively, "counting processes in a stochastic environment". For the sake of brevity, we use the acronym "ES" (environmentally stochastic) to indicate these models. It is assumed that the two sources of stochasticity are independent of each other, and that environmental stochasticity is characterized by a Markovian transition mechanism. This condition could be easily extended to environmental fluctuations possessing semi-Markov properties.
Using the formulation adopted throughout this article, an ES counting process can be characterized by a transition rate λ(t, τ), which is a stochastic process. For instance, where λ 0 (τ) is a given function of the transition age and η(t) is a stochastic process, the statistical properties of which are known. Let us assume that, in the absence of stochasticity in λ(t, τ), the basic counting process is simple. In the presence of Equation (30), Equations (3) and (4) attain the form k = 0, 1, . . . , and where now p k (t, τ) are stochastic processes controlled by the statistics of η(t).
The average transition time in the environmental conditions is T env = 1/µ = 10, and the corresponding behavior of N(t) is depicted in panel (d). The initial dynamics of these two processes are almost identical (only because, by chance, χ(0, µ) = 1). Subsequently, around t 28, the ES realization (panel b) undergoes a series of blocking conditions, and correspondingly, N(t) experiences a long time-interval of stagnation for t ∈ (28, 92). This indicates that the two processes, and the blocking-effects in the choice of λ(t, τ), may deeply influence the statistics of the counting process. The main quantity of interests are the mean field partial counting probability densities and · refers to the average with respect to the probability measure of the stochastic process η(t). Following [19], these quantities satisfy the evolution equations equipped with the boundary condition, solely on p − k (t, τ), as the "-"-component does not perform any transition, and with the initial conditions For this process, the counting probabilities P k (t) are expressed by Figure 6 depicts the counting probabilities (for low k) associated with this process (lines (a) to (c)) obtained by solving Equations (35)-(37) for λ 0 (τ) given by Equation (15) with τ 0 = 1 for two values of ξ = 1.5, 2.5, while the environmental stochasticity is characterized by µ = 0.1 and µ + 0 = 0.5. Symbols refer to the values of P k (t) obtained from the stochastic simulation of the process using an ensemble of 10 7 elements. The agreement between mean field probabilities and stochastic simulations is excellent. Lines (d) correspond to the behavior of P 0,bare (t) for the bare simple stochastic process (η(t) = 1), for which, at τ 0 = 1, It can be observed that the hierarchy of counting probabilities P k (t) for the ES counting process possesses a different asymptotic scaling than the corresponding bare process, and specifically P k (t) ∼ t −ξ/2 (40) . Counting probabilities P k (t) for the ES counting problem described in the main text with µ = 0.1, π + 0 = 0.5. (a) refers to ξ = 1.5, (b) to ξ = 2.5. Lines are the solutions of Equation (35) symbols the results of stochastic simulations. Lines (a) to (c) refer to k = 0, 1, 2, respectively. Line (d) represents the behavior of P 0 (t) in the absence of environmental stochasticity. Lines (e) and (f) represent the scaling P 0 (t) ∼ t −ξ and P 0 (t) ∼ t −ξ/2 , respectively. This result is remarkable and underlines how a modulation of the transition rate by means of a simple Poisson-Kac mechanism changes the long-term "anomalous" properties of the counting process, determining the occurrence of a long-term effective scaling exponent The proof of this result is derived in the next paragraph, considering the scaling analysis of Equation (35).
Next, consider the influence of the other parameters. The transition rate µ of the environmental fluctuations does not modify the asymptotic scaling properties but solely influences quantitatively the counting probabilities. This phenomenon is depicted in Figure 7: the higher the value of µ, the faster the event generation. This phenomenon is evident both as regards the relaxation of P 0 (t) (panel a) as the occurrence of the first event (panel b) expressed by the probability P 1 (t).  Another interesting property can be observed from the decay of P 1 (t) at intermediate time scales. For small µ (in the case of the data depicted in Figure 7, this means µ = 0.01), the probability P 1 (t) displays a relaxational transition from the initial scaling P 1 (t) ∼ t −ξ for t < 1/µ, pertaining to the bare counting process in the absence of environmental fluctuations to the long-term scaling P 1 (t) ∼ t −ξ/2 . Figure 8 refers to the influence of π 0 + ; i.e., of the initial preparation of the system. At short time scales, the influence of π + 0 is significant, as the initial transient of P 0 (t) can be expressed as the weighted sum of the behavior of the bare counting process in the absence of environmental fluctuations P 0,bare (t) and of the unrelaxed dynamics pertaining to the case where η(t) = 0. c d e f g Figure 8. Influence of the initial condition π + 0 on P 0 (t) for the ES counting process depicted in Figure 6 panel (a), ξ = 1.5. Lines (a) to (c) refer to π 0 + = 0, 0.5, 1, respectively. Lines (d) to (f) are the corresponding short-term approximations expressed by Equation (42).

Scaling Analysis
The anomalous scaling behavior observed in the hierarchy of counting probabilities P k (t) can be theoretically predicted by considering p 0 ± (t, τ), which satisfies the Equation (35) for k = 0, and no boundary conditions should be specified, meaning that Equation (35) propagates solely the initial condition. The general solution of these equations can be expressed as p 0 defined for τ > t, where function F(τ) entering Equation (43) can be expressed as the primitive of an auxiliary function f (τ); i.e., where b(θ), with θ = τ − t, defined for θ ≥ 0, and a ± are constants independent of τ and t. Substituting Equation (43) with the position (44) into the balance Equation (35), one obtains for a ± and f (τ) the linear homogeneous system which admits a solution provided that the determinant of the coefficient matrix is equal to zero; i.e., the solutions (two) of which are expressed by Consider the case of λ 0 (τ) given by Equation (15) or of any λ 0 (τ) monotonically decaying to zero for τ → ∞. For large τ, the term λ 2 0 (τ)/4µ 2 is small, meaning that a Taylor expansion to the first-order provides There are two independent solutions for f (τ), depending on the determination of the square root, which can be labelled as f 1 (τ) and f 2 (τ). From Equation (48), one obtains that one solution is given, for a large τ, by corresponding to the fast decay mode, since µ is a constant. The other solution (slow mode) is expressed as since for large τ, λ 2 0 (τ) λ 0 (τ). Figure 9 depicts the behavior of the two functions f h (τ), h = 1, 2, for λ 0 (τ) expressed by Equation (15)    It follows from Equation (50) that if λ 0 (τ) is given by Equation (15), the long-term slowest transition rate is expressed by λ eff (τ), where and consequently, the long-term scaling exponent of the counting probability hierarchy is ξ eff = ξ/2, which is consistent with the numerical results and with Equation (41).
The above analysis suggests that it would be possible to modulate the long-term scaling exponent of the counting probability hierarchy by considering an asymmetrical Poisson-Kac process [25], characterized by unequal transition rates µ + and µ − from the two states. In this case, the balance equations for the mean field partial densities are expressed by the equations Proceeding as above Figure 10, the system of solutions for p ± 0 (t, τ) can still be expressed by Equations (43) and (44), where the resulting linear system replacing Equation (45) is now given by Equation (53) provides for the (two) functions f h (τ), h = 1, 2, the expressions which, for a large τ (and λ(τ) → 0), behave as In the large τ-limit, for transition rates λ 0 (τ) decaying to zero Equation (54) yields the effective transition rate of the slowest decaying mode: Equation (56) implies for the effective scaling exponent ξ eff the expression Stochastic simulation results support quantitatively the validity of Equation (57), as depicted in Figure 11. These data have been derived by considering the long-term relaxation of P 0 (t) obtained from an ensemble of 10 7 elements with λ 0 (τ) given by Equation (15)

Extensions
The ES model analyzed in the previous paragraph can be extended in different ways. Particularly interesting is the case where the process η(t) entering the constitutive Equation (33) is associated with the transition mechanism of an LW process, so that [19] ξ(t) = 1 + (−1) χ(t,µ(θ)) 2 , where θ represents the transitional age of the environmental fluctuations, returning to zero at each transition, and µ(θ) is the transition rate of the environmental fluctuations.
For this class of processes, the mean field statistical description involves the partial densities p ± k (t, τ, θ), which are parametrized with respect to the transitional ages of the counting process τ; i.e., of the microstochasticity, and of the environmental fluctuations (macrostochasticity). For this problem, the evolution equations for the partial counting densities p ± k (t, τ, θ) read equipped with the boundary conditions at τ = 0 and θ = 0 for k = 1, 2, . . . , and for k = 0, 1, . . . . As an initial condition one may consider the simplest case, where π 0 ± are probability weights. This case is interesting for several reasons. Conceptually, the presence of two transition ages τ and θ accounts for the duality in the stochastic nature of the fluctuations, related to the occurrence of events (τ) and to the transition in the environmental conditions (θ). Suppose that the transition rate of the environmental fluctuations µ(θ; ζ) depends on some parameter ζ. The degrees of freedom in the choice of µ(θ; ζ) suggest that this model could in principle display a phase transition. For a counting process characterized by a transition rate given by Equation (15), a phase transition at a critical value ζ c of ζ would correspond to the break-down of the long-term power-law scaling of the counting probabilities P k (t), such that, either above or below ζ c , the counting probabilities would decay asymptotically slower for any power of t. The analysis of this model will be developed in forthcoming communications.

Concluding Remarks
This article, throughout the age description of LWs, has introduced simple and generalized counting processes overcoming the necessity to define fractional operators to recover anomalous scalings. Generalized counting processes are nothing but an extension of the simple processes, where the stationary assumption in the renewal mechanism is generalized and the recursive convolutional property may depend on the generation k, providing a progressive aging of the processes.
When the environmental conditions influence the transition mechanism, the parameters related to the occurrence of new events depend stochastically on time. In the presence of environmental stochasticity, the age formalism permits these processes to be described in a conceptually simple way and to be derived from probability, balancing the long-term scaling behavior. Particularly interesting is the result that even a simple Poisson-Kac modulation of the transitional mechanism determines a long-term effective scaling that deviates from the asymptotics of the bare process (i.e., in the absence of environmental noise). In the case of asymmetrical Poisson-Kac modulation, the long-term scaling depends continuously on the transitional parameters controlling the environmental noise. This hierarchy in the stochasticity levels results in a powerful tool to describe and model a variety of physical and biological phenomena in random environments.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

LW
Lévy Walk GCP Generalized counting process ES Environmental stochasticity