Scarica Stochastic Processes - Stochastic And Data Science (UniTo) e più Appunti in PDF di Stocastica solo su Docsity!
Stochastic Processes notes
Kotatsu
vaffanculo
Preface
These are the notes of the Stochastic Processes course for the Academic Year 2024-2025 with Professor Sacerdote. I took these notes personally and I integrated the (many) unclear parts and passages using online resources and occasionally the fucking shitty books that this course has. I am not particularly enthusiast about this course but, as a person with no mathematical background from bachelor degree, I firmly believe in the necessity to understand what you are fucking doing and therefore I went out of my way to make these notes as understandable as possible for other wretched people that have not taken a single analysis exam in their whole life and now have to face integral equations. I recommend doing the same and yes, I know that “yOu CaNnOt UnDeRsTaNd EvErYtHiNg! ThIs Is A mAtHeMaThIcS dEgReE” ok shut up. I need to have at least a vague intuition of what I am doing or otherwise I WILL tune out and start thinking about murderous and mischievous tomfoolery. There are also exercises. They should be mostly correct, but of course you don’t need to be told that these notes are not redacted by a professional and therefore are subject to errors and mistypes. But, again, this is not too far from the experience in class with Prof. Sacerdote. If I pass this exam I will throw a fucking party.
So let’s have a fucking party!
Kotatsu
I
- 1 Brownian Motion
- 1.1 Continuity of stochastic processes
- 1.2 Definitions of Brownian motion
- 1.2.1 Historical context
- 1.2.2 Random walk model
- 1.2.3 Definitions
- Exercises
- 1.3 Brownian motion as a Gaussian processes
- 1.3.1 Properties of Gaussian Processes
- 1.3.2 Gaussianity of Brownian motion
- 1.4 Existence of Brownian motion
- 1.5 Features of Brownian motion
- 1.6 Martingales related with Brownian motion
- 1.6.1 Three golden martingales
- 1.6.2 Boundaries of BM
- Exercises
- 1.7 Brownian motion as a Markov Process
- 1.7.1 Markov Property
- 1.7.2 First passage times and Strong Markov Property
- 1.7.3 First passage times for Brownian motion with drift
- 1.8 Useful laws about Brownian motion’s path
- 1.8.1 Reflection principle
- 1.8.2 Arcsin laws
- Exercises
- 1.9 Properties of Brownian Paths
- 1.9.1 Variation
- 1.9.2 Differentiability
- 1.9.3 Growth of Brownian motion path
- 2 Diffusion processes
- 2.1 One-dimensional diffusion processes
- 2.1.1 Definition
- 2.1.2 The Dynkin condition
- 2.1.3 Characterization of Diffusion processes
- 2.1.4 Examples of transformed diffusion processes
- 2.2 Kolmogorov backward and forward equations
- 2.2.1 Kolmogorov backward differential equation
- 2.2.2 Kolmogorov forward differential equation
- 2.2.3 Solution of the Kolmogorov Equations with transformation method
- 2.3 Differential equation for the boundary classification
- 2.3.1 Differential equations associated with certain functionals
- 2.3.2 Stationary distribution for time homogeneous diffusion
- 2.3.3 Boundary Classification
- 3 Simulation of stochastic processes
- 3.1 Generation of random variables
- 3.1.1 Uniform random variables
- 3.1.2 Classical discrete random variables
- 3.1.3 Generator of continuous random variables
- 3.2 Monte Carlo Methods
- 3.2.1 “Hit or miss” method
- 3.2.2 Sample mean method
- 3.2.3 Variance reduction: Importance Sampling
- 3.2.4 Variance reduction: Control Variable method
- 3.3 Simulation of a Brownian motion
- 3.3.1 Definition and approach
- 3.3.2 First approach
- 3.3.3 Levy’s original argument
- 3.3.4 Karhunen-Loeve theorem
- 3.3.5 Simulation of 𝑑-dimensional Brownian motion
- 3.4 The SDE (or: how I learned not to worry and to refuse solving Cauchy problems)
- 3.4.1 A brief overview
- 3.4.2 The stochastic integral
- 3.4.3 Properties of the Ito integral
- 3.4.4 The Euler-Maruyama method
- 3.4.5 Exact simulation method
- A Code
- A.1 Simulation of random variables
- A.2 Monte Carlo methods
- A.3 Simulation of Brownian motion
Chapter 1
Brownian Motion
1.1 Continuity of stochastic processes
The sample path in a discrete scenario is given by
P( 𝑋 (𝑡) < 𝑥|F𝑠) = P( 𝑋 (𝑡) < 𝑥| 𝑋𝑠).
This gives us a sample path like this:
Figure 1.1: Fucking hell.
We want to think, though, about a continuous space and time process:
Figure 1.2: Leaning like my academic career.
The inter-arrival times are i.i.d. random variables distributed as
𝑇𝑖 ∼ Exp (𝜆).
The continuity of sample paths can be characterized in four different ways:
1. Continuity in mean squares : we have this if for ∀ 𝑡 ⩾ 0 we have
lim 𝑠→𝑡
E
| 𝑋 (𝑡) − 𝑋 (𝑠)|^2
So according to this definition, the mean square of the distance goes to 0 if we go near 𝑠.
2. Continuity in probability : we have this if for ∀ 𝑡 ⩾ 0 and ∀ 𝜀 > 0 we have
lim 𝑠→𝑡
P(| 𝑋 (𝑡) − 𝑋 (𝑠)| > 𝜀) = 0.
This should be enough for all finite distributions, right?^1
Theorem 1.1.
Let {𝑋 (𝑡)} be a stochastic process such that E[𝑋 2 (𝑡)] < ∞ for all 𝑡. Then it is
continuous in mean squaresif and only if:
(a) 𝑚(𝑡) = E[𝑋 (𝑡)] is continuous;
(b) the covariance function
Γ(𝑠, 𝑡) = E[( 𝑋 (𝑡) − 𝑚(𝑡))( 𝑋 (𝑠) − 𝑚(𝑠))]
is continuous on its diagonal set.
Proof
Consider the expectation
E
| 𝑋 (𝑡) − 𝑋 (𝑠)|^2
= E
but
E
= E
( 𝑋 (𝑠) − 𝑚(𝑠))^2
Γ(𝑠,𝑠)
+ 2 𝑚(𝑠)E [𝑋 (𝑠)] − 𝑚^2 (𝑠)
and E
= Γ(𝑡, 𝑡) + 2 𝑚(𝑡)E[𝑋 (𝑡)] − 𝑚^2 (𝑡)
and, moreover,
E[𝑋 (𝑠) 𝑋 (𝑡)] = Γ(𝑠, 𝑡) −
𝑚(𝑡)𝑚(𝑠) + 𝑚(𝑡)E[𝑋 (𝑠)] + ((((((( 𝑚(𝑠)E[𝑋 (𝑡)].
So becomes
= Γ(𝑠, 𝑠) + 2 𝑚^2 (𝑠) − 𝑚^2 (𝑠) + Γ(𝑡, 𝑡) + 2 𝑚^2 (𝑡) − 𝑚^2 (𝑡) − 2 E [𝑋 (𝑠) 𝑋 (𝑡)]
= Γ(𝑠, 𝑠) + Γ(𝑡, 𝑡) − 2 Γ(𝑠, 𝑡) + 𝑚^2 (𝑡) + 𝑚^2 (𝑠) − 2 𝑚(𝑡)𝑚(𝑠)
= Γ(𝑠, 𝑠) + Γ(𝑡, 𝑡) − 2 Γ(𝑠, 𝑡) + [𝑚(𝑡) − 𝑚(𝑠)]^2.
(^1) First, but not last, question without an answer.
Hence, if 𝑚(𝑡) is continuous and Γ(𝑠, 𝑡) is continuous for 𝑠 = 𝑡 then the process
is continuous because we have:
- [𝑚(𝑡) − 𝑚(𝑠)]^2 → 0 since it is a continuous function;
- Γ(𝑠, 𝑠) + Γ(𝑡, 𝑡) − 2 Γ(𝑠, 𝑡) that becomes Γ(𝑡, 𝑡) + Γ(𝑡, 𝑡) − 2 Γ(𝑡, 𝑡) = 0.
I’d like to add that dear prof. Sacerdote didn’t explain this last little point. Thank you! So now whe have
E
| 𝑋 (𝑠) − 𝑋 (𝑡)|^2
If this holds for 𝑚(𝑡) and Γ(𝑡, 𝑡) then it is continuous in mean squares. □
Remark
A process continuous in mean □ (get it?) is continuous in probability (use Cheby- shev a ). a Like use him? As a person? He is dead.
Is the Poisson process continuous in mean □ (and also in probability)? We know that
and
Γ(𝑠, 𝑡) = E[(𝑁 (𝑡) − 𝑚(𝑡))(𝑁 (𝑠) − 𝑚(𝑠))]
= E[𝑁 (𝑡) 𝑁 (𝑠)] − 2 𝑚(𝑡)𝑚(𝑠) − 𝑚(𝑡)𝑚(𝑠)
𝑡>𝑠
E[(𝑁 (𝑡) − 2 𝑁 (𝑠) + 𝑁 (𝑠)) 𝑁 (𝑠)] − 𝑚(𝑡)𝑚(𝑠)
= E[(𝑁 (𝑡) − 𝑁 (𝑠)) 𝑁 (𝑠)] + E
= E[𝑁 (𝑡) − 𝑁 (𝑠)]
𝜆(𝑡−𝑠)
E(𝑁 (𝑠))
𝜆𝑠
+E
𝜆𝑡
𝜆𝑠
= 𝜆^2 (𝑡 − 𝑠)𝑠 − 𝜆^2 𝑡 𝑠 + E
= −𝜆^2 𝑠^2 + Var 𝑁 (𝑠)
𝜆𝑠
+ [E [𝑁 (𝑠)]]^2
𝜆^2 𝑠^2
= 𝜆𝑠 if 𝑠 < 𝑡.
So Γ(𝑠, 𝑡) = 𝜆 min(𝑠, 𝑡) is continuous on diagonal and 𝑚(𝑡) = 𝜆𝑡 is also continuous...
Figure 1.4: Sei un fallito.
but this would mean that Poisson processes are continuous! Which they shouldn’t be! Do I care? No!
10 −^6 𝑚
Figure 1.6: My balls.
- particles seemed to move independently one from the other;
- smallest particles moved more actively;
- less viscous fluids determined more activity movement;
- the motion never ceased;
- the motion was not determined by liquid flows or evaporation;
- particles were not animated.
In 1905 Einstein gave the correct explanation formulating a model that also proved valid for forecasting: the idea was that the atoms surrounding the particles (the atoms of the fluid) performed a temperature-dependent movement that collided with the particles, changing their direction. In 1906 the Polish mathematician Smoluchowski independently obtained results similar to
Figure 1.7: Autechre are a IDM duo from Rochdale, England, composed by Robert Brown and Sean Booth.
Einstein’s. Unrelated, but in 1909 Jean Perrin determined the size of atoms.
The Einstein approach considers the motion of a particle over a small interval 𝑇 observed in a
time large enough to see at least 2 intervals 𝑡 independent. Consider, for the sake of simplicity,
the one-dimensional case. During 𝑡 the particle moves of a distance Δ, that is a random variable
with density 𝜑(Δ) that must be symmetric so 𝜑(Δ) = 𝜑(−Δ). For example, we can imagine
𝜑(Δ) ∼ N with mean 0 (since in this model we do not expect a drift) and small variance. Then
we can consider
𝛾 = 𝑓 (𝑥, 𝑡) as the number of particles per unit of volume.
Einstein proved that 𝑓 verifies
𝜕^2 𝑓
𝜕 𝑥^2
This was the equation of heat diffusion that was already well known at the time. And so was its solution, which is
𝑒−^
4 𝑥𝐷𝑡^2
In this case 𝐷 had a physical meaning: Einstein proved
- 𝜂: dynamic viscosity
- 𝑟: dimension of particles
- 𝑅: gas constant (8.3 (^) mol KJ )
- 𝑇 : absolute temperature
- 𝑁 : Avogadro’s number He could, moreover, calculate the average displacement of a particle
𝑥^2 =
This means that the displacement (space) is proportional to the square root of time... But what is this story of space and time being related non linearly? This sounded pretty wild for that time.
Figure 1.8: Idk I think I would have probably killed myself.
1.2.2 Random walk model
We can think that:
- each particle starts at 𝑥 = 0;
- the particle changes position at discrete times
Remark
For any two times 𝑡 = 𝑛Δ𝑡 and 𝑇 = 𝑁 Δ𝑡, 0 < 𝑡 < 𝑇 , we can write:
∑︁^ 𝑁
𝑘=𝑛+ 1
∑︁^ 𝑛
𝑘= 1
But these quantities involve different 𝜀, so they are independent:
𝑋𝑇 − 𝑋𝑡 ⊥⊥ 𝑋𝑡 − 𝑋 0 (independent increments.)
But we know that
E𝜀𝑖 =
and Var 𝜀𝑖 =
so
Var 𝑋𝑇 = Var
𝑖.𝑖.𝑑.
∑︁^ 𝑁
𝑘
(Δ𝑋 )^2 Var ( 2 𝜀𝑘 − 1 )
∑︁^ 𝑁
𝑘
(Δ𝑋 )^2 4 Var 𝜀𝑘
1 4
= 𝑁 (Δ𝑋 )^2.
But 𝑁 = Δ𝑇𝑡 so
𝑁 (Δ𝑋 )^2 =
(Δ𝑋 )^2
So this should be the variance of our random walk. If we take the limit for 𝑥 and 𝑡 and do
nost take into account that space and time decrease in different ways we get a process that has mean 0 and variance 0... but that is a process that is 0 almost surely! So we get the idea that time and space must decrease at different speeds. We also said that the increments must be stationary, but that has its implications.
Remark
We know that Var 2𝑆𝑁 = 𝑁 , but
E 2 𝑆𝑁
2 𝑆𝑁 − E 2 𝑆𝑁
2 𝑆𝑁 − E 2 𝑆𝑁
Var ( 2 𝑆𝑁 )
√︃ Δ^ 𝑇𝑡
𝜎
√ Δ𝑡
2 𝑆𝑁 − E 2 𝑆𝑁
Var ( 2 𝑆𝑁 )
This gets to 𝑍 ∼ N ( 0 , 1 ) as 𝑁 → ∞
So we get that this quantity gets to 𝑍 𝜎
𝑡 and it is true for each 𝑡:
𝑋𝑡 ∼ N
1.2.3 Definitions
Definition 1.2. Definition of Brownian Motion (1923, by Norbert Wiener).
A stochastic process 𝐵 = {𝐵𝑡 }𝑡⩾ 0 defined on a probability space (Ω, F, P) and taking
values in R is called standard Brownian motion (or standard Wiener process ) if:
1. the function 𝑡 ↦→ 𝐵𝑡 is continuous from R+ to R and 𝐵 0 = 0 (both almost
surely);
2. 𝐵 has stationary increments (they don’t depend on the origin):
𝐵𝑡 − 𝐵𝑠 ∼ 𝐵𝑡+ℎ − 𝐵𝑠+ℎ E 0 < 𝑠 < 𝑡 ∀ 𝑓 > 0;
3. 𝐵 has independent increments, i.e. for any 0 ⩽ 𝑡 0 ⩽ 𝑡 1 <⩽ 𝑡 2 ⩽... ⩽ 𝑡𝑛 and
𝑛 ⩾ 1 we have:
𝐵𝑡 1 − 𝐵𝑡 0 , 𝐵𝑡 2 − 𝐵𝑡 1 ,... , 𝐵𝑡𝑛 − 𝐵𝑡𝑛− 1 independent;
4. 𝐵𝑡 ∼ N ( 0 , 𝑡) for ∀ 𝑡 ⩾ 0.
Definition 1.2. General Brownian motion (Brownian motion with drift).
drift
𝐷= 𝜎 2 2
Wiener worked on the difference space, that is the space of the increments of the process, and introduced a Fourier series representation:
∑︁^ ∞
𝑛= 1
sin(𝑛𝜋 𝑡)
where {𝜉𝑖 } are i.i.d. random variables 𝜉𝑖 ∼ N ( 0 , 1 ), so this object is a Fourier series for which
the coefficients are random variables. Thinking about difference equations makes our life a bit
easier, since different times have different 𝜉𝑖 but these are independent so also the increment
between times are independent.
Exercises
Exercise 2
Consider a continuous process 𝑊 = (𝑊𝑡 )𝑡⩾ 0 adapted to F and let
E𝑠
R
d𝑥
exp
𝑥^2
for all 𝑠 and 𝑡 in R+ and all positive Borel functions 𝑓 on R. Show that 𝑊 is a standard
We need to check the five properties:
1. 𝐵 0 (𝜔) = 0 a.s. ∀ 𝜔 ∈ Ω. We know that the increment has the same distribution
as a Gaussian random variable distributed as N( 0 , 𝑡). This means that as 𝑡 → 0 the
distribution collapses towards a Dirac measure centered at 0:
𝑡→ 0 −−−→ 0 in distribution
but since 𝑊𝑡 is continuous in 𝑡 then we know that
𝑊 0 = lim
𝑡→ 0
So it must be the case that
Technically, convergence in distribution + continuity should imply a.s. convergence because there are no jumps in the distribution! ¥
2. 𝐵𝑡𝑛 − 𝐵𝑡𝑛− 1 ,... , 𝐵𝑡 1 − 𝐵𝑡 0 are independent for ∀ 𝑛 > 1 , 0 ⩽ 𝑡 1 , 𝑡 2 <... < 𝑡𝑛 < ∞
( independent increments ). The increment 𝑊𝑠+𝑡 − 𝑊𝑠 over the interval (𝑠, 𝑠 + 𝑡) is
independent of the past F𝑠 (and its distribution is N( 0 , 𝑡)). ¥
. I am losing my grip on reality.
I had to search Çinlar ’s horrid book for this!
3. 𝐵𝑡 − 𝐵𝑠 ∼ 𝐵𝑡+ℎ − 𝐵𝑠+ℎ for ∀ ℎ > 0, ∀ 0 ⩽ 𝑠 < 𝑡 < ∞ ( stationary increments ). This
works because the distribution of the interval does not depend on 𝑠 but only on 𝑡. ¥
4. 𝐵𝑡 − 𝐵𝑠 ∼ N ( 0 , 𝑡 − 𝑠)⊗𝑑^ with
N( 0 , 𝑡) d𝑥 =
d𝑥
exp
𝑥^2
( Gaussian increments ). This follows by definition, I guess. ¥
5. 𝑡 ↦→ 𝐵𝑡 (𝜔) is continuous for all 𝜔 ( continuity of sample paths ). ¥
Exercise 3
Show that there exist a random vector (𝑈 ,𝑉 ) such that 𝑈 and 𝑉 are one dimensional
Gaussian random variables but (𝑈 ,𝑉 ) is not Gaussian. Hint: try
𝑓 (𝑢, 𝑣) = 𝑔 (𝑢) 𝑔 (𝑣)( 1 − sin 𝑢 sin 𝑣)
with
exp
n − 𝑢
2 2
o
√
We can compute the marginal densities:
−∞
𝑔 (𝑢) 𝑔 (𝑣)( 1 − sin 𝑢 sin 𝑣) d𝑢
−∞
𝑔 (𝑢)( 1 − sin 𝑢 sin 𝑣) d𝑢
−∞
𝑔 (𝑢) d𝑢
1
− sin 𝑣
−∞
𝑔 (𝑢) sin 𝑢 d𝑢
odd function, so the integral is 0
So the marginal density is Gaussian! Do the same with the other marginal density to obtain the same shit.
We can now substitute these mfs in x and get
E
h
𝑒−𝜗 𝑋^ (𝑡)^
i
𝑒−𝜗 𝜎^
√ 𝜏 (^) + 1 2
𝑒𝜗 𝜎^
√ 𝜏
We already know that:
E [𝑋 (𝑡)] =
This shows that the expected displacement of the random walk at time 𝑡 converges to a linear
function of 𝑡, with slope 𝜇, as required. This means that the limiting process has drift 𝜇. Next,
for the variance:
Var ( 𝑋 (𝑡)) =
· 4 𝑝𝑞Δ^2.
Substituting Δ = 𝜎
𝜏, we get:
Var ( 𝑋 (𝑡)) =
𝜏)^2 =
Now, substituting 𝑝 = 12
𝜇√𝜏 𝜎
and 𝑞 = 21
𝜇√𝜏 𝜎
, we get:
Thus, we have:
Var ( 𝑋 (𝑡)) = 1 −
Taking the limit as 𝜏 → 0, we see that the term involving 𝜇 vanishes and the variance becomes:
Var ( 𝑋 (𝑡)) = 𝜎 2 𝑡,
which is precisely the variance of a Brownian motion with variance 𝜎 2.
Exercise 5
Ignoring the requested continuity of sample paths of the Brownian motion show that the Brownian motion is continuous in mean square.
The process is continuous in mean square if the expectation of the squared difference between
𝐵 (𝑡) and 𝐵 (𝑠) goes to 0 as 𝑡 → 𝑠:
lim 𝑠→𝑡
E
(𝐵 (𝑡) − 𝐵 (𝑠))^2
We know that E [𝐵 (𝑡)] = 0, that is continuous because the mean is trivially constant over time
(duh). The covariance function is, for 𝑠 ⩽ 𝑡,
Γ(𝑠, 𝑡) = Cov (𝐵 (𝑠), 𝐵 (𝑡))
= E [𝐵 (𝑠)𝐵 (𝑡)] − E [𝐵 (𝑠)]
0
E [𝐵 (𝑡)]
0
= E [𝐵 (𝑠)𝐵 (𝑡)]
= E [𝐵 (𝑠)(𝐵 (𝑠) + 𝐵 (𝑡) − 𝐵 (𝑠))]
= E
𝐵 (𝑠)^2
+ E[𝐵 (𝑠)(𝐵 (𝑡) − 𝐵 (𝑠)
⊥⊥ of 𝐵 (𝑠)
)]
= E
𝐵 (𝑠)^2
+ E[𝐵 (𝑠)]
= 0
E[(𝐵 (𝑡) − 𝐵 (𝑠))]
= E
𝐵 (𝑠)^2
= 𝑠 = min{𝑠, 𝑡}.
. I am losing my grip on reality.
It would have been useful to know about this little property during lesson...
We know that min{𝑠, 𝑡} 𝑠=𝑡 = 𝑡 so our limit is:
lim 𝑠→𝑡
E
(𝐵 (𝑡) − 𝐵 (𝑠))^2
= lim 𝑠→𝑡
E
𝐵 (𝑡)^2
− 2 E [𝐵 (𝑡)𝐵 (𝑠)]
Γ(𝑠,𝑡)
+E
𝐵 (𝑠)^2
= lim 𝑠→𝑡
1.3 Brownian motion as a Gaussian processes
1.3.1 Properties of Gaussian Processes
Definition 1.3.
A Gaussian process is defined as a process Γ with
d d𝜆 E^
𝜆= 0
= 𝑖𝑚 𝑚 = E[Γ]
d^2 d𝜆^2 E^
𝜆 0
= −E
Γ^2
Definition 1.3. A random vector
Γ = (Γ 1 , Γ 2 ,... , Γ𝑛) ∈ R𝑛
is Gaussian if the scalar product
⟨𝜆, Γ⟩ ∀ 𝜆 ∈ R𝑛
is a one-dimensional Gaussian random variable with:
E
h
𝑒𝑖⟨𝜆,Γ⟩^
i
= 𝑒𝑖E[⟨𝜆,Γ⟩]−^
1
2 Var^ (⟨𝜆,Γ⟩)^.