ece353: probability and random processes lecture 18...
TRANSCRIPT
ECE353: Probability and Random Processes
Lecture 18 - Stochastic Processes
Xiao Fu
School of Electrical Engineering and Computer ScienceOregon State University
E-mail: [email protected]
From RV to Stochastic Process
• Recall that a RV X is a mapping from the sample space to a real number (i.e.,X(s)).
5
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 1
From RV to Stochastic Process
• A random pair is a mapping to two random variables.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 2
From RV to Stochastic Process
• A random vector is a mapping to a sequence of random variables.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 3
From RV to Stochastic Process
• A stochastic process is a mapping X(t, s) that maps an outcome to an infinite-length “sequence” that is indexed by time.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 4
Sample Path
• Sample Path
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 5
Sample Path
• Fixing time t = t1, X(t1, s) is a single RV.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 6
Examples
• Example 1: pick up a video on YouTube at random to play.
– Every video is a unique stream of bits.
• Example 2: random sinusoid X(t, s) = A(s) sin(Ω(s)t+ φ(s)).
– “modulation” in communications.
-5 0 5 10
t
-5
0
5X
(t,s
)
-5 0 5 10
t
-2
0
2
X(t
,s)
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 7
Types of Stochastic Processes
• Continuous time process: t is continuous. X(t, s).
• Discrete-time process: t is not continuous (e.g., digital signal processing). Xn(s).
• Discrete-valued process: X(t, s) is a discrete RV.
• Continuous-valued process: X(t, s) is continuous RV.
• Q: what is the type of the following:
-5 0 5 10
t
-5
0
5
X(t
,s)
-5 0 5 10
t
-2
0
2
X(t
,s)
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 8
Types of Stochastic Processes
• Continuous time process: t is continuous. X(t, s).
• Discrete-time process: t is not continuous (e.g., digital signal processing). Xn(s).
• Discrete-valued process: X(t, s) is a discrete RV.
• Continuous-valued process: X(t, s) is continuous RV.
• Q: what about this:
-5
0
5
X(t
,s)
-5 0 5 10
t
-2
0
2
X(t
,s)
-5 0 5 10
t
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 9
Poisson Processes of Rate λ
• Motivation: we wish to model the number of data packages arriving at a datacenter over time; or the number of customer arriving at a mall over time.
• Definition: Poisson Process of Rate λ, denoted by N(t, s) (abused notation N(t)since we know that s is always playing role).
1. N(t) = 0, ∀t < 0;2. for all t > t0, the increment N(t1)−N(t0) is a Poisson RV with mean λ(t1−t0).3. if [t0, t1] and [t′0, t
′1] are non-overlapping, then, the corresponding increments,
N(t1)−N(t0), N(t′1)−N(t′0)
are independent RVs.
• Note: Poisson RV with mean α > 0
PN(n) =
αne
−α
n! , n = 0, 1, 2, . . .
0, o.w.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 10
Poisson Processes of Rate λ
• Illustration
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 11
Poisson Processes of Rate λ
• Example: Let us assume t1 ≤ t2 ≤ t3 and n1 ≤ n2 ≤ n3. What is the joint PMFPN(t1),N(t2),N(t3)(n1, n2, n3)?
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 12
Poisson Processes of Rate λ
• We are interested in the joint Probability
P [N(t1) = n1, N(t2) = n2, N(t3) = n3]
= P [N(t1)−N(0) = n1, N(t2)−N(t1) = n2 − n1, N(t3)−N(t2) = n3 − n2]
= P [N(t1)−N(0) = n1]P [N(t2)−N(t1) = n2 − n1]P [N(t3)−N(t2) = n3 − n2]
=
(λtn11n1!
e−λt1)(
λ(t2 − t1)n2−n1(n2 − n1)!
e−λ(t2−t1))(
λ(t3 − t2)n3−n2(n3 − n2)!
e−λ(t3−t2))
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 13
Arrival Time
• From the Poisson process, one can also have characteristics of the arrival times.
• Let N(t) denote the number of customers that one observe at time t, which isa Poisson process. The time that the first customer arrives is a random variable.The inter-arrival time is also random.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 14
Arrival Time
• Let us consider the arrival time of the first customer, X1. What is the PDF?
• We start with the CDF and P [X1 ≤ x1]. This is not easy to compute, but we maycompute P [X1 > x1] = P [no arrival until time point x1] (note that the numberof arrivals between t = 0 and t = x1 is a Poisson RV with mean λ(x1 − 0)):
P [X1 > x1] = P [N(x1)−N(0) = 0] =λx010!e−λx1 = e−λx1
Hence, FX1(x1) = P [X1 ≤ x1] = 1− e−λx1.
• The PDF is fX1(x1) =dFX1
(x1)
x1= λe−λx1 for x1 ≥ 0:
fX1(x1) =
λe−λx1, x1 ≥ 0
0, o.w.
Beautiful!
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 15
Inter-arrival Time• What is the PDF X2, the first inter-arrival time?
• What we know is that X1 = x1 has already happened; and N(x1) = 1.
P [X2 > x2|X1 = x1] = P [N(x1 + x2)−N(x1) = 0|N(x1) = 1]
= P [N(x1 + x2)−N(x1) = 0|N(x1)−N(0) = 1]
= P [N(x1 + x2)−N(x1) = 0] = e−λx2
• The above has nothing to do with x1 ⇒ X2 and X1 are independent; and
FX2(x2) =
1− e−λx2, x2 > 0
0 o.w.
x2 is also an exponentially distributed RV!
• For Poisson N(t) of rate λ, Xi∞i=1: i.i.d. exponential RVs.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 16
Brownian Motion Process
• Definition: The continuous time Brownian Motion: W (t) such that
W (t)|t=0 = W (0) = 0, W (t+ τ)−W (t) ∼ N (0, σ2 = ατ),
i.e., W (t+ τ)−W (t) is a Gaussian RV with variance ατ .
• Discrete-Time Brownian Motion:
Xn+1 = Xn +Wn+1, X0 = 0, Wn ∼ N (0, σ2), Wn∞n=1, i.i.d.
X1 = X0 +W1
X2 = X1 +W2 = W1 +W2
X3 = X2 +W3 = W1 +W2 +W3
...
xn =
∑ni=1Wn, n ≥ 1
0, n ≤ 0.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 17
Brownian Motion Process
• E[Xn] = E[∑ni=1Wi] =
∑ni=1E[Wi] = 0.
• Var[Xn] = Var[∑ni=1Wi] = nσ2 (the variance goes unbounded when n→∞).
• Let Zn = (1/n)Xn = (1/n)∑ni=1Wi.
E[Zn] = 0, Var[Zn] = (1/n)2Var[Xn] =σ2
n.
• The factor 1/n matters so much!
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 18
Basic Statistics of Stochastic Process
• Definition: Expected value function of stochastic process X(t) is defined as
µX(t) = E[X(t)].
• Note: µX(t) is a deterministic function that gives the mean of X(t) for all t.
• Discrete-time: µX[n] = E[Xn], for all n ∈ Z.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 19
Basic Statistics of Stochastic Process• Example: Random amplitude cosine process:
X(t) = A cos(ωt+ φ) = A(s)︸︷︷︸random
cos(ωt+ φ).
-5 0 5 10
t
-5
0
5X
(t)
-5 0 5 10
t
-5
0
5
X(t
)
-5 0 5 10
t
-5
0
5
X(t
)
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 20
Basic Statistics of Stochastic Process
• We can compute
µX(t) = E[X(t)] = E[A cos(ωt+ φ)]
= E[A] cos(ωt+ φ)
• E.g., if A ∼ N (0, 1), then we have
µX(t) = 0, ∀t
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 21
Basic Statistics of Stochastic Process
• Definition: Auto-covariance of random process:
CX(t, τ) = Cov[X(t), X(t+ τ)]
• Discrete-time:CX[m, k] = Cov[Xm, Xm+k]
• Definition: Auto-correlation of random process:
RX(t, τ) = E[X(t)X(t+ τ)]
RX[m, k] = E[Xm, Xm+k]
CX(t, τ) = RX(t, τ)− µX(t)µX(t+ τ)
CX[m, k] = RX[m, k]− µX[m]µX[m+ k]
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 22
Stationary Process• Let us look at a particular time t1: X(t1) is a RV. The PDF fX(t1)(x), generally
speaking, is a function of t.
• Definition: X(t) is stationary if and only if joint PDF
fX(t1),...,X(tm)(x1, . . . , xm) = fX(t1+τ),...,X(tm+τ)(x1, . . . , xm), ∀τ,m
• Hence if X(t) is stationary, fX(t)(x) is the same for all t.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 23
Stationary Process
• Example: Wn∞n=−∞: i.i.d. Gaussian (WGN). Is it stationary?
• How to check? fW1(w1) = fW1+q(w1)? fW1,W2(w1, w2) = fW1+q,W2+q(w1, w2)?
• i.i.d. =⇒ Stationary. (The converse is not true).
• Example: Xn(s) = A(s). Given s, A is fixed (PXn1,Xn2(x1, x2) = P [A2]); alwaysstationary, but not independent.
• Example: Discrete-time Brownian Motion Xn: Var[Xn] = nσ2. Var[X1] = σ2
and Var[X100] = 100σ2. Cannot have the same PDFs.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 24
Stationary Process
• Theorem: If X(t) is a stationary process, then we have
µX(t) = µX, ∀t
andRX(t, τ) = E[X(t)X(t+ τ)] = RX(0, τ) = RX(τ).
• These are necessary conditions of being stationary.
• Proof:
µX(t) = E[X(t)] =
∫ ∞x=−∞
xfX(t)(x)dx
=
∫ ∞x=−∞
xfX(0)(x)dx = µX ∀t,
where we have used stationarity fX(t)(x) = fX(0)(x).
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 25
Stationary Process
• For the auto-correlation part:
RX(t, τ) = E[X(t)X(t+ τ)] =
∫ ∞x1=−∞
∫ ∞x2=−∞
x1x2fX(t),X(t+τ)(x1, x2)dx1dx2
=
∫ ∞x1=−∞
∫ ∞x2=−∞
x1x2fX(0),X(τ)(x1, x2)dx1dx2
= RX(0, τ).
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 26
Stationary Process
• Necessary conditions are used for disqualifying X(t) as a stationary process.
• Example: Y (t) = A cos(2πfct+ θ); A ∼ N (0, 1) is random. Is Y (t) stationary?
• Sanity check: E[Y (t)] = E[A] cos(2πfct+ θ) = 0.
• Let 2πfct+θ = π/2+2kπ for k ∈ Z. There exist points t′ : πfct′+θ = π/2+2kπ
where Y (s, t′) = 0 for all s. Can this be stationary?
RX(t′, τ) = E[X(t′)X(t′ + τ)] =?
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 27
Wide Sense Stationary (WSS) Process
• Definition: X(t) is WSS if and only if
E[X(t)] = µX, ∀t ∈ R
RX(t, τ) = E[X(t)X(t+ τ)] = RX(0, τ), ∀t, ∀τ
• Example: Y (t) = A cos(2πfct+ θ); θ ∼ U [0, 2π] is random. Is Y (t) WSS?
• Let α(t) = 2πfct
E[Y (t)] = AE[cos(α(t) + θ)] = A
∫ 2π
θ=0
cos(α(t) + θ)1
2πdθ
=A
2π
∫ 2π
θ=0
cos(α(t) + θ)dθ = 0.
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 28
Wide Sense Stationary (WSS) Process
• In addition, we have
RX(t, τ) = E[X(t)X(t+ τ)] = A2E[cos(2πfct+ θ) cos(2πfc(t+ τ) + θ)]
• Recall that
cosA cosB =1
2cos(A−B) +
1
2cos(A+B).
Hence, we have
RX(t, τ) =A2
2
∫ 2π
θ=0
cos(4πfct+ 2πfcτ + 2θ)dθ
+A2
2
∫ 2π
θ=0
cos(−2πfcτ)dθ
=A2
2
∫ 2π
θ=0
cos(2πfcτ)dθ = RX(0, τ).
ECE353 Probability and Random Processes X. Fu, School of EECS, Oregon State University 29