10
Processi stocastici (4): dinamica microscopica Corso di Modelli di Computazione Aettiva Prof. Giuseppe Boccignone Dipartimento di Informatica Università di Milano [email protected] [email protected] http://boccignone.di.unimi.it/CompA2018.html Processi stocastici // Equazioni differenziali stocastiche Qual è la legge dinamica dietro un processo di Wiener o di Ornstein-Uhlenbeck?

Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici (4): dinamica microscopica

Corso di Modelli di Computazione Affettiva

Prof. Giuseppe Boccignone

Dipartimento di InformaticaUniversità di Milano

[email protected]@unimi.it

http://boccignone.di.unimi.it/CompAff2018.html

Processi stocastici // Equazioni differenziali stocastiche

• Qual è la legge dinamica dietro un processo di Wiener o di Ornstein-Uhlenbeck?

Page 2: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali

Chapter 2

Stochastic Differential Equations

A brief, heuristic introduction into stochastic integration and stochastic dif�ferential equations is given in this chapter, as well a derivation of stochastic Taylor expansions.

2.1 Stochastic Integration

A. Introduction

An ordinary differential equation

(1.1) . dx ( ) x = - = a t,x dt

may be thought of as a degenerate form of a stochastic differential equation in the absence of randomness. It is therefore useful to review some of its basic properties. We could write (1.1) in the symbolic differential form

(1.2) dx = a( t, x) dt,

or more accurately as an integral equation

(1.3) a:(t) = Xo + it a(s, x(s)) ds to

where x(t) = x(t; Xo, to) is a solution satisfying the initial condition :c(to) = Xo. Regularity assumptions, such as Lipschitz continuity, are usually made on a to ensure the existence of a unique solution x(t; Xo, to) for each initial condition. These solutions are then related by the evolutionary property

(1.4) x(t;X(),to) = x(t;x(s;xo,to),s)

for all to ::; s ::; t, which says that the future is determined completely by the present, with the past being involved only in that it determines the present. This is a deterministic version of the Markov property.

Following Einstein's explanation of observed Brownian motion during the first decade of this century, attempts were made by Langevin and others to formulate the dynamics of such motion in terms of differential equations. The resulting equations were written in the form as

(1.5)

Chapter 2

Stochastic Differential Equations

A brief, heuristic introduction into stochastic integration and stochastic dif�ferential equations is given in this chapter, as well a derivation of stochastic Taylor expansions.

2.1 Stochastic Integration

A. Introduction

An ordinary differential equation

(1.1) . dx ( ) x = - = a t,x dt

may be thought of as a degenerate form of a stochastic differential equation in the absence of randomness. It is therefore useful to review some of its basic properties. We could write (1.1) in the symbolic differential form

(1.2) dx = a( t, x) dt,

or more accurately as an integral equation

(1.3) a:(t) = Xo + it a(s, x(s)) ds to

where x(t) = x(t; Xo, to) is a solution satisfying the initial condition :c(to) = Xo. Regularity assumptions, such as Lipschitz continuity, are usually made on a to ensure the existence of a unique solution x(t; Xo, to) for each initial condition. These solutions are then related by the evolutionary property

(1.4) x(t;X(),to) = x(t;x(s;xo,to),s)

for all to ::; s ::; t, which says that the future is determined completely by the present, with the past being involved only in that it determines the present. This is a deterministic version of the Markov property.

Following Einstein's explanation of observed Brownian motion during the first decade of this century, attempts were made by Langevin and others to formulate the dynamics of such motion in terms of differential equations. The resulting equations were written in the form as

(1.5)

Chapter 2

Stochastic Differential Equations

A brief, heuristic introduction into stochastic integration and stochastic dif�ferential equations is given in this chapter, as well a derivation of stochastic Taylor expansions.

2.1 Stochastic Integration

A. Introduction

An ordinary differential equation

(1.1) . dx ( ) x = - = a t,x dt

may be thought of as a degenerate form of a stochastic differential equation in the absence of randomness. It is therefore useful to review some of its basic properties. We could write (1.1) in the symbolic differential form

(1.2) dx = a( t, x) dt,

or more accurately as an integral equation

(1.3) a:(t) = Xo + it a(s, x(s)) ds to

where x(t) = x(t; Xo, to) is a solution satisfying the initial condition :c(to) = Xo. Regularity assumptions, such as Lipschitz continuity, are usually made on a to ensure the existence of a unique solution x(t; Xo, to) for each initial condition. These solutions are then related by the evolutionary property

(1.4) x(t;X(),to) = x(t;x(s;xo,to),s)

for all to ::; s ::; t, which says that the future is determined completely by the present, with the past being involved only in that it determines the present. This is a deterministic version of the Markov property.

Following Einstein's explanation of observed Brownian motion during the first decade of this century, attempts were made by Langevin and others to formulate the dynamics of such motion in terms of differential equations. The resulting equations were written in the form as

(1.5)

Chapter 2

Stochastic Differential Equations

A brief, heuristic introduction into stochastic integration and stochastic dif�ferential equations is given in this chapter, as well a derivation of stochastic Taylor expansions.

2.1 Stochastic Integration

A. Introduction

An ordinary differential equation

(1.1) . dx ( ) x = - = a t,x dt

may be thought of as a degenerate form of a stochastic differential equation in the absence of randomness. It is therefore useful to review some of its basic properties. We could write (1.1) in the symbolic differential form

(1.2) dx = a( t, x) dt,

or more accurately as an integral equation

(1.3) a:(t) = Xo + it a(s, x(s)) ds to

where x(t) = x(t; Xo, to) is a solution satisfying the initial condition :c(to) = Xo. Regularity assumptions, such as Lipschitz continuity, are usually made on a to ensure the existence of a unique solution x(t; Xo, to) for each initial condition. These solutions are then related by the evolutionary property

(1.4) x(t;X(),to) = x(t;x(s;xo,to),s)

for all to ::; s ::; t, which says that the future is determined completely by the present, with the past being involved only in that it determines the present. This is a deterministic version of the Markov property.

Following Einstein's explanation of observed Brownian motion during the first decade of this century, attempts were made by Langevin and others to formulate the dynamics of such motion in terms of differential equations. The resulting equations were written in the form as

(1.5)

• Qual è la legge dinamica?

Processi stocastici // Equazioni differenziali

Table of content 33

Table 9 Dynamical systems and differential equationsA system that changes with time is called a dynamical system. A dynamical system

consists of a space of states and entails a law of motion between states, or a dynamical lawThe deterministic component of Langevin Eq. 45

dx(t)

dt= a(x(t), t) (46)

is one such law, the variable x(t) being the variable that, moment to moment, takes valuesin the state space of positions. Equation 46 is a differential equation describing the rate ofchange of state-space variable x.

In simple terms, a dynamical law is a rule that tells us the next state given the currentstate. This can be more readily appreciated if we recall the definition of derivative givenin Table 1, but avoid to apply the shrinking operation (lim∆t→0), i.e. we approximate thederivative as a discrete difference dx(t)

dt ≈ x(t+∆t)−x(t)∆t . By assuming for simplicity a

unit time step, i.e., ∆t = 1 and substituting in Eq. 46

next state!!!!!"#!!!!$x(t + 1) =

current state!"#$x(t) +a(x(t), t) (47)

Eq. 47 is the discrete-time version of the differential equation 46, namely a finite-differenceequation. The model in discrete time emphasises the predictive properties of the law: in-deed, with the scientific method we seek to make predictions about phenomena that aresubject to change. Caveat: we should always be cautious about how predictable the worldis, even in classical physics. Certainly, predicting the future requires a perfect knowledgeof the dynamical laws governing the world but at the same time entails the ability to knowthe initial conditions with almost perfect precision. However, perfect predictability is notachievable, simply because we are limited in our resolving power. There are cases in whichthe tiniest differences in the initial conditions (the starting state), leads to large eventualdifferences in outcomes. This phenomenon is called chaos.

The law formalised in Eqs. 46 or 47 are deterministic. In stark contrast, the Langevinequation (45) “corrupts” the deterministic law of motion with the “noise” introduced by theRV ξ(t), thus the eventual outcome is not deterministic but stochastic (though it may bepredictable in probability). Langevin equation is but one example of stochastic differentialequation (SDE).

large scale limit. This corresponds to the macroscopic level of description. Thereare two possible macroscopic limits from mesoscopic equations: the macroscopiclimit in time or in space. When we consider the macroscopic limit in time of theC-K equation, we obtain the Master equation; when we consider the macroscopiclimit both in time and in the state space of the C-K equation, we obtain the Fokker-Planck (F-P) equation.

The Fokker-Planck equation for diffusive (Markovian) processes is the following:

∂P(x, t)∂t

= − ∂∂x

[a(x, t)P(x, t)] +1

2

∂2

∂x2[b(x, t)2P(x, t)] (49)

Table of content 33

Table 9 Dynamical systems and differential equationsA system that changes with time is called a dynamical system. A dynamical system

consists of a space of states and entails a law of motion between states, or a dynamical lawThe deterministic component of Langevin Eq. 45

dx(t)

dt= a(x(t), t) (46)

is one such law, the variable x(t) being the variable that, moment to moment, takes valuesin the state space of positions. Equation 46 is a differential equation describing the rate ofchange of state-space variable x.

In simple terms, a dynamical law is a rule that tells us the next state given the currentstate. This can be more readily appreciated if we recall the definition of derivative givenin Table 1, but avoid to apply the shrinking operation (lim∆t→0), i.e. we approximate thederivative as a discrete difference dx(t)

dt ≈ x(t+∆t)−x(t)∆t . By assuming for simplicity a

unit time step, i.e., ∆t = 1 and substituting in Eq. 46

next state!!!!!"#!!!!$x(t + 1) =

current state!"#$x(t) +a(x(t), t) (47)

Eq. 47 is the discrete-time version of the differential equation 46, namely a finite-differenceequation. The model in discrete time emphasises the predictive properties of the law: in-deed, with the scientific method we seek to make predictions about phenomena that aresubject to change. Caveat: we should always be cautious about how predictable the worldis, even in classical physics. Certainly, predicting the future requires a perfect knowledgeof the dynamical laws governing the world but at the same time entails the ability to knowthe initial conditions with almost perfect precision. However, perfect predictability is notachievable, simply because we are limited in our resolving power. There are cases in whichthe tiniest differences in the initial conditions (the starting state), leads to large eventualdifferences in outcomes. This phenomenon is called chaos.

The law formalised in Eqs. 46 or 47 are deterministic. In stark contrast, the Langevinequation (45) “corrupts” the deterministic law of motion with the “noise” introduced by theRV ξ(t), thus the eventual outcome is not deterministic but stochastic (though it may bepredictable in probability). Langevin equation is but one example of stochastic differentialequation (SDE).

large scale limit. This corresponds to the macroscopic level of description. Thereare two possible macroscopic limits from mesoscopic equations: the macroscopiclimit in time or in space. When we consider the macroscopic limit in time of theC-K equation, we obtain the Master equation; when we consider the macroscopiclimit both in time and in the state space of the C-K equation, we obtain the Fokker-Planck (F-P) equation.

The Fokker-Planck equation for diffusive (Markovian) processes is the following:

∂P(x, t)∂t

= − ∂∂x

[a(x, t)P(x, t)] +1

2

∂2

∂x2[b(x, t)2P(x, t)] (49)

Table of content 33

Table 9 Dynamical systems and differential equationsA system that changes with time is called a dynamical system. A dynamical system

consists of a space of states and entails a law of motion between states, or a dynamical lawThe deterministic component of Langevin Eq. 45

dx(t)

dt= a(x(t), t) (46)

is one such law, the variable x(t) being the variable that, moment to moment, takes valuesin the state space of positions. Equation 46 is a differential equation describing the rate ofchange of state-space variable x.

In simple terms, a dynamical law is a rule that tells us the next state given the currentstate. This can be more readily appreciated if we recall the definition of derivative givenin Table 1, but avoid to apply the shrinking operation (lim∆t→0), i.e. we approximate thederivative as a discrete difference dx(t)

dt ≈ x(t+∆t)−x(t)∆t . By assuming for simplicity a

unit time step, i.e., ∆t = 1 and substituting in Eq. 46

next state!!!!!"#!!!!$x(t + 1) =

current state!"#$x(t) +a(x(t), t) (47)

Eq. 47 is the discrete-time version of the differential equation 46, namely a finite-differenceequation. The model in discrete time emphasises the predictive properties of the law: in-deed, with the scientific method we seek to make predictions about phenomena that aresubject to change. Caveat: we should always be cautious about how predictable the worldis, even in classical physics. Certainly, predicting the future requires a perfect knowledgeof the dynamical laws governing the world but at the same time entails the ability to knowthe initial conditions with almost perfect precision. However, perfect predictability is notachievable, simply because we are limited in our resolving power. There are cases in whichthe tiniest differences in the initial conditions (the starting state), leads to large eventualdifferences in outcomes. This phenomenon is called chaos.

The law formalised in Eqs. 46 or 47 are deterministic. In stark contrast, the Langevinequation (45) “corrupts” the deterministic law of motion with the “noise” introduced by theRV ξ(t), thus the eventual outcome is not deterministic but stochastic (though it may bepredictable in probability). Langevin equation is but one example of stochastic differentialequation (SDE).

large scale limit. This corresponds to the macroscopic level of description. Thereare two possible macroscopic limits from mesoscopic equations: the macroscopiclimit in time or in space. When we consider the macroscopic limit in time of theC-K equation, we obtain the Master equation; when we consider the macroscopiclimit both in time and in the state space of the C-K equation, we obtain the Fokker-Planck (F-P) equation.

The Fokker-Planck equation for diffusive (Markovian) processes is the following:

∂P(x, t)∂t

= − ∂∂x

[a(x, t)P(x, t)] +1

2

∂2

∂x2[b(x, t)2P(x, t)] (49)

• Qual è la legge dinamica?

Page 3: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

32 Table of content

5.3 Levels of representation of the dynamics of a stochastic process

If we carefully inspect scan paths such as those shown in Figures 1 and 12 it isintuitive to recognise the signature of some kind of random walk. In this perspectiveit makes sense to re-formulate the fundamental question raised for simple Bm as“What is the probability P(x, t) of gazing at location x at time t?”

There are three different levels to represent and deal with the properties ofstochastic processes, and in particular RWs: microscopic, mesoscopic and macro-scopic.

The C-K equation discussed so far can be regarded as a mesoscopic balanceequation for the transition probabilities defining the evolution of the random variableX(t).

The microscopic description of a system consists in modeling the system withevolution equations or differential equations, see Table 9, that directly describe thefine-grained dynamics, that is individual trajectories: e.g., the path of a Brownianparticle or the scan path of an eye-tracked observer. A simple form of such equationsis the following:

state-space rate of change!"#$dxdt

=

deterministic comp.!"#$a(x, t) +

stochastic comp.!!!!!!!"#!!!!!!$b(x, t)ξ(t) , (45)

which we call the Langevin equation, in analogy with the well known equationthat in statistical physics describes the time evolution of the velocity of a Brownianparticle. In Eq. 45 the drift term a(x, t) represents the deterministic component ofthe process; the diffusive component b(x, t)ξ(t) is the stochastic component, ξ(t)being the “noise” sampled from some probability density, i.e. ξ(t) ∼ P(ξ) usually azero-mean Normal distribution.

Equation (45) is a stochastic differential equation (SDE), which in a more for-mal way can be written in the Ito form of Eq.52 as detailed in Table 10

Concretely, the construction of a trajectory (a solution) can be performed by re-fining the intuitive discretisation approach presented in Table 9. Eq. 45 is discretisedas in Eq. 54 by executing a sequence of drift and diffusion steps as illustrated in Fig-ure 20.

In continuous time a 2-dimensional random motion of a point, with stochasticposition r(t), under the influence of an external force field can be described by theLangevin stochastic equation [91]

dx(t) = A(x, t)dt + B(x, t)ξdt. (48)

As in the one-dimensional case, the trajectory of x is determined by a deterministicpart A, the drift, and a stochastic part B(x, t)ξdt, where ξ is a random vector and Bis a diffusion factor.

However, to gain a more general picture of the process, we might be interestedin the coarse-grained dynamics: namely, how the pdf of the system evolves in the

• Qual è la legge dinamica dietro un processo di Wiener o di Ornstein-Uhlenbeck?

Processi stocastici // Equazioni differenziali stocastiche

A Stochastic Differential Equation (SDE) is an object of thefollowing type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

A Stochastic Differential Equation (SDE) is an object of thefollowing type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

Esempio: eq. di Langevin

2.2. STOCHASTIC DIFFERENTIAL EQUATIONS 69

2.2 Stochastic Differential Equations

A. Linear Stochastic Equations

The Ito stochastic integral provides us with the necessary means for formulating

stochastic differential equations. Such equations describe the dynamics of many

important continuous time stochastic systems. Let us consider a simple linear

case which models the molecular bombardment of a speck of dust on a water

surface responsible for Brownian motion. The intensity of this bombardment

does not depend on the state variables, for instance the position and velocity of

the speck. Taking X t as one of the components of the velocity of the particle,

Langevin wrote the equation

(2.1) dXt - = dt

(see (1.5)) for the acceleration of the particle, that is, as the sum of a retarding

frictional force depending on the velocity and the molecular forces represented

by a white noise process with the intensity b independent of the velocity of

the particle. Here a and b are positive constants. We now interpret the Langevin equation (2.1) symbolically as an Ito stochastic differential (equation)

(2.2) dXt = -aXt dt + bdWt ,

that is, as a stochastic integral equation

(2.3)

where the second integral is an Ito stochastic integral. This process is also

called Ornstein- Uhlenbeck process. Later we shall see that it does not matter

in this case whether we choose the Ito or Stratonovich integral as both yield

the same process here. We say that equation (2.3) has additive noise since the

noise term does not depend on the state variable; it is also a linear equation.

It can be shown that equation (2.3) has the explicit solution

(2.4)

for 0 :::; t :::; T.

With external fluctuations the intensity of the noise usually depends on

the state of the system. For example, the growth coefficient in an exponential

growth equation :i: = ax may fluctuate on account of environmental effects,

taking the form a = a + where a and b are positive constants and is a

white noise process. This results in the heuristically written equation

(2.5)

2.2. STOCHASTIC DIFFERENTIAL EQUATIONS 69

2.2 Stochastic Differential Equations

A. Linear Stochastic Equations

The Ito stochastic integral provides us with the necessary means for formulating

stochastic differential equations. Such equations describe the dynamics of many

important continuous time stochastic systems. Let us consider a simple linear

case which models the molecular bombardment of a speck of dust on a water

surface responsible for Brownian motion. The intensity of this bombardment

does not depend on the state variables, for instance the position and velocity of

the speck. Taking X t as one of the components of the velocity of the particle,

Langevin wrote the equation

(2.1) dXt - = dt

(see (1.5)) for the acceleration of the particle, that is, as the sum of a retarding

frictional force depending on the velocity and the molecular forces represented

by a white noise process with the intensity b independent of the velocity of

the particle. Here a and b are positive constants. We now interpret the Langevin equation (2.1) symbolically as an Ito stochastic differential (equation)

(2.2) dXt = -aXt dt + bdWt ,

that is, as a stochastic integral equation

(2.3)

where the second integral is an Ito stochastic integral. This process is also

called Ornstein- Uhlenbeck process. Later we shall see that it does not matter

in this case whether we choose the Ito or Stratonovich integral as both yield

the same process here. We say that equation (2.3) has additive noise since the

noise term does not depend on the state variable; it is also a linear equation.

It can be shown that equation (2.3) has the explicit solution

(2.4)

for 0 :::; t :::; T.

With external fluctuations the intensity of the noise usually depends on

the state of the system. For example, the growth coefficient in an exponential

growth equation :i: = ax may fluctuate on account of environmental effects,

taking the form a = a + where a and b are positive constants and is a

white noise process. This results in the heuristically written equation

(2.5)

2.2. STOCHASTIC DIFFERENTIAL EQUATIONS 69

2.2 Stochastic Differential Equations

A. Linear Stochastic Equations

The Ito stochastic integral provides us with the necessary means for formulating

stochastic differential equations. Such equations describe the dynamics of many

important continuous time stochastic systems. Let us consider a simple linear

case which models the molecular bombardment of a speck of dust on a water

surface responsible for Brownian motion. The intensity of this bombardment

does not depend on the state variables, for instance the position and velocity of

the speck. Taking X t as one of the components of the velocity of the particle,

Langevin wrote the equation

(2.1) dXt - = dt

(see (1.5)) for the acceleration of the particle, that is, as the sum of a retarding

frictional force depending on the velocity and the molecular forces represented

by a white noise process with the intensity b independent of the velocity of

the particle. Here a and b are positive constants. We now interpret the Langevin equation (2.1) symbolically as an Ito stochastic differential (equation)

(2.2) dXt = -aXt dt + bdWt ,

that is, as a stochastic integral equation

(2.3)

where the second integral is an Ito stochastic integral. This process is also

called Ornstein- Uhlenbeck process. Later we shall see that it does not matter

in this case whether we choose the Ito or Stratonovich integral as both yield

the same process here. We say that equation (2.3) has additive noise since the

noise term does not depend on the state variable; it is also a linear equation.

It can be shown that equation (2.3) has the explicit solution

(2.4)

for 0 :::; t :::; T.

With external fluctuations the intensity of the noise usually depends on

the state of the system. For example, the growth coefficient in an exponential

growth equation :i: = ax may fluctuate on account of environmental effects,

taking the form a = a + where a and b are positive constants and is a

white noise process. This results in the heuristically written equation

(2.5)

2.2. STOCHASTIC DIFFERENTIAL EQUATIONS 69

2.2 Stochastic Differential Equations

A. Linear Stochastic Equations

The Ito stochastic integral provides us with the necessary means for formulating

stochastic differential equations. Such equations describe the dynamics of many

important continuous time stochastic systems. Let us consider a simple linear

case which models the molecular bombardment of a speck of dust on a water

surface responsible for Brownian motion. The intensity of this bombardment

does not depend on the state variables, for instance the position and velocity of

the speck. Taking X t as one of the components of the velocity of the particle,

Langevin wrote the equation

(2.1) dXt - = dt

(see (1.5)) for the acceleration of the particle, that is, as the sum of a retarding

frictional force depending on the velocity and the molecular forces represented

by a white noise process with the intensity b independent of the velocity of

the particle. Here a and b are positive constants. We now interpret the Langevin equation (2.1) symbolically as an Ito stochastic differential (equation)

(2.2) dXt = -aXt dt + bdWt ,

that is, as a stochastic integral equation

(2.3)

where the second integral is an Ito stochastic integral. This process is also

called Ornstein- Uhlenbeck process. Later we shall see that it does not matter

in this case whether we choose the Ito or Stratonovich integral as both yield

the same process here. We say that equation (2.3) has additive noise since the

noise term does not depend on the state variable; it is also a linear equation.

It can be shown that equation (2.3) has the explicit solution

(2.4)

for 0 :::; t :::; T.

With external fluctuations the intensity of the noise usually depends on

the state of the system. For example, the growth coefficient in an exponential

growth equation :i: = ax may fluctuate on account of environmental effects,

taking the form a = a + where a and b are positive constants and is a

white noise process. This results in the heuristically written equation

(2.5)

• Qual è la legge dinamica dietro un processo di Wiener o di Ornstein-Uhlenbeck?

Page 4: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

A Stochastic Differential Equation (SDE) is an object of thefollowing type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

A Stochastic Differential Equation (SDE) is an object of thefollowing type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

Euler-Maruyama scheme

dXt = a(t,Xt)dt + b(t,Xt)dWt.

The simplest numerical method for solving of SDEs is thestochastic Euler scheme (also called Euler-Maruyamascheme).For the above stochastic differential equation the scheme hasthe form

Xn+1 = Xn + a(tn, Xn)δt + b(tn, Xn)∆Wn,

where∆Wn = Wtn+1

− Wtn.

Computational Finance – p. 7

Euler-Maruyama scheme

dXt = a(t,Xt)dt + b(t,Xt)dWt.

The simplest numerical method for solving of SDEs is thestochastic Euler scheme (also called Euler-Maruyamascheme).For the above stochastic differential equation the scheme hasthe form

Xn+1 = Xn + a(tn, Xn)δt + b(tn, Xn)∆Wn,

where∆Wn = Wtn+1

− Wtn.

Computational Finance – p. 7

In order to obtain this scheme the following approximation isused

! tn+1

tn

b(s,Xs)dWs ≈ b(tn, Xn)∆Wn,

! tn+1

tn

a(s,Xs)ds ≈ a(tn, Xn)δt.

Computational Finance – p. 8

In order to obtain this scheme the following approximation isused

! tn+1

tn

b(s,Xs)dWs ≈ b(tn, Xn)∆Wn,

! tn+1

tn

a(s,Xs)ds ≈ a(tn, Xn)δt.

Computational Finance – p. 8

Brownian motion

For computational purposes it is useful to consider discretizedBrownian motion. We thus divide a time interval [0, T ] into Nsubintervals by setting δt = T/N and

tn = n · δt = nT

N, n = 0, . . . , N.

Further, due to properties of Brownian motion we can simulateits values at the selected points by

Wtn+1= Wtn

+ ∆Wn, Wt0 = W0 = 0,

where ∆Wn are independent random variables withdistribution N (0, δt).

Computational Finance – p. 4

Convergence of schemes for SDEsWhen writing algorithms we use the following notation:

tn = n · δt,Xn is the computed value at tn.

To study convergence of numerical schemes we have tointroduce a new notation:

Xδtt denotes a process that results from connecting of the

points obtained by a numerical scheme with straight lines,i.e.

Xδtt = Xn +

t − tntn+1 − tn

(Xn+1 − Xn), if t ∈ [tn, tn+1).

δt is the step size used in the algorithm.Xt is the exact solution.

Computational Finance – p. 12

34 Table of content

Fig. 19 The Cauchy-Eulerprocedure for constructing anapproximate solution of theLangevin SDE in the Ito form(cfr. Table 10

The symbols ∂∂t , ∂

∂x and ∂2

∂x2 = ∂∂x (

∂∂x ) denote partial derivatives of first and

second-order, respectively.4Equation (49) is a partial differential equation (PDE) defining the “law of mo-

tion” of the density P(x, t) in probability space.There is a precise link between the microscopic description provided by the

Langevin equation and the macroscopic description addressed by the F-P equation,which is established via a(x, t) and b(x, t). The term a(x, t) represents a drift whichis related to the average deviation of the process

a(x, t) = lim∆t→0

⟨∆x⟩∆t. (50)

over a small time interval ∆t. The term b2(x, t) represents a diffusion term, whichis related to the mean square deviation of the process:

b2(x, t) = lim∆t→0

⟨(∆x)2⟩∆t

. (51)

At the macroscopic level, by knowing the evolution of P(x, t) in time, one canobtain statistical ‘observables” as the moments, correlations, etc. These obviouslylack some microscopic details from the underlying stochastic process, which forsome specific purposes may be important.

We will turn now to the fundamental example of the Wiener process to make clearthe connections between the macroscopic and microscopic levels of description.

4 If we have a function of more than one variable, e.g., f (x, y, z, · · ·), we can calculate the deriva-tive with respect to one of those variables, with the others kept fixed. Thus, if we want to compute∂ f (x,y,z, · · ·)

∂x , we define the increment ∆ f = f ([x +∆x] , y, z, · · ·) − f (x, y, z, · · ·) and weconstruct the partial derivative as in the simple derivative case as ∂ f (x,y,z, · · ·)

∂x = lim∆x→0∆ f∆x .

By the same method we can obtain the partial derivative with respect to any of the other variables.

• Discretizzazione di Euler-Maruyama (EM)

Processi stocastici // Equazioni differenziali stocastiche A Stochastic Differential Equation (SDE) is an object of the

following type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

36 Table of content

Fig. 20 One dimensional Brownian motion. Top: the random walk process; bottom: the autocor-relation of the process. (cfr. Table 6)

By using Eq. (54) (cfr Table 10), the discretized version of the Wiener process(57) over a small but finite time interval ∆t = T/N , N being the discrete number ofintegration steps can be written as

xi+1 = xi +√2D∆Wi = xi +

!2D∆tiξi (58)

with ξ sampled from a zero-mean Gaussian distribution of unit varianceN (0,1)Equation 58 shows that the system describes a refined version of the simple ad-

ditive random walk. Once again, it is worth noting that the structure in Eq. (58) isdifferent from a traditional i.i.d process: since ξ(t) are sampled i.i.d, it is the thedifferences in sequential observations that are i.i.d, namely, xi+1 −xi = ∆xi , ratherthan the observations themselves. In fact, if we compute the auto-correlation func-tion of the {x(t)} time series, it exhibits a slower decay —differently from the whitenoise process—, which shows how this simple random walk exhibits memory (Fig.20.

Now, assume to simulate the Brownian motion of a large number of particles, say105. We can obtain this result by running in parallel 105 random walks each walkbeing obtained by iterating Eq.(58). Figure 21 (top) shows an example of 20suchtrajectories. In probabilistic terms each trajectory is then realisation, a sample of thestochastic process {X(t)}.

We may be interested in gaining some statistical insight of the collective be-haviour of all such random walkers. This can be obtained by considering the thedynamics of the pdf P(x, t) describing the probability of finding a particle at posi-tion x at time t. Empirically, we can estimate P(x, t) at any time t by computing thedensity of particles occurring within a certain bin (x − δx, x + δx), that is by com-

= 0

discretizzazione EM

Page 5: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

MICROSCOPIC LEVEL

x(t)

t

x(t)

t

x

Brownian motiontracciamento di una particella

tracciamento di più particelle

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

Processi stocastici // Equazioni differenziali stocastiche A Stochastic Differential Equation (SDE) is an object of the

following type

dXt = a(t,Xt)dt + b(t,Xt)dWt, X0 = x.

A solution is a stochastic process X(t), satisfying

Xt = X0 +

! t

0a(s,Xs)ds +

! t

0b(s,Xs)dWs.

Today we will study algorithms that can be used to solveSDEs.

SDE’s play a prominent role in a range of applications,including biology, chemistry, epidemiology, mechanics,microelectronics and, of course, finance.

Computational Finance – p. 2

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

Table of content 35

Table 10 Ito Stochastic Differential Equation: DefinitionThe Langevin equation written in the form (45) poses some formal problems. Since

ξ(t) is noise it consists of a set of points that in some cases can be even uncorrelated. Inconsequence ξ(t) is often non-differentiabl. Thus x(t) should be non-differentiable too,so that the left hand side of (45) is incoherent from this point of view. To overcome thisproblem, the 1− D Langevin equation is more formally presented in the mathematicallysound form:

dx(t) = a(x(t), t)dt + b(x(t), t)ξ(t)dt = a(x(t), t)dt + b(x(t), t)dW (t) (52)

with W (t) =! t

0ξ(t ′)dt ′ , so that the integration of the stochastic component!

b(x, t)dW (t) can be performed according to the rules of stochastic calculus (in the Itôor Stratonovich approach []). Throughout this chapter we shall use with a certain liberalityboth forms (45) and (52) at our convenience. Thus, a stochastic quantity x(t) obeys an ItoSDE written as in (52), if for all t and t0 ,

x(t) = x(t0) +

" t

t0

a(x(t ′ ), t ′)dt ′ +" t

t0

b(x(t ′), t ′)dW (t ′) (53)

A discretised version of the SDE can be obtained by taking a mesh of points ti (Fig.??)

t0 < t1 < t2 < · · · < tn−1 < tn = t

and writing the equation as

xi+1 = xi + a(xi , ti )∆ti + b(xi, ti )∆Wi (54)

Here, xi = x(ti ) and∆ti = ti+1 − ti, (55)

∆Wi = W (ti+1) −W (ti ) ∝#∆tiξi . (56)

The approximate procedure for solving the equation is to calculate xi+1 from theknowledge of xi by adding a deterministic term a(xi , ti )∆ti and a stochastic termb(xi, ti )∆Wi , which contains the element ∆Wi , namely the increment of the Wiener pro-cess. The solution is then formally constructed by letting the mesh size go to zero. Themethod of constructing a solution outlined above is called the Cauchy-Euler method, andcan be used to generate simulations. By construction the time development of x(t) fort > t0 is independent of x(t) for t > t0 provided x(t0) is known. Hence, x(t) is aMarkov process.

5.3.1 Example: the Wiener process

Recall again the most famous Markov process: the Wiener process describing Brow-nian motion (cfr., Box 8). The SDE defining the motion of a particle undergoing (1-D) Brownian motion can be obtained by setting to zero the drift component a(x, t)and letting b(x, t) =

√2D, where D is the diffusion coefficient; thus:

dx =√2DdW(t) (57)

36 Table of content

Fig. 20 One dimensional Brownian motion. Top: the random walk process; bottom: the autocor-relation of the process. (cfr. Table 6)

By using Eq. (54) (cfr Table 10), the discretized version of the Wiener process(57) over a small but finite time interval ∆t = T/N , N being the discrete number ofintegration steps can be written as

xi+1 = xi +√2D∆Wi = xi +

!2D∆tiξi (58)

with ξ sampled from a zero-mean Gaussian distribution of unit varianceN (0,1)Equation 58 shows that the system describes a refined version of the simple ad-

ditive random walk. Once again, it is worth noting that the structure in Eq. (58) isdifferent from a traditional i.i.d process: since ξ(t) are sampled i.i.d, it is the thedifferences in sequential observations that are i.i.d, namely, xi+1 −xi = ∆xi , ratherthan the observations themselves. In fact, if we compute the auto-correlation func-tion of the {x(t)} time series, it exhibits a slower decay —differently from the whitenoise process—, which shows how this simple random walk exhibits memory (Fig.20.

Now, assume to simulate the Brownian motion of a large number of particles, say105. We can obtain this result by running in parallel 105 random walks each walkbeing obtained by iterating Eq.(58). Figure 21 (top) shows an example of 20suchtrajectories. In probabilistic terms each trajectory is then realisation, a sample of thestochastic process {X(t)}.

We may be interested in gaining some statistical insight of the collective be-haviour of all such random walkers. This can be obtained by considering the thedynamics of the pdf P(x, t) describing the probability of finding a particle at posi-tion x at time t. Empirically, we can estimate P(x, t) at any time t by computing thedensity of particles occurring within a certain bin (x − δx, x + δx), that is by com-

Table of content 37

Fig. 21 Top: The simulation of individual trajectories of 105 random walkers: only 20 are shownfor visualisation purposes. Bottom: The distributions (histograms) of the walkers, after T = 100,T = 500 and T = 1000 time steps. The distribution initially concentrated at a point takes laterthe Gaussian form, whose width grows in time as t122 . This kind of diffusion is called the normaldiffusion.

puting the histogram h(x, t) and normalising it with respect to the total number ofparticles. This procedure is shown in the bottom of Figure 21: the empirical pdf hasa nice bell shape, i.e. it is a Normal distribution, which spreads as time increases.

This insight can be given a formal justification by resorting to the macroscopiclevel of description of process dynamics as provided by F-P equation (49). By set-ting again a(x, t) = 0 and b(x, t) =

√2D:

∂P(x, t)∂t

= D∂2P(x, t)∂x2

(59)

This is the well-known heat or diffusion equation. Thus, the pdf P(x, t) of findinga particle at position x at time t evolves in time according to the diffusion equa-tion when the underlying microscopic dynamics is such that the particle positioncorresponds to a Wiener process.

The solution to the heat equation (59) is the time-dependent Gaussian pdf:

P(x, t) =1√4πDt

exp

!− x2

4Dt

", (60)

By comparing to the pdf in Eq. (60) introduced in our preliminary definition of theWiener process, we can set the following correspondences:

σ2 = 2Dt = b2t ≈ ⟨x2⟩ (61)

38 Table of content

Fig. 22 The LATER model [17]. Left: the original model. Right: LATER as an ideal Bayesiandecision-maker

In other terms for Bm, the second moment of the walk and thus the spread of theGaussian grows linearly with time, as it can be intuitively appreciated from Figure21.

More precisely, define the Mean Square Displacement (MSD) of a walk thatstarts at position x0 at time t0:

MSD = ⟨|x − x0 |2⟩ (62)

that is the square of the displacement in the direction of the x-axis “that a particleexperiences on the average” [30], where x0 denotes the initial position. In the caseof Brownian motion (Bm), Einstein [30] was the first to show that:

MSD = 2Dt (63)

Note that ⟨|x − x0 |2⟩ = ⟨x2⟩ + x20 − 2x0⟨x⟩, thus when the initial position is atx0 = 0, MSD = ⟨x2⟩ ∝ t.

Equation 65 is sometimes written more generally in terms of the Hurst exponentH

MSD = kt2H (64)

with H = 12 for Bm. This is useful for characterising different kinds of diffusions

(like hyperdiffusion or subdiffusion)

5.3.2 Case study: from random walks to saccade latency

A saccade represents the output of a decision, a choice of where to look, and re-action time, or latency, can be regarded as an experimental “window” into decisionprocesses. In experimental paradigms, reaction time varies between one trial and thenext, despite standardized experimental conditions. Furthermore, distribution of re-action times is typically skewed, with a tail towards long reaction times. However, ifwe take the reciprocal of the latencies and plot these in a similar fashion, the result-ing distribution appears Gaussian. A Gaussian or normal distribution of reciprocal

38 Table of content

Fig. 22 The LATER model [17]. Left: the original model. Right: LATER as an ideal Bayesiandecision-maker

In other terms for Bm, the second moment of the walk and thus the spread of theGaussian grows linearly with time, as it can be intuitively appreciated from Figure21.

More precisely, define the Mean Square Displacement (MSD) of a walk thatstarts at position x0 at time t0:

MSD = ⟨|x − x0 |2⟩ (62)

that is the square of the displacement in the direction of the x-axis “that a particleexperiences on the average” [30], where x0 denotes the initial position. In the caseof Brownian motion (Bm), Einstein [30] was the first to show that:

MSD = 2Dt (63)

Note that ⟨|x − x0 |2⟩ = ⟨x2⟩ + x20 − 2x0⟨x⟩, thus when the initial position is atx0 = 0, MSD = ⟨x2⟩ ∝ t.

Equation 65 is sometimes written more generally in terms of the Hurst exponentH

MSD = kt2H (64)

with H = 12 for Bm. This is useful for characterising different kinds of diffusions

(like hyperdiffusion or subdiffusion)

5.3.2 Case study: from random walks to saccade latency

A saccade represents the output of a decision, a choice of where to look, and re-action time, or latency, can be regarded as an experimental “window” into decisionprocesses. In experimental paradigms, reaction time varies between one trial and thenext, despite standardized experimental conditions. Furthermore, distribution of re-action times is typically skewed, with a tail towards long reaction times. However, ifwe take the reciprocal of the latencies and plot these in a similar fashion, the result-ing distribution appears Gaussian. A Gaussian or normal distribution of reciprocal

38 Table of content

Fig. 22 The LATER model [17]. Left: the original model. Right: LATER as an ideal Bayesiandecision-maker

In other terms for Bm, the second moment of the walk and thus the spread of theGaussian grows linearly with time, as it can be intuitively appreciated from Figure21.

More precisely, define the Mean Square Displacement (MSD) of a walk thatstarts at position x0 at time t0:

MSD = ⟨|x − x0 |2⟩ (62)

that is the square of the displacement in the direction of the x-axis “that a particleexperiences on the average” [30], where x0 denotes the initial position. In the caseof Brownian motion (Bm), Einstein [30] was the first to show that:

MSD = 2Dt (63)

Note that ⟨|x − x0 |2⟩ = ⟨x2⟩ + x20 − 2x0⟨x⟩, thus when the initial position is atx0 = 0, MSD = ⟨x2⟩ ∝ t.

Equation 65 is sometimes written more generally in terms of the Hurst exponentH

MSD = kt2H (64)

with H = 12 for Bm. This is useful for characterising different kinds of diffusions

(like hyperdiffusion or subdiffusion)

5.3.2 Case study: from random walks to saccade latency

A saccade represents the output of a decision, a choice of where to look, and re-action time, or latency, can be regarded as an experimental “window” into decisionprocesses. In experimental paradigms, reaction time varies between one trial and thenext, despite standardized experimental conditions. Furthermore, distribution of re-action times is typically skewed, with a tail towards long reaction times. However, ifwe take the reciprocal of the latencies and plot these in a similar fashion, the result-ing distribution appears Gaussian. A Gaussian or normal distribution of reciprocal

= 0

Page 6: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

Feelings Change: Accounting for Individual Differences in the TemporalDynamics of Affect

Peter KuppensUniversity of Leuven and University of Melbourne

Zita Oravecz and Francis TuerlinckxUniversity of Leuven

People display a remarkable variability in the patterns and trajectories with which their feelings changeover time. In this article, we present a theoretical account for the dynamics of affect (DynAffect) thatidentifies the major processes underlying individual differences in the temporal dynamics of affectiveexperiences. It is hypothesized that individuals are characterized by an affective home base, a baselineattractor state around which affect fluctuates. These fluctuations vary as the result of internal or externalprocesses to which an individual is more or less sensitive and are regulated and tied back to the homebase by the attractor strength. Individual differences in these 3 processes—affective home base,variability, and attractor strength—are proposed to underlie individual differences in affect dynamics.The DynAffect account is empirically evaluated by means of a diffusion modeling approach in 2extensive experience-sampling studies on people’s core affective experiences. The findings show that themodel is capable of adequately capturing the observed dynamics in core affect across both large (Study1) and shorter time scales (Study 2) and illuminate how the key processes are related to personality andemotion dispositions. Implications for the understanding of affect dynamics and affective dysfunctioningin psychopathology are also discussed.

Keywords: emotion, affect, dynamics, individual differences, attractor

A fundamental characteristic of emotions and affective experi-ences is that they change over time. Human lives are characterizedby affective ups and downs, changes and fluctuations following theebb and flow of daily life. In fact, the very reason why people haveaffective experiences in the first place is thought to lie in theirdynamical nature. Affective changes inform people about impor-tant events that present a threat or opportunity to their well-beingand allow them to respond to these changes with appropriateactions (Frijda, 2007; Larsen, 2000; Scherer, 2009). In short,people’s affective lives only have meaning because they change.

Despite its central role, understanding the nature and processesunderlying the temporal dynamics of affect and emotion remainsone of the most important challenges in the study of emotion(Davidson, 2003; Lewis, 2005; Scherer, 2000b). One central in-sight that is emerging from research addressing this challenge isthat how people’s emotions and affective experiences changeacross time can be very different from one person to the next

(Kuppens, Stouten, & Mesquita, 2009). As noted by Davidson(1998), one of the most striking features of human emotions isindeed the broad variability across individuals in the patterns ofchanges that characterize their emotions. In the present article, weoffer a theoretical account for understanding individual differencesin the patterns and regularities characterizing affect dynamics. Build-ing on central insights that have emerged from research on affectdynamics, we propose a theoretical model (labeled DynAffect) thatidentifies the basic processes underlying the changes and fluctua-tions in everyday affective experiences and that ties individualdifferences in these processes to more general personality andemotion dispositions.

Individual Differences in the Dynamics of AffectThe study of affect or emotion dynamics entails investigating

the patterns and underlying processes that describe people’s fluc-tuations and changes in emotion and its components across time.Until recently, most emotion research has focused on emotion oraffect as a state and on identifying its antecedents and conse-quences (Kuppens et al., 2009; Scherer, 2000b). Yet emotion andaffect are inherently dynamic in nature. Emotional and affectiveexperiences are seen as the tools by which important internal andexternal changes are monitored and brought into consciousness(Carver & Sheier, 1990; Scherer, 2009). Affective experiencesmay even become salient to consciousness only when they aresubject to change, alerting people of any event that is important totheir well-being (Russell, 2003). More and more research hastherefore started to examine the patterns and regularities that drivethe dynamics of affect. One direction has sought to identify theimportant ways people differ from each other in terms of affectdynamics, and several lines of findings are converging on whatseem to be major sources of such differences.

Peter Kuppens, Department of Psychology, University of Leuven, Leuven,Belgium, and Department of Psychological Sciences, University of Mel-bourne, Melbourne, Victoria, Australia; Zita Oravecz and Francis Tuerlinckx,Department of Psychology, University of Leuven, Leuven, Belgium.

Peter Kuppens is a postdoctoral research fellow with the Fund forScientific Research—Flanders (FWO). This research was supported byKULeuven Research Council Grant GOA/05/04. We are grateful toAndrew Gelman, Yoshi Kashima, Peter Koval, Stephen Loughnan, BatjaMesquita, Joachim Vandekerckhove, and Iven Van Mechelen for theirhelpful comments on the research reported in this article.

Correspondence concerning this article should be addressed to PeterKuppens, Department of Psychology, University of Leuven, Tiensestraat102, 3000 Leuven, Belgium. E-mail: [email protected]

Journal of Personality and Social Psychology © 2010 American Psychological Association2010, Vol. ●●, No. ●, 000–000 0022-3514/10/$12.00 DOI: 10.1037/a0020962

1

Processi stocastici // Equazioni differenziali stocastiche

background, see, e.g., Guastello & Liebovitch, 2009; Hoeksma,Oosterlaan, Schipper, & Koot, 2007; Strogatz, 1994; Vallacher &Nowak, 2009; Vallacher et al., 2002) and can be considered toreflect the affective comfort zone of an individual, signaling thateverything is normal. Yet the open affect system is embedded in alarger context and is therefore subject to stochastic variabilityresulting from the many internal and external events that influencecore affect. Such influences produce small or larger shifts infeeling and indicate that events are impinging on the person’s coreaffect. The function of such changes to the system is to alert andmotivate the person to respond to or cope with the events that arecausing these changes (Frijda, 1986; Nesse & Ellsworth, 2009;Russell, 2003; Scherer, 2009). However, the attractor keeps thesystem in balance by pulling core affect back to its home base,creating an emergent coherence around the attractor. The attractorstrength reflects the regulatory processes that are installed to keepa person’s core affect in check. We hypothesize that relativelyenduring individual differences in these three key processes—affective home base, variability, and attractor strength—are largelyresponsible for producing the myriad ways people can displaychanges and fluctuations in their core affect throughout daily life.Figure 2 gives a graphical depiction of the three DynAffect pro-cesses, which we now explain in more detail.

The DynAffect account starts with the idea that people arecharacterized by an affective home base, a particular combinationof valence and arousal values that reflects the typical affectivestate of the individual. The idea of an affective home base drawson theories that assume the existence of an affective set point orattractor state around which changes fluctuate (e.g., Carver &Sheier, 1990; Headey & Wearing, 1989; Hoeksma et al., 2007;Larsen, 2000). The basic idea is that people’s affective changesrevolve around a central focal point that serves as the affectsystem’s baseline level, reflecting the default level of operation.1

Theoretically, the function of an attractor home base lies in actingas a reference point to which changes are compared, producingvital knowledge about the relation between the individual and hisor her environment. Indeed, movements away from the baselinelevel signal deviations from a person’s affective comfort zone,often therefore entering consciousness and causing changes insubjectively experienced affect (Russell, 2003). According tosome, the default affective state of an organism is characterized byslight positive valence and arousal levels, motivating the organismto approach novel stimuli and environments and enabling it tolearn and explore (e.g., Cacioppo & Gardner, 1999). Yet bothgenetic (e.g., Lykken & Tellegen, 1996) and environmental (e.g.,Diener & Diener, 1996; Lucas, 2007) factors contribute to thecreation of sizeable individual differences in affective baselinelevels (Kuppens, Tuerlinckx, Russell, & Barrett, 2010). In otherwords, a person’s affective home base can be more or less pleasantand more or less active on average. It is the existence of theseindividual differences in affective home base that is observed inresearch on stable individual differences in average affect.

Second, DynAffect posits a stochastic process that reflects thechanges and fluctuations that people’s pleasure and arousal levelsundergo across time and that accounts for the observed individualdifferences in core affect variability. Core affect is continuouslyinfluenced by external and internal events, lending it its dynamic

1 By proposing the affective home base as a relatively enduring set point,we do not imply that individual differences in average affect levels cannotchange. As has become clear, how one feels on average can change overthe course of one’s life as a function of, for instance, major life events (e.g.,Lucas, 2007), as well as through effortful interventions and practice(Lyubomirsky, Sheldon, & Schkade, 2005).

Figure 1. Core affect trajectories of two hypothetical individuals.

Figure 2. Graphical representation of the DynAffect processes that driveaffective change: (a) affective home base, (b) affective variability, and (c)attractor strength.

3AFFECT DYNAMICS

Page 7: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

background, see, e.g., Guastello & Liebovitch, 2009; Hoeksma,Oosterlaan, Schipper, & Koot, 2007; Strogatz, 1994; Vallacher &Nowak, 2009; Vallacher et al., 2002) and can be considered toreflect the affective comfort zone of an individual, signaling thateverything is normal. Yet the open affect system is embedded in alarger context and is therefore subject to stochastic variabilityresulting from the many internal and external events that influencecore affect. Such influences produce small or larger shifts infeeling and indicate that events are impinging on the person’s coreaffect. The function of such changes to the system is to alert andmotivate the person to respond to or cope with the events that arecausing these changes (Frijda, 1986; Nesse & Ellsworth, 2009;Russell, 2003; Scherer, 2009). However, the attractor keeps thesystem in balance by pulling core affect back to its home base,creating an emergent coherence around the attractor. The attractorstrength reflects the regulatory processes that are installed to keepa person’s core affect in check. We hypothesize that relativelyenduring individual differences in these three key processes—affective home base, variability, and attractor strength—are largelyresponsible for producing the myriad ways people can displaychanges and fluctuations in their core affect throughout daily life.Figure 2 gives a graphical depiction of the three DynAffect pro-cesses, which we now explain in more detail.

The DynAffect account starts with the idea that people arecharacterized by an affective home base, a particular combinationof valence and arousal values that reflects the typical affectivestate of the individual. The idea of an affective home base drawson theories that assume the existence of an affective set point orattractor state around which changes fluctuate (e.g., Carver &Sheier, 1990; Headey & Wearing, 1989; Hoeksma et al., 2007;Larsen, 2000). The basic idea is that people’s affective changesrevolve around a central focal point that serves as the affectsystem’s baseline level, reflecting the default level of operation.1

Theoretically, the function of an attractor home base lies in actingas a reference point to which changes are compared, producingvital knowledge about the relation between the individual and hisor her environment. Indeed, movements away from the baselinelevel signal deviations from a person’s affective comfort zone,often therefore entering consciousness and causing changes insubjectively experienced affect (Russell, 2003). According tosome, the default affective state of an organism is characterized byslight positive valence and arousal levels, motivating the organismto approach novel stimuli and environments and enabling it tolearn and explore (e.g., Cacioppo & Gardner, 1999). Yet bothgenetic (e.g., Lykken & Tellegen, 1996) and environmental (e.g.,Diener & Diener, 1996; Lucas, 2007) factors contribute to thecreation of sizeable individual differences in affective baselinelevels (Kuppens, Tuerlinckx, Russell, & Barrett, 2010). In otherwords, a person’s affective home base can be more or less pleasantand more or less active on average. It is the existence of theseindividual differences in affective home base that is observed inresearch on stable individual differences in average affect.

Second, DynAffect posits a stochastic process that reflects thechanges and fluctuations that people’s pleasure and arousal levelsundergo across time and that accounts for the observed individualdifferences in core affect variability. Core affect is continuouslyinfluenced by external and internal events, lending it its dynamic

1 By proposing the affective home base as a relatively enduring set point,we do not imply that individual differences in average affect levels cannotchange. As has become clear, how one feels on average can change overthe course of one’s life as a function of, for instance, major life events (e.g.,Lucas, 2007), as well as through effortful interventions and practice(Lyubomirsky, Sheldon, & Schkade, 2005).

Figure 1. Core affect trajectories of two hypothetical individuals.

Figure 2. Graphical representation of the DynAffect processes that driveaffective change: (a) affective home base, (b) affective variability, and (c)attractor strength.

3AFFECT DYNAMICS

Processi stocastici // Equazioni differenziali stocastiche

Appendix B

Solution of the Stochastic Differential Equation for Two-Dimensional Ornstein–Uhlenbeck Process

Based on the extensive treatment of the unidimensional case, thetwo-dimensional process will not appear entirely novel. As estab-lished before, !(t) represents the position in a two-dimensionalspace at time t. The stochastic differential equation describing thechange in the vector !(t) is then as follows:

d!!t" ! B!" " !!t""dt # #dW!t". (B1)

The vector " now stands for the home base in a two-dimensionalspace. The adjustment to " is no longer determined by a singlescalar # but the matrix B. The dW(t) represents the alreadyintroduced white noise in two dimensions. The matrix # controlsthe variances and covariances of the two driving white noiseprocesses. The instantaneous covariance matrix $ can be derivedfrom # as follows: $ $ ##T.

The solution of the two-dimensional stochastic differentialequation in Equation B1 is very similar to the unidimensionalsolution (assuming we condition on !(t % d)):

!!t" ! " # e% Bd!!!t " d" " "" # #e% Bd!t% d

t

eBu dW!u ",

where d denotes the time difference and e% X is the matrix expo-nential defined as

e% X ! I " X #X2

2!"

X3

3!#

X4

4!"

X5

5!# · · ·.

We follow the reparameterization that was already introduced inthe case of a unidimensional process. Instead of using theCholesky decomposition of the instantaneous covariance matrix(i.e., #), we prefer the parameterization based on the stationarycovariance matrix % (see Gardiner, 2004):

$ ! ##T ! B% # %BT,

where & is the instantaneous covariance matrix and # its Choleskydecomposition. Then the conditional distribution of !(t) given!(t % d) equals

!!t""!!t " d" # N2!" # e% Bd!!!t " d" " "", % " e% Bd%e% BTd",

where N2 refers to the bivariate normal distribution. Also in thistwo-dimensional case, the process converges to a stationary dis-tribution:

x!!t" # N2!", %".

Received November 7, 2008Revision received September 29, 2010

Accepted February 26, 2011 !

490 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

Appendix B

Solution of the Stochastic Differential Equation for Two-Dimensional Ornstein–Uhlenbeck Process

Based on the extensive treatment of the unidimensional case, thetwo-dimensional process will not appear entirely novel. As estab-lished before, !(t) represents the position in a two-dimensionalspace at time t. The stochastic differential equation describing thechange in the vector !(t) is then as follows:

d!!t" ! B!" " !!t""dt # #dW!t". (B1)

The vector " now stands for the home base in a two-dimensionalspace. The adjustment to " is no longer determined by a singlescalar # but the matrix B. The dW(t) represents the alreadyintroduced white noise in two dimensions. The matrix # controlsthe variances and covariances of the two driving white noiseprocesses. The instantaneous covariance matrix $ can be derivedfrom # as follows: $ $ ##T.

The solution of the two-dimensional stochastic differentialequation in Equation B1 is very similar to the unidimensionalsolution (assuming we condition on !(t % d)):

!!t" ! " # e% Bd!!!t " d" " "" # #e% Bd!t% d

t

eBu dW!u ",

where d denotes the time difference and e% X is the matrix expo-nential defined as

e% X ! I " X #X2

2!"

X3

3!#

X4

4!"

X5

5!# · · ·.

We follow the reparameterization that was already introduced inthe case of a unidimensional process. Instead of using theCholesky decomposition of the instantaneous covariance matrix(i.e., #), we prefer the parameterization based on the stationarycovariance matrix % (see Gardiner, 2004):

$ ! ##T ! B% # %BT,

where & is the instantaneous covariance matrix and # its Choleskydecomposition. Then the conditional distribution of !(t) given!(t % d) equals

!!t""!!t " d" # N2!" # e% Bd!!!t " d" " "", % " e% Bd%e% BTd",

where N2 refers to the bivariate normal distribution. Also in thistwo-dimensional case, the process converges to a stationary dis-tribution:

x!!t" # N2!", %".

Received November 7, 2008Revision received September 29, 2010

Accepted February 26, 2011 !

490 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

Appendix B

Solution of the Stochastic Differential Equation for Two-Dimensional Ornstein–Uhlenbeck Process

Based on the extensive treatment of the unidimensional case, thetwo-dimensional process will not appear entirely novel. As estab-lished before, !(t) represents the position in a two-dimensionalspace at time t. The stochastic differential equation describing thechange in the vector !(t) is then as follows:

d!!t" ! B!" " !!t""dt # #dW!t". (B1)

The vector " now stands for the home base in a two-dimensionalspace. The adjustment to " is no longer determined by a singlescalar # but the matrix B. The dW(t) represents the alreadyintroduced white noise in two dimensions. The matrix # controlsthe variances and covariances of the two driving white noiseprocesses. The instantaneous covariance matrix $ can be derivedfrom # as follows: $ $ ##T.

The solution of the two-dimensional stochastic differentialequation in Equation B1 is very similar to the unidimensionalsolution (assuming we condition on !(t % d)):

!!t" ! " # e% Bd!!!t " d" " "" # #e% Bd!t% d

t

eBu dW!u ",

where d denotes the time difference and e% X is the matrix expo-nential defined as

e% X ! I " X #X2

2!"

X3

3!#

X4

4!"

X5

5!# · · ·.

We follow the reparameterization that was already introduced inthe case of a unidimensional process. Instead of using theCholesky decomposition of the instantaneous covariance matrix(i.e., #), we prefer the parameterization based on the stationarycovariance matrix % (see Gardiner, 2004):

$ ! ##T ! B% # %BT,

where & is the instantaneous covariance matrix and # its Choleskydecomposition. Then the conditional distribution of !(t) given!(t % d) equals

!!t""!!t " d" # N2!" # e% Bd!!!t " d" " "", % " e% Bd%e% BTd",

where N2 refers to the bivariate normal distribution. Also in thistwo-dimensional case, the process converges to a stationary dis-tribution:

x!!t" # N2!", %".

Received November 7, 2008Revision received September 29, 2010

Accepted February 26, 2011 !

490 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

The structure of the remainder of the article is as follows: In thenext section, the basic OU model for a single individual is intro-duced first. It is followed by a hierarchical extension allowing forthe inclusion of individual differences. Then we describe brieflyhow statistical inference can be carried out for this model within aBayesian framework. Following that, the HOU model will beapplied to data from a diary study. After a discussion of model fit,the Conclusion section ends the article.

Modeling the Affect Dynamics of a Single Individual:The OU Model With Measurement Error

In this section, we describe the OU process with measurementerror as a model for the measured state of a single person. Let usstart with some notation. The true or latent position in a two-dimensional latent space at time t will be denoted by the vector!(t) defined as !(t) ! "1(t), "2(t)T, and the superscript T indi-cates the transpose operation. In the core affect application, "1(t)refers to the position on the first dimension (pleasantness) and"2(t) to the position on the second dimension (arousal). We willdefine the model for two dimensions here and we refer specificallyto core affect, but generalizations to more dimensions and otherapplication areas are possible. In the model formulation, it isassumed that the true core affect changes continuously throughouttime, but the measurements are taken at a finite number of timepoints: t1, t2, . . . , ts, . . . tn, where n stands for the number ofmeasurements (Time 0 can be defined arbitrarily by, for instance,setting it equal to the first time point: t1 ! 0). We define the vectorY(ts) ! (Y1(ts), Y2(ts))

T as the observed pleasantness and arousalscores at time point ts. The general model can then be written asfollows:

! d!#t$ ! B#" " !#t$$dt # #dW#t$Y#ts$ ! !#ts$ # $#ts$

, (1)

where " is a vector with two components and # and B arepositive-definite 2 % 2 matrices. The measurement error is repre-sented by $(ts), which is a random draw from a bivariate normaldistribution with mean (0,0)T and covariance matrix %$. Thecomponent W(t) stands for the standard bivariate Wiener process.The interpretation of these parameters is elaborated below.

At this point, it is important to note that the model in Equation1 consists of two parts. The first equation describes the change inthe true core affect position and is therefore a transition equation;it represents the dynamical aspect of the model. The secondequation maps the true process onto the observed variable and iscalled the observation equation.

In the remainder of the section, we explain, step by step, themodel in Equation 1, by first defining the one-dimensional versionof the transition equation. Accordingly, we will introduce theproperties of the full, two-dimensional form. In the end, the role ofthe observation equation is clarified.

A Unidimensional SDE

Let us take the transition equation of Equation 1, transform itinto an equation for a unidimensional variable "(t) (e.g., we canconsider either the pleasantness or the activation dimension at

once, but we cannot see how they influence each other). The resultis a linear first-order SDE that describes the dynamics of the OUstochastic process in one dimension:

d"#t$ ! &#' " "#t$$dt # (dW#t$, (2)

where we assume that & ) 0.3 The right hand side of Equation 2can be divided into two parts: The first part of the sum is deter-ministic, and the second one is stochastic. Considering only thedeterministic part, it can be deduced that the instantaneous changein "(t), that is, d"(t), depends on how far the current state "(t) isfrom the point '. If "(t) is below ' (i.e., ' * "(t) ) 0), the firstderivative is positive, and consequently "(t) will increase. Theopposite holds when " is above '. Hence, "(t) will always changein the direction of ' and never the other way. Because the processsettles itself at ', this parameter is called a steady state or attractor.However, we will use the term home base to refer to ', as in thecontext of emotions, one may think of ' as an ideal point to whichone is drawn. The parameter & controls the magnitude of the“drawing” effect: If & is large (& )) 1), the difference between theactual state and ' tends to be magnified; therefore a faster changewill occur in the direction of '. With small &s (i.e., & close tozero), the change becomes substantially slower. Based on thisproperty, the parameter & is often called the dampening force orcentralizing tendency. If we considered only this deterministic partas a model for the core affect dynamics, we would encounter amajor disadvantage: The model assumes a gentle but certain returnto the attractor or home base, and then the process remains there.This appears unrealistic, because over the course of time, manyeffects will lead to a divergence between the home base and theactual state, as has been pointed out in the introduction. Thereforea realistic model should incorporate an element of randomness,like the second, stochastic part of the right side of Equation 2. Inthis, parameter W(t) stands for a unidimensional Wiener process orBrownian motion.4 However, it is not the Brownian motion assuch that is added but rather the quantity (dW(t), where ( is thescale of the stochastic term. The random variable dW(t) can beinterpreted loosely as the change in a standard Brownian motion

3 Note that we put all SDEs in the differential form. This differs from theprime notation often encountered with deterministic differential equations.However, when the stochastic term is added, not all derivatives are definedin the traditional way (see, e.g., Jazwinski, 1970), and therefore we preferto keep the differential form.

4 In 1828 the English botanist Robert Brown observed that when partof a pollen of grain is suspended in water, it exhibits an irregular“animated” motion, and the phenomenon was named after him. Therandom Brownian motion was explained by Einstein (1905) by suppos-ing that the movements are the result of frequent impacts on the particleby the molecules of the water. Because these impacts are incessant,complicated, and highly numerous, the resulting movement path of theparticle requires a probabilistic description; a deterministic one is notfeasible. Norbert Wiener (1923) provided a rigorous mathematicalformalization of the Brownian motion, and therefore the Brownianmotion is often called the Wiener process.

470 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

Page 8: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

Intraindividual variation: Fluctuations around the homebase. The positive-definite matrix ! is the covariance matrix ofthe stationary distribution. To simplify the notation of the separateelements in !, the matrix is decomposed as follows:

! ! !!1 "!"!1!2

"!"!1!2 !2#. (7)

The parameters !1 and !2 correspond to the variance in the firstand second dimensions, respectively. The parameter "! is thecross-correlation, and it quantifies the strength of the linear depen-dency between the two dimensions in the stationary distribution. If"! is close to 1, then positive (negative) displacements on onedimension go together with positive (negative) displacements onthe other dimension.

In Figure 3, two realized OU processes with different ! matricesare shown. In Figure 3A, low variance values were used for thesimulation, yielding small changes, and therefore the process tendsto stay near the home base. In contrast, because of the largervariances used for Figure 3B, the simulated process covers a widerarea (i.e., higher volatility and thus more dramatic changes). More-over, in Figure 3A, the cross-correlation is set to 0, whereas inFigure 3B it is equal to 0.5. As can be seen, increasing thecorrelation leads to displacements that coincide as the shape of thetrajectory clearly suggests. (Again, the other parameters were keptfixed across the two simulations.)

Regulation: The centralizing tendency. The matrix B is thematrix equivalent of the scalar # in the unidimensional process,and as such it governs the strength and the direction with which the

process is pulled back to the home base ". As stated before, it isrequired that B be a positive-definite matrix such that there isalways an adjustment toward the home base (and hence the processis stable). If B were not positive definite, the process wouldbecome “explosive,” meaning that it would be pushed away fromthe home base. The HOU model cannot capture such a phenom-enon, and constantly being pushed away from the ideal point doesnot seem to be very realistic to model affective dynamics.6 Besidespositive definite, we will also require that B be symmetric, and wedecompose it in a similar way as was shown for !:

B ! ! #1 "#"#1#2

"#"#1#2 #2#. (8)

The symmetry constraint is specific to our model formulation.One consequence is that the effects of the first process on thesecond and vice versa are equal. The reason why we made thissimplifying assumption is that in a later modeling stage, we allowfor individual differences in the elements of B. Without thisassumption, it is extremely difficult to satisfy a basic condition inthe model, namely that Bp !p $ !p Bp

T has to be positive definite,because this sum represents the instantaneous covariance matrix,as shown in Appendix B (see also Dunn & Gipson, 1977). For thisreason we sacrificed the additional level of complexity in the basic

6 Another possibility could be that B % 0, and in that case the resultingprocess is simply the Wiener process or Brownian motion. Then we wouldassume only random fluctuations in affect, which also seems unlikely.

Figure 1. Solution curves for Equation 3.

472 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

Processi stocastici // Equazioni differenziali stocastiche

increased physiological arousal (Gross, 1998; Gross & Levenson,1997). Primarily, valence instability was related to negative emo-tionality and low well-being, whereas arousal variability was lessrelated to such indicators of maladjustment. Both were related toself-esteem variability, however, once again illustrating that howone thinks about oneself and how one feels go hand in hand(Nezlek & Plesko, 2001). Going beyond previous research, theresults showed that habitual reappraisal is associated with a stron-ger attractor strength for arousal. In contrast, people who tend toruminate are characterized by a decreased attractor strength forarousal. These results show that individual differences in attractorstrength are related to the use of emotion regulation strategies andmoreover suggest that these strategies may primarily impact thearousal property of affect.

Study 2

Both longer lasting affective fluctuations (Larsen, 2000; Mur-ray, Allen, & Trinder, 2002) and shorter lived emotional episodes(Koole, 2009) are characterized by chronic tendencies and tempo-ral variability, as well as being subject to regulatory efforts. Ourexpectation is that the DynAffect principles of affective homebase, variability, and attractor strength may therefore apply to bothchanges observed across hours and days and changes and fluctu-ations observed across minutes, even though it is likely that someof the underlying processes may not be of the same nature. The

main purpose of this second study was therefore to replicate theapplicability of the DynAffect model for affect dynamics on amuch shorter time scale compared to Study 1 and to examinecorresponding trait correlates. An experience-sampling study wasset up in which participants’ core affect was assessed 5 times morefrequently than in Study 1, yielding information on core affectapproximately every 17 min on average (compared to approxi-mately every 84 min in Study 1).

Method

Participants. 60 university students from the University ofLeuven in Belgium (40 female, mean age ! 23 years) wererecruited through the university job service center and paid 50€ forparticipation (approximately $65 U.S.).

Materials.Repeated assessment of core affect. Core affect reports at

each sampling moment were again recorded using a modifiedversion of the Affect Grid identical to the one used in Study 1.Given the burden on participants caused by the intense samplingscheme, momentary self-esteem was not assessed.

Dispositional questionnaires. The same questionnaires as inStudy 1 were used to assess dispositional neuroticism and extra-version (Hoekstra et al., 1996), positive and negative affect(Watson et al., 1988), self-esteem (Rosenberg, 1989), satisfactionwith life (Diener et al., 1985), reappraisal and suppression (Gross

Figure 3. Observed core affect trajectories of 10 participants with two corresponding replicated trajectoriesbased on data simulated under a DynAffect diffusion model implemented with the participants’ estimatedaffective home base, variability, and attractor strength parameters (Study 1).

9AFFECT DYNAMICS

Page 9: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

Processi stocastici // Equazioni differenziali stocastiche

Processi stocastici // Equazioni differenziali stocastiche

Page 10: Processi stocastici (4): dinamica microscopicaboccignone.di.unimi.it/CompAff2019_files/LezMCA-Processi stocasti… · Stochastic Differential Equations A brief, heuristic introduction

The structure of the remainder of the article is as follows: In thenext section, the basic OU model for a single individual is intro-duced first. It is followed by a hierarchical extension allowing forthe inclusion of individual differences. Then we describe brieflyhow statistical inference can be carried out for this model within aBayesian framework. Following that, the HOU model will beapplied to data from a diary study. After a discussion of model fit,the Conclusion section ends the article.

Modeling the Affect Dynamics of a Single Individual:The OU Model With Measurement Error

In this section, we describe the OU process with measurementerror as a model for the measured state of a single person. Let usstart with some notation. The true or latent position in a two-dimensional latent space at time t will be denoted by the vector!(t) defined as !(t) ! "1(t), "2(t)T, and the superscript T indi-cates the transpose operation. In the core affect application, "1(t)refers to the position on the first dimension (pleasantness) and"2(t) to the position on the second dimension (arousal). We willdefine the model for two dimensions here and we refer specificallyto core affect, but generalizations to more dimensions and otherapplication areas are possible. In the model formulation, it isassumed that the true core affect changes continuously throughouttime, but the measurements are taken at a finite number of timepoints: t1, t2, . . . , ts, . . . tn, where n stands for the number ofmeasurements (Time 0 can be defined arbitrarily by, for instance,setting it equal to the first time point: t1 ! 0). We define the vectorY(ts) ! (Y1(ts), Y2(ts))

T as the observed pleasantness and arousalscores at time point ts. The general model can then be written asfollows:

! d!#t$ ! B#" " !#t$$dt # #dW#t$Y#ts$ ! !#ts$ # $#ts$

, (1)

where " is a vector with two components and # and B arepositive-definite 2 % 2 matrices. The measurement error is repre-sented by $(ts), which is a random draw from a bivariate normaldistribution with mean (0,0)T and covariance matrix %$. Thecomponent W(t) stands for the standard bivariate Wiener process.The interpretation of these parameters is elaborated below.

At this point, it is important to note that the model in Equation1 consists of two parts. The first equation describes the change inthe true core affect position and is therefore a transition equation;it represents the dynamical aspect of the model. The secondequation maps the true process onto the observed variable and iscalled the observation equation.

In the remainder of the section, we explain, step by step, themodel in Equation 1, by first defining the one-dimensional versionof the transition equation. Accordingly, we will introduce theproperties of the full, two-dimensional form. In the end, the role ofthe observation equation is clarified.

A Unidimensional SDE

Let us take the transition equation of Equation 1, transform itinto an equation for a unidimensional variable "(t) (e.g., we canconsider either the pleasantness or the activation dimension at

once, but we cannot see how they influence each other). The resultis a linear first-order SDE that describes the dynamics of the OUstochastic process in one dimension:

d"#t$ ! &#' " "#t$$dt # (dW#t$, (2)

where we assume that & ) 0.3 The right hand side of Equation 2can be divided into two parts: The first part of the sum is deter-ministic, and the second one is stochastic. Considering only thedeterministic part, it can be deduced that the instantaneous changein "(t), that is, d"(t), depends on how far the current state "(t) isfrom the point '. If "(t) is below ' (i.e., ' * "(t) ) 0), the firstderivative is positive, and consequently "(t) will increase. Theopposite holds when " is above '. Hence, "(t) will always changein the direction of ' and never the other way. Because the processsettles itself at ', this parameter is called a steady state or attractor.However, we will use the term home base to refer to ', as in thecontext of emotions, one may think of ' as an ideal point to whichone is drawn. The parameter & controls the magnitude of the“drawing” effect: If & is large (& )) 1), the difference between theactual state and ' tends to be magnified; therefore a faster changewill occur in the direction of '. With small &s (i.e., & close tozero), the change becomes substantially slower. Based on thisproperty, the parameter & is often called the dampening force orcentralizing tendency. If we considered only this deterministic partas a model for the core affect dynamics, we would encounter amajor disadvantage: The model assumes a gentle but certain returnto the attractor or home base, and then the process remains there.This appears unrealistic, because over the course of time, manyeffects will lead to a divergence between the home base and theactual state, as has been pointed out in the introduction. Thereforea realistic model should incorporate an element of randomness,like the second, stochastic part of the right side of Equation 2. Inthis, parameter W(t) stands for a unidimensional Wiener process orBrownian motion.4 However, it is not the Brownian motion assuch that is added but rather the quantity (dW(t), where ( is thescale of the stochastic term. The random variable dW(t) can beinterpreted loosely as the change in a standard Brownian motion

3 Note that we put all SDEs in the differential form. This differs from theprime notation often encountered with deterministic differential equations.However, when the stochastic term is added, not all derivatives are definedin the traditional way (see, e.g., Jazwinski, 1970), and therefore we preferto keep the differential form.

4 In 1828 the English botanist Robert Brown observed that when partof a pollen of grain is suspended in water, it exhibits an irregular“animated” motion, and the phenomenon was named after him. Therandom Brownian motion was explained by Einstein (1905) by suppos-ing that the movements are the result of frequent impacts on the particleby the molecules of the water. Because these impacts are incessant,complicated, and highly numerous, the resulting movement path of theparticle requires a probabilistic description; a deterministic one is notfeasible. Norbert Wiener (1923) provided a rigorous mathematicalformalization of the Brownian motion, and therefore the Brownianmotion is often called the Wiener process.

470 ORAVECZ, TUERLINCKX, AND VANDEKERCKHOVE

-0.50.5

0

0.5

Arou

sal

1

Valence

0

Time (s)-0.5 300250200150100500

True V/APredicted V/A