Next Article in Journal
Functional Symmetry and Statistical Depth for the Analysis of Movement Patterns in Alzheimer’s Patients
Next Article in Special Issue
T-Growth Stochastic Model: Simulation and Inference via Metaheuristic Algorithms
Previous Article in Journal
Influence of Impulse Disturbances on Oscillations of Nonlinearly Elastic Bodies
Previous Article in Special Issue
Using First-Passage Times to Analyze Tumor Growth Delay
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Simulation of a Special Class of Time-Inhomogeneous Diffusion Processes

by
Virginia Giorno
*,† and
Amelia G. Nobile
Dipartimento di Informatica, Università degli Studi di Salerno, Via Giovanni Paolo II n. 132, 84084 Fisciano, SA, Italy
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(8), 818; https://doi.org/10.3390/math9080818
Submission received: 3 February 2021 / Revised: 30 March 2021 / Accepted: 8 April 2021 / Published: 9 April 2021
(This article belongs to the Special Issue Stochastic Statistics and Modeling)

Abstract

:
General methods to simulate probability density functions and first passage time densities are provided for time-inhomogeneous stochastic diffusion processes obtained via a composition of two Gauss–Markov processes conditioned on the same initial state. Many diffusion processes with time-dependent infinitesimal drift and infinitesimal variance are included in the considered class. For these processes, the transition probability density function is explicitly determined. Moreover, simulation procedures are applied to the diffusion processes obtained starting from Wiener and Ornstein–Uhlenbeck processes. Specific examples in which the infinitesimal moments include periodic functions are discussed.

1. Introduction

Time-inhomogeneous stochastic diffusion processes are often used to model real dynamic systems in various scientific areas as neurosciences, population dynamics, queueing systems, finance, and economics (cf., for instance, Buonocore et al. [1,2], Albano and Giorno [3], Giorno and Spina [4], Ricciardi et al. [5], Renshaw [6]), Di Crescenzo et al. [7], Linetsky [8], Glasserman [9]). Specifically, in Buonocore et al. [1,2], restricted Gauss–Markov processes are used to construct inhomogeneous leaky integrate-and-fire stochastic models for single neurons activity in the presence of a reversal hyperpolarization potential and time-varying input signals. In Albano and Giorno [3], a time-inhomogeneous Ornstein–Uhlenbeck is considered as a model for the membrane potential activity of a single neuron and a statistical procedure to fit the constant parameters and the time-dependent functions is proposed. Moreover, in Giorno and Spina [4], a time-inhomogeneous Ornstein–Uhlenbeck diffusion process with jumps is also analyzed. In Ricciardi et al. [5], special emphasis is put on neuronal firing problems and on the description of population dynamics, for which the first-passage time distribution and its statistics carry a fundamental relevance. In Renshaw [6], many aspects of population dynamics are covered, including Wiener and Ornstein–Uhlenbeck diffusion models and simulation techniques. In Di Crescenzo et al. [7], the authors derive a heavy-traffic approximation that allows for approximating the state of the systems by a time-non-homogeneous Wiener process subject to jumps due to catastrophes and random returns to the zero state due to repairs. In Linetsky [8], explicit analytical expressions for transition densities of Brownian motion with drift, the Ornstein–Uhlenbeck process, and affine (square-root) diffusion with one or two reflecting barriers are obtained in the context of economics and finance. In Glasserman [9], the Monte Carlo simulation plays an essential tool in the pricing of derivative securities and in risk management.
To include several aspects of the real phenomena, one is led to consider increasing complex processes (cf., for instance, Di Crescenzo et al. [10], Giorno et al. [11,12], Abundo [13], Veestraeten [14], Molini et al. [15], Lim and Muniandy [16], Jeon et al. [17]). In these contexts, the focus is on specific probabilistic characteristics that define the behavior of the stochastic processes as the transition distributions and the related moments as well as the first passage time through specific time-dependent boundaries. In particular, in Di Crescenzo et al. [10], and in Giorno et al. [11,12], new procedures for constructing transition probability density functions and first passage time densities through constant boundaries are proposed for generally time-inhomogeneous diffusion processes. In Abundo [13], some asymptotic results for diffusions and Gauss–Markov process and their fractional integrals are obtained. In Veestraeten [14], the transition and first hitting time densities and moments for the Ornstein–Uhlenbeck process between exponential thresholds are derived. Moreover, in Molini et al. [15], first passage time statistics, such as the survival probabilities and first passage time densities, are obtained analytically for the Brownian motion driven by time-dependent drift and diffusion coefficients. In Lim and Muniandy [16] and Jeon et al. [17], some Gaussian models for anomalous diffusion are considered, and the first passage time problem is discussed. These processes are used to model physical and biological systems.
Moreover, various efforts are direct to computational approaches (Di Nardo et al. [18], Taillefumier and Magnasco [19], D’Onofrio and Pirozzi [20]) that also involve methods of statistical inferences (Albano et al. [21], Albano and Giorno [22], Ramos-Ábalos et al. [23]). Specifically, in Di Nardo et al. [18] and Taillefumier and Magnasco [19] methods to construct first-passage-time probability density functions for Gauss–Markov processes through time-dependent boundaries are proposed. In D’Onofrio and Pirozzi [20], the problem of escape times from a region confined by two time-dependent boundaries is considered for a class of Gauss–Markov processes. Moreover, numerical procedures to infer the models based on time-inhomogeneous diffusion processes are proposed in Albano et al. [21], Albano and Giorno [22], and Ramos-Ábalos et al. [23].
However, sometimes these strategies are not actionable or not convenient and an approach based on the simulation of the processes is required (see, for instance, Buonocore et al. [24,25], Tuerlinckx et al. [26], Di Crescenzo et al. [27], Giraudo et al. [28], Herrann and Zucca [29], Headrick and Mugdadi [30], Devroye [31], Iacus [32]). In particular, in Buonocore et al. [24,25], algorithms for the simulation of sample paths and to generate random variates from probability density function of Gauss–Markov processes, restricted by particular time-dependent reflecting boundaries, are proposed. Furthermore, in Tuerlinckx et al. [26], some methods for the simulation of the Wiener process with constant drift and variance are described and compared on two criteria: simulation speed and accuracy of the simulation. In Di Crescenzo et al. [27], Giraudo et al. [28] and Herrann and Zucca [29], simulation procedures to estimate first-passage-time densities are constructed. Moreover, in Headrick and Mugdadi [30], algorithms for extending the class of generalized lambda distributions from univariate to multivariate data generation are presented. Finally, Iacus [32] focuses on the simulation and inference for general stochastic differential equations.
Random variates generation is a fundamental aspect of simulation modeling and analysis (cf., for instance, Devroye [31]). Indeed, in real applications, the distribution of a function of more iid (independent and identically distributed) random variables (statistics, estimators) is often computed via the simulation only, when the resulting distribution can not be deduced analytically. For this purpose, it is necessary to identify suitable methods to simulate the single random variable of interest. Standard procedures, as the inverse transformation method and the acceptance-rejection technique, often cannot be applied successfully so that ad hoc methods are needed to generate a sample of observations and then plot the resulting empirical histogram that can be compared with the related known probability density. The knowledge of effective simulation methods for single random variates generation allows for obtaining the histogram of the distribution of the statistics and the estimators that often have analytically non-computable distributions.
In Giorno and Nobile [33], a special class of time-inhomogeneous diffusion processes is defined and analyzed. These processes are obtained by using the composition of two Gauss–Markov processes conditioned to start from the same initial state. They are useful to model dynamical systems that switch randomly between two different regimes. This class includes diffusion processes with time-dependent infinitesimal moments for which the transition probability density function (pdf) is a mixture of two normal densities with weights depending on the initial condition and on a real parameter ϑ [ 0 , 1 ] . General methods to analyze the first-passage time (FPT) are given, and FPT densities are explicitly obtained for suitable time-varying boundaries.
In the present paper, we propose theoretical and computational approaches based on the simulation to investigate on the transition densities, on the related conditional moments and on the FPT densities for the diffusion processes considered in [33].
The paper is organized as follows. In Section 2, starting from two Gauss Markov processes conditioned on the same initial state, we construct a continuous process Y ( t ) by using the composition method. We formulate an algorithm to obtain the simulated density and a procedure for the simulation of the sample paths of Y ( t ) . In Section 3, we focus on a class of time-inhomogeneous diffusion processes Z ( t ) , whose transition pdf identifies with the density of Y ( t ) . In particular, for ϑ = 0 and ϑ = 1 , one has Z ( t ) = Y ( t ) for all t, so that an algorithm to simulate the FPT through a general time-dependent boundary is formulated. Furthermore, we show that such algorithm can be generalized to the case 0 < ϑ < 1 . In Section 4 and Section 5, we apply the theoretical results and the proposed algorithms to diffusion processes obtained by the composition of Wiener processes and Ornstein–Uhlenbeck processes, respectively, by using the statistical environment and the language R. In both these cases, for fixed time instants, we simulate the random variable describing Y ( t ) , and we show that the transition pdf of the related diffusion process Z ( t ) can be superimposed over the histogram of the process Y ( t ) obtained via the simulation method. Moreover, for ϑ = 0 and ϑ = 1 , making use of the simulation of the sample-paths, we obtain the histogram of first passage times of Z ( t ) through time-dependent boundaries. Finally, the histogram of first passage times is compared with the closed form FPT density through special boundaries.

2. Composition Method for Gauss–Markov Processes

Let m ( t ) , h 1 ( t ) , h 2 ( t ) be C 1 ( T ) -class functions, where C 1 ( T ) denotes the set of continuously differentiable functions on T, with a T continuous parameter set, such that h 2 ( t ) 0 and r ( t ) = h 1 ( t ) / h 2 ( t ) is a non-negative and monotonically increasing function. Let { X i ( t ) , t τ } be the Gauss–Markov processes conditioned to start from y at time τ (see, Mehr and McFadden [34]):
X i ( t ) = ( 1 ) 3 i m ( t ) + y ( 1 ) 3 i m ( τ ) h 2 ( t ) h 2 ( τ ) + h 2 ( t ) W [ r ( t ) r ( τ ) ] ( i = 1 , 2 ; t τ ; t , τ T ; y R ) ,
where { W ( t ) , t 0 } is a standard Wiener process. The pdf f X i ( x , t ) of X i ( t ) ( i = 1 , 2 ) is the normal density
f X i ( x , t ) = 1 2 π V ( t | τ ) exp [ x M i ( t | y , τ ) ] 2 2 V ( t | τ ) , x R , t τ ,
with mean and variance
E [ X i ( t ) ] = M i ( t | y , τ ) = ( 1 ) 3 i m ( t ) + h 2 ( t ) h 2 ( τ ) y ( 1 ) 3 i m ( τ ) , Var [ X i ( t ) ] = V ( t | τ ) = h 2 ( t ) h 1 ( t ) h 2 ( t ) h 2 ( τ ) h 1 ( τ ) .
Starting from the Gauss–Markov processes X 1 ( t ) and X 2 ( t ) , conditioned to start from y at time τ , we use the composition method (cf., for instance, Ross [35]) to construct a new stochastic process { Y ( t ) , t τ } .
Let 0 ϑ 1 be a real number and let X 1 ( t ) and X 2 ( t ) be the Gauss–Markov processes conditioned to start from y at time τ , defined in (1). For any fixed t T , we assume that U y , τ ( t ) is a random variable uniform in ( 0 , 1 ) , independent of X 1 ( t ) and X 2 ( t ) . Then, the stochastic process { Y ( t ) , t τ } , defined as
Y ( t ) = X 1 ( t ) , 0 U y , τ ( t ) < Q y , τ ( ϑ ) , X 2 ( t ) , Q y , τ ( ϑ ) U y , τ ( t ) < 1 ,
with
Q y , τ ( ϑ ) = ϑ ϑ + ( 1 ϑ ) exp 2 m ( τ ) v ( τ ) y ,
where v ( t ) = h 1 ( t ) h 2 ( t ) , is characterized by pdf
f Y ( x , t ) = Q y , τ ( ϑ ) f X 1 ( x , t ) + 1 Q y , τ ( ϑ ) f X 2 ( x , t ) , x R , t τ .
The density f Y ( x , t ) in (6) is a mixture, or a composition, of the two normal densities f X 1 ( x , t ) and f X 2 ( x , t ) , with means and variances given in (3). In particular, by virtue of (4) and (6), we note that Y ( t ) = X 2 ( t ) and f Y ( x , t ) = f X 2 ( x , t ) when ϑ = 0 , whereas Y ( t ) = X 1 ( t ) and f Y ( x , t ) = f X 1 ( x , t ) when ϑ = 1 .
In the following, we formulate an algorithm to generate random variates from the pdf (6) by using the stochastic equations (1) and the composition method (4). Furthermore, we derive an algorithm for the simulation of the sample paths of Y ( t ) via the composition method.

2.1. Simulated Pdf of the Process Y ( t )

Let t T be a fixed instant and ( y , τ ) R × T fixed real constants. For t τ , we obtain a random sample of N observations of Y ( t ) , and we construct the histogram of the random sample with the density (6) as a function of x.
We first note that W [ r ( t ) r ( τ ) ] in (1) is characterized by a normal distribution with zero mean and variance r ( t ) r ( τ ) , so that we can write W [ r ( t ) r ( τ ) ] = r ( t ) r ( τ ) ξ τ , t , with ξ τ , t N ( 0 , 1 ) . Hence, we formulate the following:
Algorithm 1
Let ( y , τ ) R × T be fixed real constants and t T be a fixed instant such that t τ .
Step 1: Generate ξ τ , t N ( 0 , 1 ) and U y , τ ( t ) U ( 0 , 1 ) , with U y , τ ( t ) and ξ τ , t independent random numbers;
Step 2: From (1), generate X i ( t ) as
X i ( t ) = ( 1 ) 3 i m ( t ) + y ( 1 ) 3 i m ( τ ) h 2 ( t ) h 2 ( τ ) + h 2 ( t ) r ( t ) r ( τ ) ξ τ , t ( i = 1 , 2 ; t τ ) ;
Step 3: Making use of (7), generate Y ( t ) via (4);
Step 4: Repeat Steps 1 and 2 for N times, obtaining a random sample of size N from the density (6). The simulated pdf is then depicted by means of a histogram as function of x. The related sample moments can also be obtained.

2.2. Simulation of the Sample Paths of Y ( t )

We first generate the sample paths of the Gauss–Markov processes X 1 ( t ) and X 2 ( t ) , according to the stochastic equations (1) by using an exact simulation method (cf., for instance, Kroese et al. [36]).
Let s and t be time instants, such that τ < s < t ; by virtue of (1), we obtain:
X i ( t ) X i ( s ) h 2 ( t ) h 2 ( s ) = ( 1 ) 3 i m ( t ) ( 1 ) 3 i m ( s ) h 2 ( t ) h 2 ( s ) + h 2 ( t ) W [ r ( t ) r ( τ ) ] W [ r ( s ) r ( τ ) ] ( i = 1 , 2 ) .
Since W [ r ( t ) r ( τ ) ] W [ r ( s ) r ( τ ) ] = r ( t ) r ( s ) ξ s , t , with ξ s , t N ( 0 , 1 ) , for τ < s < t from (8), one has:
X i ( t ) = ( 1 ) 3 i m ( t ) + h 2 ( t ) h 2 ( s ) X i ( s ) ( 1 ) 3 i m ( s ) + h 2 ( t ) r ( t ) r ( s ) ξ s , t , ( i = 1 , 2 ) .
For the process Y ( t ) , from (4), one obtains:
Y ( t ) = Y ( s ) h 2 ( t ) h 2 ( s ) + R y , τ ( s , t ) + h 2 ( t ) r ( t ) r ( s ) ξ s , t ( τ < s < t ) ,
where
R y , τ ( s , t ) = m ( t ) m ( s ) h 2 ( t ) h 2 ( s ) , 0 U y , τ ( s ) < Q y , τ ( ϑ ) , 0 U y , τ ( t ) < Q y , τ ( ϑ ) , m ( t ) + m ( s ) h 2 ( t ) h 2 ( s ) 2 h 2 ( t ) h 2 ( τ ) m ( τ ) , Q y , τ ( ϑ ) U y , τ ( s ) < 1 , 0 U y , τ ( t ) < Q y , τ ( ϑ ) , m ( t ) m ( s ) h 2 ( t ) h 2 ( s ) + 2 h 2 ( t ) h 2 ( τ ) m ( τ ) , 0 U y , τ ( s ) < Q y , τ ( ϑ ) , Q y , τ ( ϑ ) U y , τ ( t ) < 1 , m ( t ) + m ( s ) h 2 ( t ) h 2 ( s ) , Q y , τ ( ϑ ) U y , τ ( s ) < 1 , Q y , τ ( ϑ ) U y , τ ( t ) < 1 .
Then, the following algorithm can be implemented:
Algorithm 2
Let t 1 < t 2 < < t n , with t k = τ + ( k 1 ) h ( h > 0 , k = 1 , 2 , n ) , be the set of equidistant time instants for which the simulation of Y ( t ) is required.
Step 1: Set t 1 = τ and Y ( t 1 ) = Y ( τ ) = y ;
Step 2: For k = 2 , 3 , , n set
Y ( t k ) = Y ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) + R y , τ ( t k 1 , t k ) + h 2 ( t ) r ( t k ) r ( t k 1 ) ξ k ,
where ξ 1 , ξ 2 , , ξ n = i i d N ( 0 , 1 ) and
R y , τ ( t k 1 , t k ) = m ( t k ) m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) , 0 U k 1 < Q y , τ ( ϑ ) , 0 V k < Q y , τ ( ϑ ) , m ( t k ) + m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) 2 h 2 ( t k ) h 2 ( τ ) m ( τ ) , Q y , τ ( ϑ ) U k 1 < 1 , 0 V k < Q y , τ ( ϑ ) , m ( t k ) m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) + 2 h 2 ( t k ) h 2 ( τ ) m ( τ ) , 0 U k 1 < Q y , τ ( ϑ ) , Q y , τ ( ϑ ) V k < 1 , m ( t k ) + m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) , Q y , τ ( ϑ ) U k 1 < 1 , Q y , τ ( ϑ ) V k < 1 ,
with U 1 , U 2 , , U n = i i d U ( 0 , 1 ) and V 1 , V 2 , , V n = i i d U ( 0 , 1 ) , being U 1 , U 2 , , U n , V 1 , V 2 , , V n and ξ 1 , ξ 2 , , ξ n independent random numbers.
Formula (12) is a stochastic recurrence equation: starting from Y ( τ ) = y that is assumed to be known, it produces a sample path for Y ( t ) at the desired times t 1 , t 2 , , t n .

3. Some Time-Inhomogeneous Diffusion Processes

Let { Z ( t ) , t T } be a time-inhomogeneous diffusion process with infinitesimal drift and infinitesimal variance
B 1 ( x , t ) = h 2 ( t ) h 2 ( t ) x + m ( t ) h 2 ( t ) h 2 ( t ) m ( t ) ϑ ( 1 ϑ ) exp 2 m ( t ) v ( t ) x ϑ + ( 1 ϑ ) exp 2 m ( t ) v ( t ) x , x R , B 2 ( t ) = h 2 2 ( t ) r ( t ) ,
where 0 ϑ 1 is a real number and m ( t ) , h 1 ( t ) , h 2 ( t ) , v ( t ) are chosen as in Section 2. As proved in Giorno and Nobile [33], if one of the following assumptions is satisfied:
(a) 
the left endpoint of T is zero, ( y , τ ) = ( 0 , 0 ) , m ( τ ) = h 1 ( τ ) = 0 ;
(b) 
m ( t ) = c h 1 ( t ) , t T , c R ,
The density (6) identifies with the transition pdf f ( x , t | y , τ ) = P { Z ( t ) x | Z ( τ ) = y } / x of the diffusion process Z ( t ) . Then, in the cases (a) and (b), for all fixed t τ , one has Z ( t ) = d Y ( t ) .

3.1. Case (a)

If the left endpoint of T is zero, ( y , τ ) = ( 0 , 0 ) , m ( τ ) = h 1 ( τ ) = 0 , the transition pdf of the diffusion process Z ( t ) , with infinitesimal moments (14), is:
f Z ( x , t | 0 , 0 ) = ϑ + ( 1 ϑ ) exp 2 m ( t ) v ( t ) x 1 2 π v ( t ) exp [ x m ( t ) ] 2 2 v ( t ) ( x R ) ,
and the conditional mean and variance are:
E [ Z ( t ) | Z ( 0 ) = 0 | = ( 2 ϑ 1 ) m ( t ) , Var [ Z ( t ) | Z ( 0 ) = 0 ] = v ( t ) + 4 ϑ ( 1 ϑ ) m 2 ( t ) ,
respectively.

3.2. Case (b)

If m ( t ) = c h 1 ( t ) for t T and c R , the infinitesimal moments (14) of Z ( t ) become:
B 1 ( x , t ) = h 2 ( t ) h 2 ( t ) x + c B 2 ( t ) h 2 ( t ) ϑ ( 1 ϑ ) exp 2 c h 2 ( t ) x ϑ + ( 1 ϑ ) exp 2 c h 2 ( t ) x , x R B 2 ( t ) = h 2 2 ( t ) r ( t ) ,
and, from (6), one obtains the transition pdf:
f Z ( x , t | y , τ ) = ϑ + ( 1 ϑ ) exp 2 c h 2 ( t ) x ϑ + ( 1 ϑ ) exp 2 c h 2 ( τ ) y 1 2 π V ( t | τ ) exp [ x M 1 ( t | y , τ ) ] 2 2 V ( t | τ ) , ( x R ) ,
where M 1 ( t | y , τ ) and V ( t | τ ) are given in (3), with m ( t ) = c h 1 ( t ) . Then, the conditional mean and the variance of Z ( t ) are:
E [ Z ( t ) | Z ( τ ) = y | = h 2 ( t ) h 2 ( τ ) y + c V ( t | τ ) h 2 ( t ) ϑ ( 1 ϑ ) exp 2 c h 2 ( τ ) y ϑ + ( 1 ϑ ) exp 2 c h 2 ( τ ) y , Var [ Z ( t ) | Z ( τ ) = y ] = V ( t | τ ) + c V ( t | τ ) h 2 ( t ) 2 4 ϑ ( 1 ϑ ) exp 2 c h 2 ( τ ) y ϑ + ( 1 ϑ ) exp 2 c h 2 ( τ ) y 2 ·
Furthermore, for the time-inhomogeneous diffusion process defined in (14), let
T Z = inf t τ { t : Z ( t ) S ( t ) } , Z ( τ ) = y < S ( τ ) , τ , t T inf t τ { t : Z ( t ) S ( t ) } , Z ( τ ) = y > S ( τ ) ,
be the FPT of Z ( t ) from Z ( τ ) = y to the boundary S ( t ) C 1 ( T ) and let g Z [ S ( t ) , t | y , τ ] = P ( T Z t ) / t be the FPT pdf, with y S ( τ ) . The FPT pdf g Z [ S ( t ) , t | y , τ ] is a solution of the first-kind Volterra integral equation:
f Z ( x , t | y , τ ) = τ t g Z [ S ( u ) , u | y , τ ] f Z [ x , t | S ( u ) , u ] d u , [ y < S ( τ ) , x S ( t ) ] or [ y > S ( τ ) , x S ( t ) ] .
Making use of (18) in (21), one obtains:
g Z [ S ( t ) , t | y , τ ] = ϑ + ( 1 ϑ ) exp 2 c h 2 ( t ) S ( t ) ϑ + ( 1 ϑ ) exp 2 c h 2 ( τ ) y g X 1 [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] .
Similarly, the FPT densities of the processes X 1 ( t ) and X 2 ( t ) are also solutions of first-kind Volterra integral equations:
f X i ( x , t | y , τ ) = τ t g X i [ S ( u ) , u | y , τ ] f X i [ x , t | S ( u ) , u ] d u ( i = 1 , 2 ) , [ y < S ( τ ) , x S ( t ) ] or [ y > S ( τ ) , x S ( t ) ] .
In the case (b), the transition densities of the processes X 1 ( t ) and X 2 ( t ) satisfy the following symmetry relation:
f X 2 ( x , t | y , τ ) = exp 2 c h 2 ( t ) x exp 2 c h 2 ( τ ) y f X 1 ( x , t | y , τ ) ,
so that, from (23), one has:
g X 1 [ S ( t ) , t | y , τ ] = exp 2 c h 2 ( t ) S ( t ) exp 2 c h 2 ( τ ) y g X 2 [ S ( t ) , t | y , τ ] .
Hence, for the diffusion process Z ( t ) with infinitesimal moments (17), from (22) and (24), one obtains
g Z [ S ( t ) , t | y , τ ] = Q y , τ ( ϑ ) g X 1 [ S ( t ) , t | y , τ ] + [ 1 Q y , τ ( ϑ ) ] g X 2 [ S ( t ) , t | y , τ ] [ y < S ( τ ) , x S ( t ) ] or [ y > S ( τ ) , x S ( t ) ] ,
where 0 ϑ 1 ,
Q y , τ ( ϑ ) = ϑ ϑ + ( 1 ϑ ) exp 2 c h 2 ( τ ) y
and g X i [ S ( t ) , t | y , τ ] denotes the FPT density of X i ( t ) through S ( t ) starting from X i ( τ ) = y ( i = 1 , 2 ) . Equation (25) shows that g Z [ S ( t ) , t | y , τ ] is a mixture of two FPT densities g X 1 [ S ( t ) , t | y , τ ] and g X 2 [ S ( t ) , t | y , τ ] . Therefore, the random variable T Z is identically distributed as
T = T X 1 , 0 U y , τ < Q y , τ ( ϑ ) , T X 2 , Q y , τ ( ϑ ) U y , τ < 1 ,
where T X i is the FPT of X i ( t ) through S ( t ) for i = 1 , 2 and U y , τ U ( 0 , 1 ) is independent of T X 1 and T X 2 .
We note that, for the diffusion process Z ( t ) with infinitesimal moments (17) if
S ( t ) = a 1 h 1 ( t ) + a 2 h 2 ( t ) , t T , a 1 , a 2 R
then the FPT density can be expressed in closed form as (see Giorno and Nobile [33]):
g Z [ S ( t ) , t | y , τ ] = | S ( τ ) y | r ( t ) r ( τ ) h 2 ( t ) h 2 ( τ ) d r ( t ) d t f Z [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] .
with f Z ( x , t | y , τ ) given in (18). Moreover, the first passage of Z ( t ) through S ( t ) , given in (27), is a certain event if and only if [ S ( τ ) y ] [ a 1 + ( 1 ) i c ] / h 2 ( τ ) 0 for i = 1 , 2 .
Making use of the Algorithm 1, it is possible to obtain a random sample of N observations of Y ( t ) and to construct the histogram of the random sample. Such histogram can be compared with the transition pdf (15), in the case (a), and with the transition pdf (18), in the case (b), as a function of x, being Z ( t ) = d Y ( t ) for all fixed t.
Applying the Algorithm 2, we can produce a sample path for Y ( t ) at the desired times t 1 , t 2 , . . . , t n via the composition method.
For ϑ = 0 or ϑ = 1 , recalling that Z ( t ) = Y ( t ) , we can obtain the following method for the simulation of first passage times for the process Z ( t ) through S ( t ) if y < S ( τ ) :
Algorithm 3
Let t 1 < t 2 < < t n be the set of distinct time instants for which the simulation of the process Z ( t ) is desired.
Step 1: Set t 0 = τ , Z ( t 0 ) = y , k = 1 ;
Step 2: If ϑ = 0 compute Z ( t k ) = X 2 ( t k ) via
Z ( t k ) = Z ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) m ( t k ) m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) + h 2 ( t ) r ( t k ) r ( t k 1 ) ξ k ,
whereas, if ϑ = 1 , compute Z ( t k ) = X 1 ( t k ) via
Z ( t k ) = Z ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) + m ( t k ) m ( t k 1 ) h 2 ( t k ) h 2 ( t k 1 ) + h 2 ( t ) r ( t k ) r ( t k 1 ) ξ k ,
with ξ 1 , ξ 2 , , ξ n independent normal random numbers.
Step 3: If Z ( t k ) S ( t k ) , then collect the first passage time t k and stop, else k k + 1 and go to Step 2.
The implementation of the previous procedure for N times allows for obtaining a collection of N simulated first passage times of Z ( t ) through S ( t ) . Then, the histogram of such first passage times can be used to obtain an estimation of the FPT pdf. When y > S ( τ ) , in Step 3 of Algorithm 3, it is necessary to change Z ( t k ) S ( t k ) .
In the case (b), when 0 < ϑ < 1 , implementing the Algorithm 3N times for ϑ = 0 and for ϑ = 1 , we obtain two collections of N simulated first passage times t 2 , 1 , , t 2 , N for X 2 ( t ) and t 1 , 1 , , t 1 , N for X 1 ( t ) . Recalling (26), one obtains a collection of N simulated first passage times of Z ( t ) through S ( t ) as follows:
t k = t 1 , k , 0 u k < Q y , τ ( ϑ ) , t 2 , k , Q y , τ ( ϑ ) u k < 1 , ( k = 1 , 2 , , N )
where u 1 , u 2 , , u N are independent uniform numbers in ( 0 , 1 ) . Hence, an estimation of the FPT pdf of Z ( t ) through S ( t ) can be achieved by the histogram of the first passage times t 1 , t 2 , , t N .
For the diffusion process Z ( t ) , the estimation of the FPT pdf via Algorithm 3 and its generalization to the case 0 < ϑ < 1 depends on the infinitesimal moments; on the discretization step, on the time-varying boundary and on the choice of the initial state with respect to boundary. In some cases, the FPT densities can present heavy tails as the time increases, so that the simple path of the stochastic process can take a long time to reach and cross the boundary. The simulations run until STEP 3 in Algorithm 3 are satisfied, but, in some cases, can be necessary to set a maximum simulation time in order to avoid very long and time-expensive simulations. Of course, in this case, it is necessary to count the realizations that do not reach the threshold and give an estimation of the success probability in such a way as not to affect the estimation of the FPT density.
In the sequel, particular attention is dedicated to the simulation of the processes generated via the Wiener and the Ornstein–Uhlenbeck processes, with continuous parameter set T = [ 0 , + ) .

4. Simulation of Processes Generated via the Wiener Process

Let X 1 ( t ) and X 2 ( t ) be the time-inhomogeneous Wiener processes, with state-space in R , conditioned to start from y at time τ :
X i ( t ) = y + ( 1 ) 3 i τ t β ( u ) d u + W τ t σ 2 ( u ) d u , i = 1 , 2 ; t τ ,
where β ( t ) and σ ( t ) are continuous functions, with β ( t ) R and σ ( t ) > 0 . Due to (1), one has:
m ( t ) = 0 t β ( u ) d u , h 1 ( t ) = 0 t σ 2 ( u ) d u , h 2 ( t ) = 1 .
Making use of (31) in (14), for the diffusion process Z ( t ) , we obtain the following infinitesimal moments:
B 1 ( x , t ) = β ( t ) ϑ ( 1 ϑ ) exp 2 x 0 t β ( u ) d u 0 t σ 2 ( u ) d u ϑ + ( 1 ϑ ) exp 2 x 0 t β ( u ) d u 0 t σ 2 ( u ) d u , B 2 ( t ) = σ 2 ( t ) ,
with 0 ϑ 1 . We note that, if ϑ = 0 , Z ( t ) = X 2 ( t ) is the time-inhomogeneous Wiener process with infinitesimal moments B 1 ( t ) = β ( t ) and B 2 ( t ) = σ 2 ( t ) , whereas, when ϑ = 1 , Z ( t ) = X 1 ( t ) is the time-inhomogeneous Wiener process with infinitesimal moments B 1 ( t ) = β ( t ) and B 2 ( t ) = σ 2 ( t ) .
We assume that β ( t ) 0 for t 0 . By choosing ( y , τ ) = ( 0 , 0 ) , from (31), one has m ( 0 ) = h 1 ( 0 ) = 0 , so that the assumptions (a) are satisfied; hence, from (15), one obtains:
f Z ( x , t | 0 , 0 ) = ϑ + ( 1 ϑ ) exp 2 x 0 t β ( u ) d u 0 t σ 2 ( u ) d u × 1 2 π 0 t σ 2 ( u ) d u exp x 0 t β ( u ) d u 2 2 0 t σ 2 ( u ) d u , x R ,
and, making use of (31) in (16), one has:
E [ Z ( t ) | Z ( 0 ) = 0 | = ( 2 ϑ 1 ) 0 t β ( u ) d u , Var [ Z ( t ) | Z ( 0 ) = 0 ] = 0 t σ 2 ( u ) d u + 4 ϑ ( 1 ϑ ) 0 t β ( u ) d u 2 .
Furthermore, the assumption (b) holds if and only if
β ( t ) = c σ 2 ( t ) , t 0 , c R .
In this case, from (32), the infinitesimal moments of Z ( t ) are:
B 1 ( x , t ) = β ( t ) ϑ ( 1 ϑ ) e 2 c x ϑ + ( 1 ϑ ) e 2 c x , B 2 ( t ) = σ 2 ( t ) ,
and, from (18), it follows:
f Z ( x , t | y , τ ) = ϑ + ( 1 ϑ ) e 2 c x ϑ + ( 1 ϑ ) e 2 c y × 1 2 π τ t σ 2 ( u ) d u exp x y c τ t σ 2 ( u ) d u 2 2 τ t σ 2 ( u ) d u , x , y R .
Making use of (31) in (19), one has:
E [ Z ( t ) | Z ( τ ) = y | = y + c ϑ ( 1 ϑ ) e 2 c y ϑ + ( 1 ϑ ) e 2 c y τ t σ 2 ( u ) d u , Var [ Z ( t ) | Z ( τ ) = y ] = τ t σ 2 ( u ) d u + c τ t σ 2 ( u ) d u 2 4 ϑ ( 1 ϑ ) e 2 c y ϑ + ( 1 ϑ ) e 2 c y 2 ·
Moreover, due to (27) and (28), for the process Z ( t ) , the FPT pdf through the boundary
S ( t ) = a 2 + a 1 0 t σ 2 ( u ) d u , t 0 , a 1 , a 2 R
is
g Z [ S ( t ) , t | y , τ ] = | S ( τ ) y | τ t σ 2 ( u ) d u σ 2 ( t ) f Z [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] ,
with f Z ( x , t | y , τ ) given in (37). Finally, the first passage of Z ( t ) through S ( t ) , given in (39), is a certain event if and only if [ S ( τ ) y ] [ a 1 + ( 1 ) i c ] 0 for i = 1 , 2 .
Example 1.
We consider the diffusion process Z ( t ) in (32) with
β ( t ) = γ + 2 π ν Q sin 4 π t Q , σ 2 ( t ) = σ 2 , t 0 ,
so that
m ( t ) = γ t + ν sin 2 2 π t Q , h 1 ( t ) = σ 2 t , h 2 ( t ) = 1 , t 0 .
Then, from (32), it follows that the infinitesimal drift and the infinitesimal variance of the process Z ( t ) are
B 1 ( x , t ) = γ + 2 π ν Q sin 4 π t Q ϑ ( 1 ϑ ) exp 2 x σ 2 γ t + ν sin 2 2 π t Q ϑ + ( 1 ϑ ) exp 2 x σ 2 γ t + ν sin 2 2 π t Q , B 2 ( t ) = σ 2 ,
with 0 ϑ 1 . We suppose that ( y , τ ) = ( 0 , 0 ) , so that the assumptions (a) are satisfied. In this case, from (7), we obtain:
X i ( t ) = ( 1 ) 3 i γ t + ν sin 2 2 π t Q + σ t ξ t i = 1 , 2 ; t 0 ,
with ξ t N ( 0 , 1 ) ; hence, from (4) and (5), one has
Y ( t ) = X 1 ( t ) , 0 U t < ϑ , X 2 ( t ) , ϑ U t < 1 ,
and Z ( t ) = d Y ( t ) for all fixed t 0 . Algorithm 1 can be used to compare the transition pdf (33) of Z ( t ) , being β ( t ) and σ 2 ( t ) given in (41), with the histograms of the random sample of observations of Y ( t ) , obtained via (45), for different instants t. Specifically, in Figure 1, the histogram of a random sample of N = 10 6 observations of Y ( t ) is obtained for different times t, by choosing β ( t ) and σ 2 ( t ) as in (41), with ϑ = 0.1 , γ = 1.5 , σ 2 = 2 , ν = 0.1 , Q = 1 .
In the sequel, we denote by
C [ Z ( t ) | Z ( τ ) = y ] = Var [ Z ( t ) | Z ( τ ) = y ] | E [ Z ( t ) | Z ( τ ) = y ] |
the coefficient of variation. Making use of (34), in columns 2, 4, 6 of Table 1, the mean E [ Z ( t ) | Z ( 0 ) = 0 ] , the variance Var [ Z ( t ) | Z ( 0 ) = 0 ] and the coefficient of variation C [ Z ( t ) | Z ( 0 ) = 0 ] are listed for the same values of the parameters of Figure 1 with t = 1 , 5 , 10 , 15 . The values in columns 3, 5, 7 refer to the simulation sample mean y ¯ t , variance s t 2 and coefficient of variation c t , computed from the same random sample of N = 10 6 observations of Y ( t ) used in Figure 1. The results of Figure 1 and Table 1 show the good agreement between the probabilistic results and those obtained via simulation.
Algorithm 2 permits generating sample paths of the process Y ( t ) . Indeed, for the considered case, from (12), setting t 1 = 0 , Y ( t 1 ) = 0 , we have
Y ( t k ) = Y ( t k 1 ) + R ( t k 1 , t k ) + σ t k t k 1 ξ k , k = 2 , 3 , , n ,
where ξ 1 , ξ 2 , , ξ n = i i d N ( 0 , 1 ) and
R ( t k 1 , t k ) = m ( t k ) m ( t k 1 ) , 0 U k 1 < ϑ , 0 V k < ϑ , m ( t k ) + m ( t k 1 ) , ϑ U k 1 < 1 , 0 V k < ϑ , m ( t k ) m ( t k 1 ) , 0 U k 1 < ϑ , ϑ V k < 1 , m ( t k ) + m ( t k 1 ) , ϑ U k 1 < 1 , ϑ V k < 1 ,
with m ( t ) given in (42).
In Figure 2, a sample path of Y ( t ) is plotted as function of t for ϑ = 0.1 and ϑ = 0.9 by choosing β ( t ) and σ 2 ( t ) as in (41), with γ = 1.5 , σ 2 = 2 , ν = 0.1 , Q = 1 .
When ϑ = 0 or ϑ = 1 , Y ( t ) identifies with a time-inhomogeneous Wiener process Z ( t ) . Specifically, for ϑ = 0 , Z ( t ) has infinitesimal moments B 1 ( t ) = γ 2 π ν Q sin 4 π t Q and B 2 = σ 2 , whereas, when ϑ = 1 , one has B 1 ( t ) = γ + 2 π ν Q sin 4 π t Q and B 2 = σ 2 . We recall that, for the time-homogeneous Wiener process Z ˜ ( t ) with infinitesimal moments B ˜ 1 = μ and B ˜ 2 = σ 2 , the FTP pdf through the constant boundary S is known in closed form:
g ( S , t | y , 0 ) = | S y | σ 2 π t 3 exp ( S y μ t ) 2 2 σ 2 t , y S .
In Figure 3, for ϑ = 1 , the histograms of FPT for Z ( t ) , with γ = 1.5 , ν = 0.1 , Q = 1 , σ 2 = 2 , from Z ( 0 ) = 0 through a constant boundaries S = 5 , 10 are plotted as function of t by using a collection of N = 10 4 simulated first passage times obtained via Algorithm 3. The solid curves in Figure 3 show the FPT densities of the Wiener process Z ˜ ( t ) , having infinitesimal moments B ˜ 1 = 1.5 and B ˜ 2 = 2 , from Z ˜ ( 0 ) = 0 through S = 5 , 10 , given in (48).
Example 2.
We consider the diffusion process Z ( t ) in (32) with
σ 2 ( t ) = β ( t ) = γ + 2 π ν Q sin 4 π t Q , t 0 ,
where γ > 2 π | ν | / Q , to ensure that B 2 ( t ) > 0 for t 0 , so that, from (31), one has:
m ( t ) = h 1 ( t ) = γ t + ν sin 2 2 π t Q , h 2 ( t ) = 1 , t 0 .
Then, from (36), for t 0 and x R , one has:
B 1 ( x , t ) = γ + 2 π ν Q sin 4 π t Q ϑ ( 1 ϑ ) e 2 x ϑ + ( 1 ϑ ) e 2 x , B 2 ( t ) = γ + 2 π ν Q sin 4 π t Q ,
with 0 ϑ 1 . The assumption (b) is satisfies with c = 1 . In this case, from (7), we obtain:
X i ( t ) = y + ( 1 ) 3 i { γ ( t τ ) + ν [ sin 2 2 π t Q sin 2 2 π τ Q ] } + γ ( t τ ) + ν [ sin 2 2 π t Q sin 2 ( 2 π τ Q ) ] ξ τ , t , i = 1 , 2 ; t τ ,
with ξ τ , t N ( 0 , 1 ) ; hence, (4) holds with
Q y ( ϑ ) = ϑ ϑ + ( 1 ϑ ) e 2 y , 0 ϑ 1 .
Since Z ( t ) = d Y ( t ) for all fixed t 0 , we use the Algorithm 1 to compare the transition pdf (37) of Z ( t ) with the histograms of the random sample of observations of Y ( t ) for different instants t. Specifically, in Figure 4, the histogram of a random sample of N = 10 6 observations of Y ( t ) is obtained for different times t, by choosing ( y , τ ) = ( 0 , 0 ) , β ( t ) and σ 2 ( t ) as in (49), with ϑ = 0.4 , γ = 1.5 , ν = 0.1 , Q = 2 .
For the same values of the parameters, in Table 2 for t = 1 , 5 , 10 , 15 , the conditional mean, variance, and coefficient of variation of Z ( t ) , evaluated via (38), are compared with the simulation sample mean y ¯ t , variance s t 2 and coefficient of variation c t , obtained making use of the same random sample of N = 10 6 observations of Y ( t ) of Figure 4.
Furthermore, due to (39) and (40), for the diffusion process Z ( t ) having infinitesimal moments (51), the FPT pdf through the boundary
S ( t ) = a 2 + a 1 γ t + ν sin 2 2 π t Q , a 1 , a 2 R , γ > 2 π | ν | Q ,
is
g Z [ S ( t ) , t | y , τ ] = | S ( τ ) y | γ + 2 π ν Q sin 4 π t Q γ ( t τ ) + ν [ sin 2 2 π t Q sin 2 ( 2 π τ Q ) ] f Z [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] .
The first passage of Z ( t ) through (54) is a certain event if and only if [ y < S ( τ ) , a 1 1 ] or [ y > S ( τ ) , a 1 1 ] .
From (51), for ϑ = 0 , one has B 1 ( t ) = B 2 ( t ) = γ 2 π ν Q sin 4 π t Q , whereas, when ϑ = 1 , one obtains B 1 ( t ) = B 2 ( t ) = γ + 2 π ν Q sin 4 π t Q ; in both cases, Y ( t ) = Z ( t ) . In Figure 5, for some choices of ϑ, the histograms of FPT for the process (51), with γ = 1.5 , ν = 0.1 , Q = 2 , from Z ( 0 ) = 0 through (54), with a 1 = 1.2 , a 2 = 2 are plotted as a function of t by using a collection of N = 10 4 simulated first passage times obtained via Algorithm 3. The solid curves in Figure 5 show the FPT densities (55) with the same values of parameters.

5. Simulation of Processes Generated via the Ornstein–Uhlenbeck Process

Let X 1 ( t ) and X 2 ( t ) be the time-inhomogeneous Ornstein–Uhlenbeck processes, with state-space in R , conditioned to start from y at time τ :
X i ( t ) = y e φ ( t ) φ ( τ ) + ( 1 ) 3 i e φ ( t ) [ Λ ( t ) Λ ( τ ) ] + e φ ( t ) W Ω ( t ) Ω ( τ ) , t τ ,
for i = 1 , 2 , where
φ ( t ) = 0 t α ( z ) d z , Λ ( t ) = 0 t β ( u ) e φ ( u ) d u , Ω ( t ) = 0 t σ 2 ( u ) e 2 φ ( u ) d u ,
being α ( t ) , β ( t ) and σ ( t ) continuous functions, with α ( t ) R , β ( t ) R and σ ( t ) > 0 . By virtue of (1), for t 0 , one has:
m ( t ) = e φ ( t ) Λ ( t ) , h 1 ( t ) = e φ ( t ) Ω ( t ) , h 2 ( t ) = e φ ( t ) .
From (14) and (58), we consider the diffusion process Z ( t ) with infinitesimal moments:
B 1 ( x , t ) = α ( t ) x + β ( t ) ϑ ( 1 ϑ ) exp 2 x e φ ( t ) Λ ( t ) Ω ( t ) ϑ + ( 1 ϑ ) exp 2 x e φ ( t ) Λ ( t ) Ω ( t ) , B 2 ( t ) = σ 2 ( t ) ,
with 0 ϑ 1 . If α ( t ) = 0 for all t 0 , then the drift in (59) is identified with that in (32). Furthermore, if ϑ = 0 , Z ( t ) = X 2 ( t ) is the time-inhomogeneous Ornstein–Uhlenbeck process with infinitesimal moments B 1 ( x , t ) = α ( t ) x β ( t ) and B 2 ( t ) = σ 2 ( t ) , whereas, when ϑ = 1 , Z ( t ) = X 1 ( t ) is the time-inhomogeneous Ornstein–Uhlenbeck process with infinitesimal moments B 1 ( x , t ) = α ( t ) x + β ( t ) and B 2 ( t ) = σ 2 ( t ) .
We assume that β ( t ) 0 for all t 0 . By choosing ( y , τ ) = ( 0 , 0 ) , from (58), one has m ( 0 ) = h 1 ( 0 ) = 0 ; hence, the assumptions (a) are satisfied, and, from (15), one has:
f Z ( x , t | 0 , 0 ) = e φ ( t ) ϑ + ( 1 ϑ ) exp 2 x e φ ( t ) Λ ( t ) Ω ( t ) × 1 2 π Ω ( t ) exp x e φ ( t ) Λ ( t ) 2 2 Ω ( t ) , x R ,
and, making use of (58) in (16), one obtains:
E [ Z ( t ) | Z ( 0 ) = 0 | = ( 2 ϑ 1 ) e φ ( t ) Λ ( t ) , Var [ Z ( t ) | Z ( 0 ) = 0 ] = e 2 φ ( t ) Ω ( t ) + 4 ϑ ( 1 ϑ ) e 2 φ ( t ) Λ 2 ( t ) ,
where φ ( t ) , Λ ( t ) and Ω ( t ) are given in (57). Moreover, the assumption (b) holds if and only if
β ( t ) = c e φ ( t ) σ 2 ( t ) , t 0 , c R .
In this case, from (59), the infinitesimal moments of Z ( t ) are:
B 1 ( x , t ) = α ( t ) x + β ( t ) ϑ ( 1 ϑ ) exp { 2 c x e φ ( t ) } ϑ + ( 1 ϑ ) exp { 2 c x e φ ( t ) } , B 2 ( t ) = σ 2 ( t ) ,
with 0 ϑ 1 , and, from (18), one has
f Z ( x , t | y , τ ) = ϑ + ( 1 ϑ ) exp { 2 c x e φ ( t ) } ϑ + ( 1 ϑ ) exp { 2 c y e φ ( τ ) } e φ ( t ) 2 π [ Ω ( t ) Ω ( τ ) ] × exp x e φ ( t ) y e φ ( τ ) c [ Ω ( t ) Ω ( τ ) ] 2 2 [ Ω ( t ) Ω ( τ ) ] , x , y R .
Making use of (58) in (19), one obtains:
E [ Z ( t ) | Z ( τ ) = y | = y e φ ( t ) φ ( τ ) + c e φ ( t ) [ Ω ( t ) Ω ( τ ) ] ϑ ( 1 ϑ ) exp 2 c y e φ ( τ ) ϑ + ( 1 ϑ ) exp 2 c y e φ ( τ ) , Var [ Z ( t ) | Z ( τ ) = y ] = e 2 φ ( t ) [ Ω ( t ) Ω ( τ ) ] + c 2 e 2 φ ( t ) [ Ω ( t ) Ω ( τ ) ] 2 × 4 ϑ ( 1 ϑ ) exp 2 c y e φ ( τ ) ϑ + ( 1 ϑ ) exp 2 c y e φ ( τ ) 2 ,
with φ ( t ) , Λ ( t ) and Ω ( t ) defined in (57). Furthermore, due to (27) and (28), the FPT pdf of the process Z ( t ) through the boundary
S ( t ) = e φ ( t ) a 2 + a 1 Ω ( t ) , t 0 , a 1 , a 2 R
is
g Z [ S ( t ) , t | y , τ ] = | S ( τ ) y | e φ ( t ) φ ( τ ) Ω ( t ) Ω ( τ ) σ 2 ( t ) f Z [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] ,
with f Z ( x , t | y , τ ) given in (64). Finally, the first passage of Z ( t ) through S ( t ) , given in (66), is a certain event if and only if [ S ( τ ) y ] [ a 1 + ( 1 ) i c ] 0 for i = 1 , 2 .
Example 3.
We consider the diffusion process Z ( t ) in (59) with
α ( t ) = α , β ( t ) = β , σ 2 ( t ) = σ 2 , t 0 .
Therefore, from (57), one has
φ ( t ) = α t , Λ ( t ) = β α ( 1 e α t ) , Ω ( t ) = σ 2 2 α ( 1 e 2 α t ) , t 0 ,
so that
m ( t ) = β α ( e α t 1 ) , h 1 ( t ) = σ 2 2 α ( e α t e α t ) , h 2 ( t ) = e α t , t 0 .
Then, from (59), it follows that the infinitesimal moments of Z ( t ) are
B 1 ( x , t ) = α x + β ϑ ( 1 ϑ ) exp 4 β x σ 2 ( 1 + e α t ) ϑ + ( 1 ϑ ) exp 4 β x σ 2 ( 1 + e α t ) , B 2 ( t ) = σ 2 ,
with 0 ϑ 1 . We suppose that ( y , τ ) = ( 0 , 0 ) , so that the assumptions (a) are satisfied. From (60), one has:
f Z ( x , t | 0 , 0 ) = ϑ + ( 1 ϑ ) exp 4 β x σ 2 ( 1 + e α t ) α π σ 2 ( e 2 α t 1 ) × exp α x β α ( e α t 1 ) 2 σ 2 ( e 2 α t 1 ) , x R .
We note that, for α < 0 , the process Z ( t ) admits a steady-state density:
W Z ( x ) = lim t + f Z ( x , t | 0 , 0 ) = ϑ + ( 1 ϑ ) exp 4 β x σ 2 × | α | π σ 2 exp | α | σ 2 x β | α | 2 , x R .
From (7), we have:
X i ( t ) = ( 1 ) 3 i β e α t 1 α + σ e 2 α t 1 2 α ξ t , i = 1 , 2 ; t 0 ,
with ξ t N ( 0 , 1 ) . Recalling (4) and (5), Y ( t ) is given in (45) with X i ( t ) given in (74) and Z ( t ) = d Y ( t ) for all fixed t 0 .
In Figure 5, we compare the transition densities (72) of Z ( t ) with the histograms of the random sample of observations of Y ( t ) for different instants t, obtained by using Algorithm 1. The histogram of a random sample of N = 10 6 observations of Y ( t ) is obtained for different times t, by choosing ϑ = 0.1 , α = 0.2 , β = 1.5 , σ 2 = 2.0 . The dashed curves in Figure 5 show the steady-state density (73) for the same choices of parameters.
For the same values of the parameters, in Table 3 for t = 1 , 5 , 10 , 15 , the conditional mean, variance, and coefficient of variation of Z ( t ) , evaluated via (61), are compared with the simulation sample mean y ¯ t , variance s t 2 and coefficient of variation c t , obtained making use of the same random sample of N = 10 6 observations of Y ( t ) of Figure 6.
Applying the Algorithm 2, we generate sample paths of the process Y ( t ) . For the considered case, from (12), by setting t 1 = 0 , Y ( t 1 ) = 0 , we have:
Y ( t k ) = Y ( t k 1 ) e α ( t k t k 1 ) + R ( t k 1 , t k ) + σ e α t k e 2 α t k 1 e 2 α t k 2 α ξ k ,
where ξ 1 , ξ 2 , , ξ n = i i d N ( 0 , 1 ) and
R ( t k 1 , t k ) = m ( t k ) m ( t k 1 ) e α ( t k t k 1 ) , 0 U k 1 < ϑ , 0 V k < ϑ , m ( t k ) + m ( t k 1 ) e α ( t k t k 1 ) , ϑ U k 1 < 1 , 0 V k < ϑ , m ( t k ) m ( t k 1 ) e α ( t k t k 1 ) , 0 U k 1 < ϑ , ϑ V k < 1 , m ( t k ) + m ( t k 1 ) e α ( t k t k 1 ) , ϑ U k 1 < 1 , ϑ V k < 1 ,
with m ( t ) given in (70).
In Figure 7, a sample path of Y ( t ) is plotted as function of t for ϑ = 0.1 and ϑ = 0.9 by using (75) with α = 0.2 , β = 1.5 and σ 2 = 2 .
When ϑ = 0 or ϑ = 1 , Y ( t ) identifies with a time-homogeneous Ornstein–Uhlenbeck process Z ( t ) . In particular, for ϑ = 0 , Z ( t ) has infinitesimal moments B 1 ( x ) = α x β and B 2 = σ 2 , whereas, when ϑ = 1 , one has B 1 ( x ) = α x + β and B 2 = σ 2 . We recall that, for the time-homogeneous Ornstein–Uhlenbeck process Z ˜ ( t ) with infinitesimal moments B ˜ 1 ( x ) = α x + β and B ˜ 2 = σ 2 , the FTP pdf through the constant boundary S = β / α is known in closed form:
g β α , t | y , 0 = 2 e α t | y + β / α | σ π α e 2 α t 1 3 / 2 exp α e 2 α t ( y + β / α ) 2 σ 2 ( e 2 α t 1 ) , y β / α .
In Figure 8, for ϑ = 1 , the histograms of FPT for Z ( t ) , with β = 1.5 , σ 2 = 2 , α = 0.1 on the left and α = 0.2 on the right, from Z ( 0 ) = 0 through the constant boundary S = 15 (on the left) and S = 7.5 (on the right) are plotted as a function of t by using a collection of N = 10 4 simulated first passage times obtained via Algorithm 3. The solid curves in Figure 8 refer to the closed expression of FPT densities for the Ornstein–Uhlenbeck process from Z ( 0 ) = 0 through S = β / α , given in (77).
Example 4.
Let Z ( t ) be the diffusion process having infinitesimal drift and infinitesimal variance given in (59) with
α ( t ) = α , σ 2 ( t ) = γ + 2 π ν Q sin 4 π t Q , β ( t ) = e α t σ 2 ( t ) , t 0 ,
where γ > 2 π | ν | / Q . Therefore, from (57), one has
φ ( t ) = α t , Λ ( t ) = Ω ( t ) = γ 1 e 2 α t 2 α ν π e 2 α t 4 π 2 + α 2 Q 2 2 π cos 4 π t Q + α Q sin 4 π t Q 2 π e 2 α t ,
so that, from (58), one has:
m ( t ) = h 1 ( t ) = e α t Ω ( t ) , h 2 ( t ) = e α t , t 0 .
From (63), one has
B 1 ( x , t ) = α x + e α t γ + 2 π ν Q sin 4 π t Q ϑ ( 1 ϑ ) exp { 2 x e α t } ϑ + ( 1 ϑ ) exp { 2 x e α t } , B 2 ( t ) = γ + 2 π ν Q sin 4 π t Q ,
with γ > 2 π | ν | / Q . The assumption (b) is satisfied with c = 1 . In this case, from (7), we obtain:
X i ( t ) = y e α ( t τ ) + ( 1 ) 3 i e α t Ω ( t ) Ω ( τ ) + e α t Ω ( t ) Ω ( τ ) ξ τ , t , t τ ,
where ξ τ , t N ( 0 , 1 ) . Then, (4) holds with
Q y , τ ( ϑ ) = ϑ ϑ + ( 1 ϑ ) exp 2 e α τ y , 0 ϑ 1 .
Being Z ( t ) = d Y ( t ) for all fixed t 0 , Algorithm 1 can be used to compare the transition pdf (64) of Z ( t ) with the histograms of the random sample of observations of Y ( t ) for different instants t. Specifically, in Figure 9, the histogram of a random sample of N = 10 6 observations of Y ( t ) is obtained for different times t, by choosing α ( t ) , β ( t ) and σ 2 ( t ) as in (78), with ( y , τ ) = ( 0 , 0 ) and ϑ = 0.1 , α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 . Note that Figure 9c,d are mirrored to Figure 9a,b, respectively.
For the same values of the parameters with ϑ = 0.1 , in Table 4, for t = 1 , 5 , 10 , 15 the conditional mean, variance, and coefficient of variation of Z ( t ) , evaluated via (65), are compared with the simulation sample mean y ¯ t , variance s t 2 and coefficient of variation c t , obtained making use of the same random sample of N = 10 6 observations of Y ( t ) of Figure 9.
Furthermore, for the diffusion process Z ( t ) having infinitesimal moments (81), the FPT pdf through the boundary
S ( t ) = e α t a 2 + a 1 γ 1 e 2 α t 2 α a 1 ν π e 2 α t 4 π 2 + α 2 Q 2 2 π cos 4 π t Q + α Q sin 4 π t Q 2 π e 2 α t ,
with a 1 , a 2 R and γ > 2 π | ν | / Q , is
g Z [ S ( t ) , t | y , τ ] = | S ( τ ) y | e α ( t + τ ) Ω ( t ) Ω ( τ ) γ + 2 π ν Q sin 4 π t Q f Z [ S ( t ) , t | y , τ ] , [ y < S ( τ ) ] or [ y > S ( τ ) ] ,
with Ω ( t ) defined in (79). The first passage of Z ( t ) through (84) is a certain event if and only if [ y < S ( τ ) , a 1 1 ] or [ y > S ( τ ) , a 1 1 ] .
We note that, when ϑ = 0 or ϑ = 1 , Y ( t ) identifies with a time-inhomogeneous Ornstein–Uhlenbeck process Z ( t ) . In particular, for ϑ = 0 , Z ( t ) has infinitesimal moments B 1 ( x , t ) = α x e α t B 2 ( t ) and B 2 ( t ) = γ + 2 π ν Q sin 4 π t Q , whereas, when ϑ = 1 , one has B 1 ( x , t ) = α x + e α t B 2 ( t ) and B 2 ( t ) = γ + 2 π ν Q sin 4 π t Q . For different values of ϑ, the histograms of FPT for the diffusion process Z ( t ) , having infinitesimal moments (81), with ( y , τ ) = ( 0 , 0 ) , α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 , a 1 = 1.2 , a 2 = 2 , are plotted as a function of t by using a collection of N = 10 4 simulated first passage times obtained via Algorithm 3. For the same choices of the parameters, the solid curves in Figure 10 show the FPT densities (85).

6. Conclusions

Starting from two Gauss–Markov processes conditioned on the same initial state, we have constructed a continuous process Y ( t ) via the composition method. We focused on a class of time-inhomogeneous diffusion processes Z ( t ) , whose transition pdf identifies with the density of Y ( t ) . We have applied the theoretical results and the proposed simulation algorithms to diffusion processes obtained by the composition of Wiener processes and Ornstein–Uhlenbeck processes. For fixed time instants, we have simulated the random variable describing Y ( t ) , and we have shown that the transition pdf of the diffusion process Z ( t ) can be superimposed over the histogram of the process Y ( t ) , obtained by using the simulation method. Finally, the histogram of first passage times is compared with the closed form FPT density through special boundaries.

Author Contributions

The authors have participated equally in the development of this work, either in the theoretical and computational aspects. Both authors have read and agreed to the published version of the manuscript.

Funding

This research is partially supported by MIUR-PRIN 2017, Project “Stochastic Models for Complex Systems” and by the Ministerio de Economía, Industria y Competitividad, Spain, under Grant MTM2017-85568-P.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Not applicable.

Acknowledgments

The authors are members of the research group GNCS of INdAM.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Buonocore, A.; Caputo, L.; Nobile, A.G.; Pirozzi, E. Gauss–Markov processes in the presence of a reflecting boundary and applications in neuronal models. Appl. Math. Comput. 2014, 232, 799–809. [Google Scholar] [CrossRef] [Green Version]
  2. Buonocore, A.; Caputo, L.; Nobile, A.G.; Pirozzi, E. Restricted Ornstein–Uhlenbeck process and applications in neuronal models with periodic input signals. J. Comput. Appl. Math. 2015, 285, 59–71. [Google Scholar] [CrossRef]
  3. Albano, G.; Giorno, V. Inference on the effect of non homogeneous inputs in Ornstein–Uhlenbeck neuronal modeling. Math. Biosci. Eng. 2019, 17, 328–348. [Google Scholar] [CrossRef]
  4. Giorno, V.; Spina, S. On the return process with refractoriness for non-homogeneous Ornstein–Uhlenbeck neuronal model. Math. Biosci. Eng. 2014, 11, 285–302. [Google Scholar] [CrossRef] [PubMed]
  5. Ricciardi, L.M.; Di Crescenzo, A.; Giorno, V.; Nobile, A.G. An outline of theoretical and algorithmic approaches to first passage time problems with applications to biological modeling. Math. Jpn. 1999, 50, 247–322. [Google Scholar]
  6. Renshaw, E. Stochastic Population Processes: Analysis, Approximations, Simulations; Oxford University Press: Oxford, UK, 2011; pp. 1–672. [Google Scholar]
  7. Di Crescenzo, A.; Giorno, V.; Krishna Kumar, B.; Nobile, A.G. A time-non-homogeneous double-ended queue with failures and repairs and its continuous approximation. Mathematics 2018, 66, 81. [Google Scholar] [CrossRef] [Green Version]
  8. Linetsky, V. On the transition densities for reflected diffusions. Adv. Appl. Probab. 2005, 37, 435–460. [Google Scholar] [CrossRef] [Green Version]
  9. Glasserman, P. Monte Carlo Methods in Financial Engineering, Stochastic Modelling and Applied Probability; Springer: New York, NY, USA, 2003; Volume 53, pp. 1–597. [Google Scholar]
  10. Di Crescenzo, A.; Giorno, V.; Nobile, A.G. Analysis of reflected diffusions via an exponential time-based transformation. J.Stat. Phys. 2016, 163, 1425–1453. [Google Scholar] [CrossRef]
  11. Giorno, V.; Nobile, A.G.; Ricciardi, L.M. A symmetry-based constructive approach to probability densities for one-dimensional, diffusion processes. J. Appl. Prob. 1989, 27, 707–721. [Google Scholar] [CrossRef]
  12. Giorno, V.; Nobile, A.G.; Ricciardi, L.M. On the construction of densities for time non-homogeneous diffusion processes. Lect. Notes Comput. Sci. 2012, 6927, 80–87. [Google Scholar]
  13. Abundo, M. On the first-passage times of certain Gaussian processes, and related asymptotics. Stoch. Anal. Appl. 2020. [Google Scholar] [CrossRef]
  14. Veestraeten, D. On transition and first hitting time densities and moments of the Ornstein–Uhlenbeck process. Stoch. Model. 2014, 30, 143–161. [Google Scholar] [CrossRef]
  15. Molini, A.; Talkner, P.; Katul, G.G.; Porporato, A. First passage time statistics of Brownian motion with purely time dependent drift and diffusion. Phys. A 2011, 390, 1841–1852. [Google Scholar] [CrossRef] [Green Version]
  16. Lim, S.C.; Muniandy, S.V. Self-similar Gaussian processes for modeling anomalous diffusion. Phys. Rev. E 2002, 66, 021114. [Google Scholar] [CrossRef]
  17. Jeon, J.-H.; Chechkin, A.V.; Metzler, R. Scaled Brownian motion: A paradoxical process with a time dependent diffusivity for the description of anomalous diffusion. Phys. Chem. Chem. Phys. 2014, 16, 15811–15817. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Di Nardo, E.; Nobile, A.G.; Pirozzi, E.; Ricciardi, L.M. A computational approach to first-passage-time problems for Gauss–Markov processes. Adv. Appl. Probab. 2001, 33, 453–482. [Google Scholar] [CrossRef]
  19. Taillefumier, T.; Magnasco, M. A fast algorithm for the first-passage times of Gauss–Markov processes with Hölder continuous boundaries. J. Stat. Phys. 2010, 140, 1130–1156. [Google Scholar] [CrossRef]
  20. D’Onofrio, G.; Pirozzi, E. Asymptotics of two-boundary first-exit-time densities for Gauss–Markov processes. Methodol. Comput. Appl. Probab. 2019, 21, 735–752. [Google Scholar] [CrossRef]
  21. Albano, G.; Giorno, V.; Román-Román, P.; Román-Román, S.; Serrano-Pérez, J.J.; Torres-Ruiz, F. Inference on an heteroscedastic Gompertz tumor growth model. Math. Biosci. 2020, 328, 108428. [Google Scholar] [CrossRef]
  22. Albano, G.; Giorno, V. Inferring time non-homogeneous Ornstein Uhlenbeck type stochastic process. Comp. Stat. Data Anal. 2020, 150, 107008. [Google Scholar] [CrossRef]
  23. Ramos-Ábalos, E.M.; Gutiérrez-Sánchez, R.; Nafidi, A. Powers of the Stochastic Gompertz and Lognormal diffusion processes, Statistical Inference and Simulation. Mathematics 2020, 8, 588. [Google Scholar] [CrossRef] [Green Version]
  24. Buonocore, A.; Nobile, A.G.; Pirozzi, E. Simulation of sample paths for Gauss–Markov processes in the presence of a reflecting boundary. Cogent Math. 2017, 4, 1–22. [Google Scholar] [CrossRef]
  25. Buonocore, A.; Nobile, A.G.; Pirozzi, E. Generating random variates from PDF of Gauss–Markov processes with a reflecting boundary. Comp. Stat. Data Anal. 2018, 118, 40–53. [Google Scholar] [CrossRef]
  26. Tuerlinckx, F.; Maris, E.; Ratcliff, R.; De Boeck, P. A comparison of four methods for simulating the diffusion process. Behav. Res. Methods Instruments Comput. 2001, 33, 443–456. [Google Scholar] [CrossRef] [PubMed]
  27. Di Crescenzo, A.; Di Nardo, E.; Ricciardi, L.M. Simulation of first-passage times for alternating Brownian motions. Methodol. Comput. Appl. Probab. 2005, 7, 161–181. [Google Scholar] [CrossRef] [Green Version]
  28. Giraudo, M.T.; Sacerdote, L.; Zucca, C. A Monte Carlo method for the simulation of first passage times of diffusion processes. Methodol. Comput. Appl. Probab. 2001, 3, 215–231. [Google Scholar] [CrossRef]
  29. Herrann, S.; Zucca, C. Exact simulation of first exit times for one-dimensional diffusion processes. ESAIM Math. Model. Numer. Anal. 2020, 54, 811–844. [Google Scholar] [CrossRef] [Green Version]
  30. Headrick, T.C.; Mugdadi, A. On simulating multivariate non-normal distributions from the generalized lambda distribution. Comp. Stat. Data Anal. 2006, 50, 3343–3353. [Google Scholar] [CrossRef]
  31. Devroye, L. Non-Uniform Random Variate Generation; Springer: New York, NY, USA, 1996; pp. 1–843. [Google Scholar]
  32. Iacus, S.M. Simulation and Inference for Stochastic Differential Equations with R Examples; Springer Series in Statistics; Springer: New York, NY, USA, 2008; Volume 1, pp. 1–284. [Google Scholar]
  33. Giorno, V.; Nobile, A.G. On the construction of a special class of time-inhomogeneous diffusion processes. J. Stat. Phys. 2019, 177, 299–323. [Google Scholar] [CrossRef]
  34. Mehr, C.B.; McFadden, J.A. Certain Properties of Gaussian Processes and their First-Passage Times. J. R. Statist. Soc. B 1965, 27, 505–522. [Google Scholar] [CrossRef]
  35. Ross, S.M. Simulation; Academic Press: Amsterdam, The Netherlands, 2013; pp. 1–328. [Google Scholar]
  36. Kroese, D.P.; Taimre, T.; Botev, Z.I. Handbook of Monte Carlo Methods; Wiley Series in Probability and Statistics; John Wiley & Sons: Hoboken, NJ, USA, 2011; pp. 1–743. [Google Scholar]
Figure 1. For the process Z ( t ) , having infinitesimal moments (32), with ϑ = 0.1 , β ( t ) = 1.5 + 0.2 π sin ( 4 π t ) and σ 2 ( t ) = 2 , the transition pdf (33) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Figure 1. For the process Z ( t ) , having infinitesimal moments (32), with ϑ = 0.1 , β ( t ) = 1.5 + 0.2 π sin ( 4 π t ) and σ 2 ( t ) = 2 , the transition pdf (33) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Mathematics 09 00818 g001
Figure 2. Simulated sample paths of the process Y ( t ) , obtained via (46) with R ( t k 1 , t k ) given in (47), with β ( t ) = 1.5 + 0.2 π sin ( 4 π t ) and σ 2 ( t ) = 2 .
Figure 2. Simulated sample paths of the process Y ( t ) , obtained via (46) with R ( t k 1 , t k ) given in (47), with β ( t ) = 1.5 + 0.2 π sin ( 4 π t ) and σ 2 ( t ) = 2 .
Mathematics 09 00818 g002
Figure 3. Histograms of FPT through the boundary S for the process Z ( t ) , given in (43), with ϑ = 1 , γ = 1.5 , ν = 0.1 , σ 2 = 2 , Q = 1 , are compared with the FPT densities (solid curve) of the Wiener process Z ˜ ( t ) with drift μ = 1.5 and infinitesimal variance σ 2 = 2 from Z ˜ ( 0 ) = 0 through S.
Figure 3. Histograms of FPT through the boundary S for the process Z ( t ) , given in (43), with ϑ = 1 , γ = 1.5 , ν = 0.1 , σ 2 = 2 , Q = 1 , are compared with the FPT densities (solid curve) of the Wiener process Z ˜ ( t ) with drift μ = 1.5 and infinitesimal variance σ 2 = 2 from Z ˜ ( 0 ) = 0 through S.
Mathematics 09 00818 g003
Figure 4. For the process Z ( t ) , having infinitesimal moments (51), with ( y , τ ) = ( 0 , 0 ) and ϑ = 0.4 , γ = 1.5 , ν = 0.1 , Q = 2 , the transition pdf (37) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Figure 4. For the process Z ( t ) , having infinitesimal moments (51), with ( y , τ ) = ( 0 , 0 ) and ϑ = 0.4 , γ = 1.5 , ν = 0.1 , Q = 2 , the transition pdf (37) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Mathematics 09 00818 g004
Figure 5. Histograms of FPT through the boundary S ( t ) = 2 1.8 t 0.12 sin 2 ( π t ) for the process Z ( t ) , given in (51), are compared with the FPT densities (solid curve), given in (55), for y = 0 , τ = 0 and γ = 1.5 , ν = 0.1 , Q = 2 .
Figure 5. Histograms of FPT through the boundary S ( t ) = 2 1.8 t 0.12 sin 2 ( π t ) for the process Z ( t ) , given in (51), are compared with the FPT densities (solid curve), given in (55), for y = 0 , τ = 0 and γ = 1.5 , ν = 0.1 , Q = 2 .
Mathematics 09 00818 g005
Figure 6. For the process Z ( t ) having infinitesimal moments (71), with ϑ = 0.1 , α = 0.2 , β = 1.5 , σ 2 = 2 , the transition pdf (72) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t. The dashed curves indicate the steady-state pdf given in (73).
Figure 6. For the process Z ( t ) having infinitesimal moments (71), with ϑ = 0.1 , α = 0.2 , β = 1.5 , σ 2 = 2 , the transition pdf (72) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t. The dashed curves indicate the steady-state pdf given in (73).
Mathematics 09 00818 g006
Figure 7. Simulated sample paths of the process Y ( t ) obtained via (75), where R ( t k 1 , t k ) is given in (76) with α = 0.2 , β = 1.5 and σ 2 = 2 .
Figure 7. Simulated sample paths of the process Y ( t ) obtained via (75), where R ( t k 1 , t k ) is given in (76) with α = 0.2 , β = 1.5 and σ 2 = 2 .
Mathematics 09 00818 g007
Figure 8. Histograms of FPT through the boundary S for the process Z ( t ) , given in (43), with ϑ = 1 , β = 1.5 , σ 2 = 2 , are compared with the FPT densities (solid curve) of the Ornstein–Uhlenbeck process from Z ( 0 ) = 0 through S = β / α .
Figure 8. Histograms of FPT through the boundary S for the process Z ( t ) , given in (43), with ϑ = 1 , β = 1.5 , σ 2 = 2 , are compared with the FPT densities (solid curve) of the Ornstein–Uhlenbeck process from Z ( 0 ) = 0 through S = β / α .
Mathematics 09 00818 g008
Figure 9. For the process Z ( t ) having infinitesimal moments (81), with ( y , τ ) = ( 0 , 0 ) and α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 , the transition pdf (64) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Figure 9. For the process Z ( t ) having infinitesimal moments (81), with ( y , τ ) = ( 0 , 0 ) and α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 , the transition pdf (64) as a function of x is superimposed over a histogram obtained via Algorithm 1 for different choices of t.
Mathematics 09 00818 g009
Figure 10. Histograms of FPT through the boundary (84) for Z ( t ) , having infinitesimal moments (81), are compared with the FPT densities (solid curve) in (85), with Ω ( t ) defined in (79), for ( y , τ ) = ( 0 , 0 ) , α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 , a 1 = 1.2 , a 2 = 2 .
Figure 10. Histograms of FPT through the boundary (84) for Z ( t ) , having infinitesimal moments (81), are compared with the FPT densities (solid curve) in (85), with Ω ( t ) defined in (79), for ( y , τ ) = ( 0 , 0 ) , α = 0.2 , γ = 1.5 , ν = 0.1 , Q = 2 , a 1 = 1.2 , a 2 = 2 .
Mathematics 09 00818 g010
Table 1. The conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t obtained by means of Algorithm 1 with the same choices of the parameters of Figure 1.
Table 1. The conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t obtained by means of Algorithm 1 with the same choices of the parameters of Figure 1.
t E [ Z ( t ) | Z ( 0 ) = 0 ] y ¯ t Var [ Z ( t ) | Z ( 0 ) = 0 ] s t 2 C [ Z ( t ) | Z ( 0 ) = 0 ] c t
1−1.200000−1.2010832.8100002.812711.3969211.396334
5−6.0000000−6.003379730.250000030.27058630.91666670.9164623
10−12.0000000−12.0057944101.0000000101.03503510.83748960.8372306
15−18.0000000−18.0080505212.2500000212.28094930.80937790.8090751
Table 2. For the same choices of the parameters of Figure 4, the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
Table 2. For the same choices of the parameters of Figure 4, the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
t E [ Z ( t ) | Z ( 0 ) = 0 ] y ¯ t Var [ Z ( t ) | Z ( 0 ) = 0 ] s t 2 C [ Z ( t ) | Z ( 0 ) = 0 ] c t
1−0.300000−0.29979343.6600003.66609006.3770426.3867430
5−1.500000−1.49720461.50000061.5764355.2281295.241146
10−3.000000−2.993572231.000000231.2319175.0662285.079654
15−4.500000−4.489803508.500000508.9476855.0110995.024690
Table 3. For the same choices of the parameters of Figure 6, the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
Table 3. For the same choices of the parameters of Figure 6, the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
t E [ Z ( t ) | Z ( 0 ) = 0 ] y ¯ t Var [ Z ( t ) | Z ( 0 ) = 0 ] s t 2 C [ Z ( t ) | Z ( 0 ) = 0 ] c t
1−1.087615−1.0885982.3137852.3160151.3985761.397987
5−3.7927234−3.794901512.414745712.42361200.92900440.9288026
10−5.1879883−5.190640320.048234520.05791860.86305620.8628236
15−5.7012776−5.704087123.271424723.28066250.84613430.8458854
Table 4. For the same choices of the parameters of Figure 9 with ϑ = 0.1 , the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
Table 4. For the same choices of the parameters of Figure 9 with ϑ = 0.1 , the conditional mean, variance, and coefficient of variation of Z ( t ) are compared with the estimated values y ¯ t , s t 2 and c t , obtained by means of Algorithm 1.
t E [ Z ( t ) | Z ( 0 ) = 0 ] y ¯ t Var [ Z ( t ) | Z ( 0 ) = 0 ] s t 2 C [ Z ( t ) | Z ( 0 ) = 0 ] c t
1−1.191974−1.1928942.0190842.0210581.1920941.191757
5−6.9575706−6.960511230.428814830.42846250.79283880.7924993
10−21.4721848−21.4793776262.9543652262.80090050.75523430.7547302
15−59.3090545−59.32718071982.32075161980.54250050.75069920.7501332
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Giorno, V.; Nobile, A.G. On the Simulation of a Special Class of Time-Inhomogeneous Diffusion Processes. Mathematics 2021, 9, 818. https://doi.org/10.3390/math9080818

AMA Style

Giorno V, Nobile AG. On the Simulation of a Special Class of Time-Inhomogeneous Diffusion Processes. Mathematics. 2021; 9(8):818. https://doi.org/10.3390/math9080818

Chicago/Turabian Style

Giorno, Virginia, and Amelia G. Nobile. 2021. "On the Simulation of a Special Class of Time-Inhomogeneous Diffusion Processes" Mathematics 9, no. 8: 818. https://doi.org/10.3390/math9080818

APA Style

Giorno, V., & Nobile, A. G. (2021). On the Simulation of a Special Class of Time-Inhomogeneous Diffusion Processes. Mathematics, 9(8), 818. https://doi.org/10.3390/math9080818

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop