SLIDE 1
Random Processes DS GA 1002 Probability and Statistics for Data - - PowerPoint PPT Presentation
Random Processes DS GA 1002 Probability and Statistics for Data - - PowerPoint PPT Presentation
Random Processes DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/DSGA1002_fall17 Carlos Fernandez-Granda Aim Modeling quantities that evolve in time (or space) Trajectory of a particle, price of
SLIDE 2
SLIDE 3
Definition Mean and autocovariance functions Important random processes
SLIDE 4
Notation
We denote random processes using a tilde over an upper case letter
- X
SLIDE 5
Formal definition
Given a probability space (Ω, F, P), a random process X is a function that maps each ω ∈ Ω to a function X (ω, ·) : T → R There are two interpretations for X (ω, t)
- 1. If we fix ω, then
X (ω, t) is a deterministic function or realization of t
- 2. If we fix t then
X (ω, t) is a random variable, usually denoted by X (t)
SLIDE 6
Continuous and discrete random processes
We can classify a random process depending on the indexing variable t
◮ If t is defined on a continuous interval, the process is continuous ◮ If t is defined on a discrete set, the process is discrete
SLIDE 7
State space
Set of possible values of the random variable X (t) for any t It can be continuous or discrete (also finite) There are continuous-state discrete-time random processes and discrete-state continuous-time random processes
SLIDE 8
Puddle
Initial amount of water is uniform between 0 and 1 gallon After a time interval t there is t times less water Continuous-state continuous-time random process C
- C (ω, t) := ω
t t ∈ [1, ∞)
SLIDE 9
Puddle
2 4 6 8 10 0.2 0.4 0.6 0.8 1 t
- C (ω, t)
ω = 0.62 ω = 0.91 ω = 0.12
SLIDE 10
Puddle
We only care about how much water there is on day i Continuous-state discrete-time random process D
- D (ω, i) := ω
i , i = 1, 2, . . .
SLIDE 11
Puddle
1 2 3 4 5 6 7 8 9 10 0.2 0.4 0.6 0.8 i
- D (ω, i)
ω = 0.31 ω = 0.89 ω = 0.52
SLIDE 12
nth-order distribution
Joint distribution of X (t1), X (t2), . . . , X (tn) for any {t1, t2, . . . , tn} If X (t1), X (t2), . . . , X (tn) have the same joint distribution as X (t1 + τ), X (t2 + τ), . . . , X (tn + τ) for any τ the process is strictly/strongly stationary
SLIDE 13
Puddle
F
C(t) (x)
SLIDE 14
Puddle
F
C(t) (x) := P
- C (t) ≤ x
SLIDE 15
Puddle
F
C(t) (x) := P
- C (t) ≤ x
- = P (ω ≤ t x)
SLIDE 16
Puddle
F
C(t) (x) := P
- C (t) ≤ x
- = P (ω ≤ t x)
= t x
u=0 du = t x
if 0 ≤ x ≤ 1
t
1 if x > 1
t
if x < 0
SLIDE 17
Puddle
F
C(t) (x) := P
- C (t) ≤ x
- = P (ω ≤ t x)
= t x
u=0 du = t x
if 0 ≤ x ≤ 1
t
1 if x > 1
t
if x < 0 f
C(t) (x) =
- t
if 0 ≤ x ≤ 1
t
- therwise
SLIDE 18
How to specify a random process
Three options:
SLIDE 19
How to specify a random process
Three options:
- 1. Define probability space and a function from Ω to a set of functions
SLIDE 20
How to specify a random process
Three options:
- 1. Define probability space and a function from Ω to a set of functions
- 2. Define all nth-order distributions for all n ≥ 0
SLIDE 21
How to specify a random process
Three options:
- 1. Define probability space and a function from Ω to a set of functions
- 2. Define all nth-order distributions for all n ≥ 0
- 3. Express it as a function of another random process
SLIDE 22
Definition Mean and autocovariance functions Important random processes
SLIDE 23
Mean
The mean of a random process is the function µ
X (t) := E
- X (t)
- It is a deterministic function of t
SLIDE 24
Autocovariance
The autocovariance of a random process is the function R
X (t1, t2) := Cov
- X (t1) ,
X (t2)
- In particular,
R
X (t, t) := Var
- X (t)
SLIDE 25
Wide-sense/weakly stationary process
A process is stationary in a wide or weak sense if its mean is constant µ
X (t) := µ
and its autocovariance function is shift invariant, i.e. R
X (t1, t2) := R X (t1 + τ, t2 + τ)
for any t1 and t2 and any shift τ Common notation R
X (s) := R X (t, t + s)
SLIDE 26
Autocovariance function
15 10 5 5 10 15 s 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 R(s)
SLIDE 27
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 28
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 29
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 30
Autocovariance function
15 10 5 5 10 15 s 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 R(s)
SLIDE 31
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 32
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 33
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 34
Autocovariance function
15 10 5 5 10 15 s 1.0 0.5 0.0 0.5 1.0 R(s)
SLIDE 35
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 36
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 37
Realization
2 4 6 8 10 12 14 i 3 2 1 1 2 3
SLIDE 38
Definition Mean and autocovariance functions Important random processes
SLIDE 39
Independent identically-distributed sequences
A discrete random process is iid if
◮
X (i) has the same distribution for any fixed i
◮
X (i1), X (i2), . . . , X (in) are mutually independent for any i1, . . . , in and any n ≥ 2
SLIDE 40
Independent identically-distributed sequences
Valid definition
◮ If the state is discrete
p
X(i1), X(i2),..., X(in) (xi1, xi2, . . . , xin) = n
- i=1
p
X (xi) ◮ If the state is continuous
f
X(i1), X(i2),..., X(in) (xi1, xi2, . . . , xin) = n
- i=1
f
X (xi)
The process is strictly stationary
SLIDE 41
Uniform distribution in [0, 1]
2 4 6 8 10 12 14 i 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2
SLIDE 42
Uniform distribution in [0, 1]
2 4 6 8 10 12 14 i 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2
SLIDE 43
Uniform distribution in [0, 1]
2 4 6 8 10 12 14 i 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2
SLIDE 44
Geometric distribution (p = 0.4)
2 4 6 8 10 12 14 i 2 4 6 8 10 12
SLIDE 45
Geometric distribution (p = 0.4)
2 4 6 8 10 12 14 i 2 4 6 8 10 12
SLIDE 46
Geometric distribution (p = 0.4)
2 4 6 8 10 12 14 i 2 4 6 8 10 12
SLIDE 47
Independent identically-distributed sequences
If the distribution at each time has mean µ and variance σ2 µ
X (i)
R
X (i, j)
SLIDE 48
Independent identically-distributed sequences
If the distribution at each time has mean µ and variance σ2 µ
X (i) := E
- X (i)
- R
X (i, j)
SLIDE 49
Independent identically-distributed sequences
If the distribution at each time has mean µ and variance σ2 µ
X (i) := E
- X (i)
- = µ
R
X (i, j)
SLIDE 50
Independent identically-distributed sequences
If the distribution at each time has mean µ and variance σ2 µ
X (i) := E
- X (i)
- = µ
R
X (i, j) := E
- X (i)
X (j)
- − E
- X (i)
- E
- X (j)
- =
- σ2
if i = j if i = j
SLIDE 51
Gaussian random process
Any set of samples is a Gaussian random vector Fully characterized by mean function µ
X and autocovariance function R X
- X :=
- X (t1)
- X (t2)
· · ·
- X (tn)
is a Gaussian random vector with mean and covariance
- µ
X :=
µ
X (t1)
µ
X (t2)
· · · µ
X (tn)
Σ
X :=
R
X (t1, t1)
R
X (t1, t2)
· · · R
X (t1, tn)
R
X (t1, t2)
R
X (t2, t2)
· · · R
X (t2, tn)
. . . . . . ... . . . R
X (t2, tn)
R
X (t2, tn)
· · · R
X (tn, tn)
SLIDE 52
Generating a Gaussian random process
Boils down to sampling a Gaussian random vector with the appropriate mean and covariance matrix
- 1. Compute the mean vector
µ
X and the covariance matrix Σ X
- 2. Generate n independent samples from a standard Gaussian
- 3. Color the samples according to Σ
X and center them around
µ
X
SLIDE 53
Poisson process
Sequential events occurring on [0, ∞)
- 1. Each event occurs independently from every other event
- 2. Events occur uniformly
- 3. Events occur at a rate of λ events per time interval
- N (t) is the number of events between 0 and t
SLIDE 54
Poisson process
For any t1 < t2 < t3 < t4 1. N (t2) − N (t1) is Poisson with parameter λ (t2 − t1) 2. N (t2) − N (t1) and N (t4) − N (t3) are independent A random process satisfying these two conditions is a Poisson process
SLIDE 55
Poisson process
nth order distribution can be expressed in terms of p
- ˜
λ, x
- :=
˜ λx e−˜
λ
x!
SLIDE 56
Poisson process
p
N(t1),..., N(tn) (x1, . . . , xn)
SLIDE 57
Poisson process
p
N(t1),..., N(tn) (x1, . . . , xn)
= P
- N (t1) = x1, . . . ,
N (tn) = xn
SLIDE 58
Poisson process
p
N(t1),..., N(tn) (x1, . . . , xn)
= P
- N (t1) = x1, . . . ,
N (tn) = xn
- = P
- N (t1) = x1,
N (t2) − N (t1) = x2 − x1, . . . , N (tn) − N (tn−1) = xn − xn−1
SLIDE 59
Poisson process
p
N(t1),..., N(tn) (x1, . . . , xn)
= P
- N (t1) = x1, . . . ,
N (tn) = xn
- = P
- N (t1) = x1,
N (t2) − N (t1) = x2 − x1, . . . , N (tn) − N (tn−1) = xn − xn−1
- = P
- N (t1) = x1
- P
- N (t2) −
N (t1) = x2 − x1
- . . . P
- N (tn) −
N (tn−1) = xn − xn−1
SLIDE 60
Poisson process
p
N(t1),..., N(tn) (x1, . . . , xn)
= P
- N (t1) = x1, . . . ,
N (tn) = xn
- = P
- N (t1) = x1,
N (t2) − N (t1) = x2 − x1, . . . , N (tn) − N (tn−1) = xn − xn−1
- = P
- N (t1) = x1
- P
- N (t2) −
N (t1) = x2 − x1
- . . . P
- N (tn) −
N (tn−1) = xn − xn−1
- = p (λt1, x1) p (λ (t2 − t1) , x2 − x1) . . . p (λ (tn − tn−1) , xn − xn−1)
SLIDE 61
Poisson process (λ = 0.2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 62
Poisson process (λ = 0.2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 63
Poisson process (λ = 0.2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 64
Poisson process (λ = 1)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 65
Poisson process (λ = 1)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 66
Poisson process (λ = 1)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 67
Poisson process (λ = 2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 68
Poisson process (λ = 2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 69
Poisson process (λ = 2)
2 4 6 8 10 t 0.0 0.2 0.4 0.6 0.8 1.0
SLIDE 70
Call-center data
◮ Example: Data from a call center in Israel ◮ We compare the histogram of the number of calls received in an
interval of 4 hours over 2 months and the pmf of a Poisson random variable fitted to the data
SLIDE 71
Call-center data
5 10 15 20 25 30 35 40 Number of calls 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 Real data Poisson distribution
SLIDE 72
Poisson process
Distribution of interarrival times? FT (t)
SLIDE 73
Poisson process
Distribution of interarrival times? FT (t) := P (T ≤ t)
SLIDE 74
Poisson process
Distribution of interarrival times? FT (t) := P (T ≤ t) = 1 − P (T > t)
SLIDE 75
Poisson process
Distribution of interarrival times? FT (t) := P (T ≤ t) = 1 − P (T > t) = 1 − P (no events in an interval of length t)
SLIDE 76
Poisson process
Distribution of interarrival times? FT (t) := P (T ≤ t) = 1 − P (T > t) = 1 − P (no events in an interval of length t) = 1 − e−λ t
SLIDE 77
Poisson process
Distribution of interarrival times? FT (t) := P (T ≤ t) = 1 − P (T > t) = 1 − P (no events in an interval of length t) = 1 − e−λ t fT (t) = λe−λ t Iid exponential sequence (allows to simulate Poisson process!)
SLIDE 78
Call-center data
◮ Example: Data from a call center in Israel ◮ We compare the histogram of the inter-arrival times between calls
- ccurring between 8 pm and midnight over two days and the pdf of an
exponential random variable fitted to the data
SLIDE 79
Call center
1 2 3 4 5 6 7 8 9 Interarrival times (s) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Exponential distribution Real data
SLIDE 80
Generating a Poisson process
To sample from a Poisson random process with parameter λ we:
- 1. Generate independent samples from an exponential random variable
with parameter λ t1, t2, t3, . . .
- 2. Set the events of the Poisson process to occur at t1, t2, t3, . . .
SLIDE 81
Mean and autocovariance
E
- X (t)
SLIDE 82
Mean and autocovariance
E
- X (t)
- = λ t
SLIDE 83
Mean and autocovariance
E
- X (t)
- = λ t
R
X (t1, t2) = λ min {t1, t2}
SLIDE 84
Mean and autocovariance
E
- X (t)
- = λ t
R
X (t1, t2) = λ min {t1, t2}
The process is neither strictly nor wide-sense stationary
SLIDE 85
Earthquakes
◮ Earthquakes in San Francisco follow a Poisson process with parameter
0.3 earthquakes/year
◮ Probability of no earthquakes in the next 10 years and then at least 1
- ver the following 20 years?
SLIDE 86
Earthquakes
P
- X (10) = 0,
X (30) ≥ 1
SLIDE 87
Earthquakes
P
- X (10) = 0,
X (30) ≥ 1
- = P
- X (10) = 0,
X (30) − X (10) ≥ 1
SLIDE 88
Earthquakes
P
- X (10) = 0,
X (30) ≥ 1
- = P
- X (10) = 0,
X (30) − X (10) ≥ 1
- = P
- X (10) = 0
- P
- X (30) −
X (10) ≥ 1
SLIDE 89
Earthquakes
P
- X (10) = 0,
X (30) ≥ 1
- = P
- X (10) = 0,
X (30) − X (10) ≥ 1
- = P
- X (10) = 0
- P
- X (30) −
X (10) ≥ 1
- = P
- X (10) = 0
1 − P
- X (30) −
X (10) = 0
SLIDE 90
Earthquakes
P
- X (10) = 0,
X (30) ≥ 1
- = P
- X (10) = 0,
X (30) − X (10) ≥ 1
- = P
- X (10) = 0
- P
- X (30) −
X (10) ≥ 1
- = P
- X (10) = 0
1 − P
- X (30) −
X (10) = 0
- = e−3
1 − e−6 = 4.97 10−2
SLIDE 91
Random walk
Process that evolves by taking steps in random directions Step sequence Z is iid
- S (i) =
- +1
with probability 1
2
−1 with probability 1
2
We define a random walk X as
- X (i) :=
- for i = 0
i
j=1
S (j) for i = 1, 2, . . .
SLIDE 92
Random walk
2 4 6 8 10 12 14 i 6 4 2 2 4 6
SLIDE 93
Random walk
2 4 6 8 10 12 14 i 6 4 2 2 4 6
SLIDE 94
Random walk
2 4 6 8 10 12 14 i 6 4 2 2 4 6
SLIDE 95
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x)
SLIDE 96
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x) = P
i
- j=0
- S (i) = x
SLIDE 97
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x) = P
i
- j=0
- S (i) = x
= P (S+ − S− = x)
SLIDE 98
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x) = P
i
- j=0
- S (i) = x
= P (S+ − S− = x) = P (2 S+ − i = x)
SLIDE 99
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x) = P
i
- j=0
- S (i) = x
= P (S+ − S− = x) = P (2 S+ − i = x) = P
- S+ = i + x
2
SLIDE 100
First-order pmf
p
X(i) (x) ?
Distribution of number of positive steps S+? Negative steps: S− = i − S+ p
X(i) (x) = P
i
- j=0
- S (i) = x
= P (S+ − S− = x) = P (2 S+ − i = x) = P
- S+ = i + x
2
- =
i
i+x 2
1 2i if i + x 2 is an integer between 0 and i
SLIDE 101
Mean and autocovariance
µ
X (i)
SLIDE 102
Mean and autocovariance
µ
X (i) := E
- X (i)
SLIDE 103
Mean and autocovariance
µ
X (i) := E
- X (i)
- = E
i
- j=1
- S (j)
SLIDE 104
Mean and autocovariance
µ
X (i) := E
- X (i)
- = E
i
- j=1
- S (j)
=
i
- j=1
E
- S (j)
- by linearity of expectation
SLIDE 105
Mean and autocovariance
µ
X (i) := E
- X (i)
- = E
i
- j=1
- S (j)
=
i
- j=1
E
- S (j)
- by linearity of expectation
= 0
SLIDE 106
Mean and autocovariance
µ
X (i) := E
- X (i)
- = E
i
- j=1
- S (j)
=
i
- j=1
E
- S (j)
- by linearity of expectation
= 0 R
X (i, j) = min {i, j}
SLIDE 107
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain?
SLIDE 108
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain?
SLIDE 109
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain? Probability that the gambler is up 6 dollars or more after first 10 flips?
SLIDE 110
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain? Probability that the gambler is up 6 dollars or more after first 10 flips? P (gambler is up $6 or more)
SLIDE 111
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain? Probability that the gambler is up 6 dollars or more after first 10 flips? P (gambler is up $6 or more) = p
X(10) (6) + p X(10) (8) + p X(10) (10)
SLIDE 112
Gambler
A fair coin is flipped sequentially Heads: +$1 Tails: -$1 Expected gain? Probability that the gambler is up 6 dollars or more after first 10 flips? P (gambler is up $6 or more) = p
X(10) (6) + p X(10) (8) + p X(10) (10)
= 10 8 1 210 + 10 9 1 210 + 1 210
SLIDE 113