You are on page 1of 20

Lecture 5

Stochastic Processes

Stochastic means: random

Process means: function of time

• Definition: Stochastic Process: A stochastic process X(t) consists of an experiment

with a probability measure P [·] defined on a sample space S and a function that assigns

a time function x(t, s) to each outcome s in the sample space of the experiment.

• Definition: Sample Function: A sample function x(t, s) is the time function associated

with outcome s of an experiment.

X(t) : name of the stochastic process

t : indicate the time dependence

s : indicates the particular outcome of the experiment

(5.1)

69
Figure 5.1: Illustration of Stochastic Process.

Figure 5.2: Example: transmit 3 binary digits to the receiver.

5.1 Types of Stochastic Processes

• Discrete Value and Continuous Value Processes: X(t) is a discrete value process if the

set of all possible values of X(t) at all times t is a countable set SX ; otherwise, X(t)

is a continuous value process.

• Discrete Time and Continuous Time Process: The stochastic process X(t) is a discrete

time process if X(t) is defined only for a set of time instants, tn = nT , where T is a

Spring 2023 70
constant and n is an integer; otherwise X(t) is a continuous time process.

• Random variables from random processes: consider a sample function x(t, s), each

x(t1 , s) is a sample value of a random variable. We use X(t1 ) for this random variable.

The notation X(t) can refer to either the random process or the random variable that

corresponds to the value of the random process at time t.

• Example: in the experiment of repeatedly rolling a die, let Xn = X(nT ). What is

the pmf of X3 ?

The random variable X3 is the value of the die roll at time 3. In this case,

 1/6, x = 1, 2 · · · , 6;

P X3 =
 0,

o.w.

5.2 Independent, Identically Distributed (i.i.d) Ran-

dom Sequences

An i.i.d. random sequence is a random sequence, Xn , in which

· · · , X−2 , X−1 , X0 , X1 , X2 , · · ·

are i.i.d random variables. An i.i.d random sequence occurs whenever we perform indepen-

dent trials of an experiment at a constant rate. An i.i.d random sequence can be either

discrete value or continuous value. In the discrete case, each random variable Xi has pmf

PXi (x) = PX (x), while in the continuous case, each Xi has pdf fXi (x) = fX (x).

Theorem: Let Xn denote an i.i.d random sequence. For a discrete value process, the sample

vector Xn1 , · · · , Xnk has joint pmf


k
Y
PXn1 , · · · , Xnk (x1 , · · · , xk ) = PX (x1 )PX (x2 ) · · · PX (xk ) = PX (xi )
i=1

Spring 2023 71
Otherwise, for a continuous value process, the joint pdf of Xn1 , · · · , Xnk is
k
Y
fXn1 , · · · , Xnk (x1 , · · · , xk ) = fX (x1 )fX (x2 ) · · · fX (xk ) = fX (xi )
i=1

5.3 Expected Value and Correlation

• The Expected Value of Process: The expected value of a stochastic process X(t)

is the deterministic function

µX (t) = E[X(t)]

• Autocovariance: the autocovariance function of the stochastic process X(t) is

CX (t, τ ) = Cov[X(t), X(t + τ )]

• Autocorrelation: The autocorrelation function of the stochastic process X(t) is

RX (t, τ ) = E[X(t)X(t + τ )]

• Autocovariance and Autocorrelation of a Random Sequence:

CX [m, k] = Cov[Xm , Xm+k ] = RX [m, k] − E[Xm ]E[Xm+k ]

where m and k are integers. The autocorrelation function of the random sequence Xn

is

RX [m, k] = E[Xm Xm+k ]

Example 1

Fading envelope, sampled at nTs , obtain a(i). Then


N
1 1 X
RX (t, Ts ) = [a(1)a(2)+a(2)a(3)+· · ·+a(N)a(N+1)] = a(i)a(i+1), (window length N)
N N i=1

Spring 2023 72
similarly,
N
1 X
RX (t, 2Ts ) = a(i)a(i + 2)
N i=1

and
N
1 X
CX (t, Ts ) = (a(i) − µX ) (a(i + 1) − µX )
N i=1

Example 2

If R is a random variable, find the expected value of the rectified cosine X(t) = R| cos 2πf t|.

Solution: The expected value of X(t) is

µX (t) = E[R| cos 2πf t|] = E[R] · | cos 2πf t|

Example 3

The input to a digital filter is an i.i.d random sequence · · · , X−1 , X0 , X1 , · · · with E[Xi ] = 0

and V ar[Xi ] = 1. The output is also a random sequence · · · , Y−1 , Y0 , Y1 , · · · . The relation-

ship between the input sequence and output sequence is expressed in the formula

Yn = Xn + Xn−1 for all integer n

Find the expected value function E[Yn ] and autocovariance function CY (m, k) of the output.

Solution: Because Yi = Xi + Xi−1 , we have E[Yi ] = E[Xi ] + E[Xi−1 ] = 0. Before calculating

CY [m, k], we observe that Xn being an i.i.d random sequence with E[Xn ] = 0 and V ar[Xn ] =

1 implies 
 1, k = 0;

CX [m, k] = E[Xm Xm+k ] =
 0, o.w.

Spring 2023 73
For any integer k, we can write

CY [m, k] = E[Ym Ym+k ] = E[(Xm + Xm−1 ) (Xm+k + Xm+k−1 )]

= E[Xm Xm+k + Xm Xm+k−1 + Xm−1 Xm+k + Xm−1 Xm+k−1 ]

= E[Xm Xm+k ] + E[Xm Xm+k−1 ] + E[Xm−1 Xm+k ] + E[Xm−1 Xm+k−1 ]

= CX [m, k] + CX [m, k − 1] + CX [m − 1, k + 1] + CX [m − 1, k]

We still need to evaluate the above expression for all k. For each value of k, some terms in

the above expression will equal zero since CX [m, k] = 0 for k 6= 0.

When k = 0

CY [m, 0] = CX [m, 0] + CX [m, −1] + CX [m − 1, 1] + CX [m − 1, 0] = 2.

When k = 1

CY [m, 1] = CX [m, 1] + CX [m, 0] + CX [m − 1, 2] + CX [m − 1, 1] = 1.

When k = −1

CY [m, −1] = CX [m, −1] + CX [m, −2] + CX [m − 1, 0] + CX [m − 1, −1] = 1.

When k = 2

CY [m, 2] = CX [m, 2] + CX [m, 1] + CX [m − 1, 3] + CX [m − 1, 2] = 0.

A complete expression for the autocovariance is



2, k = 0;






CY [m, k] = 1, k = ±1;




 0, o.w.

Spring 2023 74
5.4 Stationary Processes

In general, for the stochastic process, X(t), there is a random variable X(t1 ) at every time

instant t1 with pdf fX(t1 ) (x) which depends on t1 . For a special class of random process

known as stationary processes fX(t1 ) (X) does not depend on t1 . That is, for any two time

instants t1 and t1 + τ

fX(t1 ) (x) = fX(t1 +τ ) (x) = fX (x)

5.4.1 Some properties of Stationary Processes

• If X(t) is a stationary process, and for a > 0, then

Y (t) = aX(t) + b is also a stationary process

• If X(t) is a stationary process, the expected value, the autocorrelation, and the auto-

covariance have the following properties for all t

(a) µX(t) = µX

(b) Rx (t, τ ) = Rx (0, τ ) = RX (τ )

(c) Cx (t, τ ) = RX (τ ) − µ2X = CX (τ )

Example 4

At the receiver of an AM radio, the received signal contains a cosine carrier signal at the

carrier frequency fc with a random phase θ that is a sample value of the uniform (0, 2π)

random variable. The received carrier signal is

X(t) = A cos(2πfc t + θ)

Spring 2023 75
What are the expected value and autocorrelation of the process X(t)?

Solution: The phase has P DF



 1/(2π), 0 ≤ θ ≤ 2π;

fθ =
 0,

o.w.

For any fixed angle α and integer k,



1
Z
E[cos(α + kθ)] = cos(α + kθ) dθ
0 2π
sin(α + kθ) 2π sin(α + 2kπ) − sin α
= 0
= =0
k k
(5.2)

We will use the identity cos A cos B = [cos(A−B)+cos(A+B)]/2 to find the autocorrelation:

RX (t, τ ) = E[A cos(2πfc t + θ)A cos(2πfc (t + τ ) + θ)]


A2
= E[cos(2πfc τ ) + cos(2πfc (2t + τ ) + 2θ)]
2

For α = 2πfc (t + τ ) and k = 2,

E[cos(2πfc (2t + τ ) + 2θ)] = E[cos(α + kθ)] = 0.

A2
Thus, RX (t, τ ) = cos(2πfc τ ) = RX (τ ).
2
Therefore, X(t) has the properties of a stationary stochastic

5.4.2 Wide Sense Stationary Stochastic Processes(WSS)

X(t) is a wide sense stationary stochastic process if and only if for all t,

E[X(t)] = µx , and RX (t, τ ) = RX (0, τ ) = RX (τ ).

Xn is a wide sense stationary random sequence if and only if for all n,

E[Xn ] = µx , and RX [n, k] = RX [0, k] = RX [k].

Spring 2023 76
In Example 4, we observe that µX (t) = 0 and RX (t, τ ) = (A2 /2) cos 2πfc τ Thus the random

phase carrier X(t) is a wide sense stationary process.

Properties of WSS

The autocorrelation function of a wide sense stationary process has a number of important

properties:

1. RX (0) ≥ 0

2. RX (τ ) = RX (−τ )

3. RX (0) ≥ RX (τ )

RX (0) has an important physical interpretation for electrical engineers.

The average power of a wide sense stationary process X(t) is RX (0) = E[X 2 (t)].

Quiz : Which of the following functions are valid autocorrelation functions?

1. R1 (τ ) = e−|τ |

2
2. R2 (τ ) = eτ

3. R3 (τ ) = e−τ cos τ

2
4. R4 (τ ) = e−τ sin τ

Example 5

A simple model (in degrees Celsius) for the daily temperature process C(t) is

2πn
Cn = 16[1 − cos ] + 4Xn
365

where xl , x2 , · · · is an iid random sequence of ℵ(0, 1) random variables.

Spring 2023 77
(a) What is the mean E[Cn ]?

(b) Find the autocovariance function CC [m, k].

Solution:

(a) The expected value of the process is


2πn 2πn
E[Cn ] = 16E[1 − cos ] + 4E[Xn ] = 16[1 − cos ]
365 365

(b) The autocovariance of Cn is


h h 2πm i h 2πm ii
CC [m, k] = E Cm − 16 1 − cos Cm+k − 16 1 − cos
 365 365
 16, k = 0;

= 16E[Xm Xm+k ] =
 0, o.w.

Example 6

A different model for the above example Cn is given as:

1
Cn = Cn−1 + 4Xn ,
2
where C0 , X1 , X2 , · · · is an iid random sequence of ℵ(0, 1) random variables

a) Find the mean and variance of Cn .

b) Find the autocovariance CC [m, k].

Solution:

By repeated application of the recursion Cn = Cn−1 /2 + 4Xn , we obtain


Cn−2 hX
n−1
i
Cn = +4 + Xn
4 2
Cn−3 hX
n−2 Xn−1 i
= +4 + + Xn
8 4 2
..
.
n
C0 h X
1 X2 i C
0
X Xi
= n + 4 n−1 + n−2 + · · · + Xn = n + 4
2 2 2 2 i=1
2n−1

Spring 2023 78
a) Since C0 , X1 , X2 , · · · all have zero mean,
n
E[C0 ] X E[Xi ]
E[Cn ] = + 4 =0
2n i=1
2n−1

b) The autocovariance is so complicated.

5.5 Random Signal Processing

Electrical signals are usually represented as sample functions of wide sense stationary stochas-

tic processes. We use probability density functions and probability mass functions to describe

the amplitude characteristics of signals, and we use autocorrelation functions to describe the

time-varying nature of the signals. In Practical equipment uses digital signal processing

to perform many operations on continuous-time signals, such equipment is known as an

analog-to-digital converter to transform a continuous-time signal to a random sequence. An

analog-to-digital converter performs two operations: sampling and quantization. Sampling

with a period Ts seconds transforms a continuous-time process X(t) to a random sequence

Xn = X(nTs ). Quantization transforms the continuous random variable Xn to a discrete

random variable Qn . Here, we ignore quantization and analyze linear filtering of random

processes and random sequences resulting from sampling random processes.

5.5.1 Linear Filtering of a Continuous-Time Stochastic Process

The relationship of the stochastic process at the output w(t) of a linear time invariant (LT I)

with impulse response h(t) filter to the stochastic process at the input of the filter v(t), is

the convolution:
Z ∞ Z ∞
w(t) = h(u)v(t − u)du = h(t − u)v(u)du.
−∞ −∞

Spring 2023 79
If the possible inputs to the filter are x(t), sample functions of a stochastic process X(t),

then the outputs, y(t), are sample functions of another stochastic process, Y (t). Because

y(t) is the convolution of x(t) and h(t), we adopt the following notation for the relationship

of Y (t) to X(t):
Z ∞ Z ∞
Y (t) = h(u)X(t − u)du = h(t − u)X(u)du.
−∞ −∞

Similarly, the expected value of Y (t) is the convolution of h(t) and E[X(t)].

hZ ∞ i Z ∞  
E[Y (t)] = E h(u)X(t − u)du = h(u)E X(t − u) du
−∞ −∞

5.5.2 Some Properties of LTI Systems

If the input to an LT I filter with impulse response h(t) is a W SS process X(t), the output

Y (t) has the following properties:

• Y (t) is also a W SS process with expected value


Z ∞
µY = E[Y (t)] = µX h(u)du,
−∞

and autocorrelation function


Z ∞ Z ∞
RY (τ ) = h(u) h(v)RX (τ + u − v)dvdu.
−∞ −∞

• X(t) and Y (t) are jointly wide sense stationary and have input-output cross-correlation
Z ∞
RXY (τ ) = h(u)RX (τ − u)du.
−∞

• The output autocorrelation is related to the input-output cross-correlation by


Z ∞
RY (τ ) = h(−u)RX (τ − u)du.
−∞

Spring 2023 80
Example 7

X(t), a wide sense stationary stochastic process with expected value µ = 10 volts, is the

input to a linear time-invariant filter. The filter impulse response is



 et/0.2 , 0 ≤ t ≤ 0.1 sec;

h(t) =
 0,

o.w.

What is the expected value of the filter output process Y (t)?

Solution:

Z ∞ Z 0.1
et/0.2 dt = 2 e0.5 − 1 = 1.3 volt

µY = µX h(t)dt =
−∞ 0

5.5.3 Linear Filtering of a Random Sequence

The random sequence Xn is obtained by sampling the continuous-time process X(t) at a

rate of 1/Ts samples per second. If X(t) is a wide sense stationary process with expected

value E[X(t)] = µX and autocorrelation RX (τ ), then Xn is a wide sense stationary random

sequence with expected value E[Xn ] = µX and autocorrelation function

RX [k] = RX (kTs )

The impulse response of a discrete-time If the filter has a sequence hn , n = · · · , −1, 0, 1, · · ·

and the output is a random sequence Yn , related to the input Xn by the discrete-time

convolution,

X
Yn = hi Xn−1
i=−∞

If the input to a discrete-time LT I filter with impulse response hn is a wide sense stationary

random sequence, Xn , the output Yn has the following properties.

Spring 2023 81
• (a) Yn is a wide sense stationary random sequence with expected value

X
µ = E[Yn ] = µX hn
n=−∞

and autocorrelation function



X ∞
X
RY [n] = hi hj RX [n + i − j]
i=−∞ j=−∞

• (b) Yn and Xn are jointly wide sense stationary with input-output cross-correlation

X
RXY [n] = hi RX [n − i]
i=−∞

• (c) The output autocorrelation is related to the input-output cross-correlation by



X
RY [n] = h−i RXY [n − i]
i=−∞

Example 8

A wide sense stationary random sequence Xn with µX = 1 and autocorrelation function

RX [n] is the input to the order M − 1 discrete-time moving-average filter hn where



4, n = 0;
 



 1/M, n = 0, · · · , M;
 

hn = and RX [n] = 2, = ±1;
 0,

o.w.




 0, |n| ≥ 2.

For the case M = 2, find the following properties of the output random sequence Yn : the

expected value µY , the autocorrelation Ry [n], and the variance V ar[Yn ].

Solution:

For this filter with M = 2

µY = µX (h0 + h1 ) = µX = 1.

Spring 2023 82
The autocorrelation of the filter output is
1 X
X 1
RY [n] = (0.25)RX [n + 1 − i]
i=0 j=0




 3, n = 0;



 2,

|n| = 1;
= (0.5)RX [n] + (0.25)RX [n − 1] + (0.25)RX [n + 1] =
0.5, |n| = 2.







 0,

o.w.

To obtain V ar[Yn ], we know that E[Yn2 ] = RY [0] = 3.

∴ V ar[Yn ] = E[Yn2 ] − µ2Y = 2.

Spring 2023 83
5.6 Power Spectral Density of a Continuous-Time Pro-

cess

AS you studied before, the functions g(t) and G(f ) have the Fourier transform pair:
Z ∞ Z ∞
−j2πf t
G(f ) = g(t)e dt, g(t) = G(f )ej2πf t df,
−∞ −∞

The table below provides a list of Fourier transform pairs.

Spring 2023 84
The power spectral density function of the wide sense stationary stochastic process X(t) is
" Z #
T
1 h
2
i 1 2
SX (f ) = lim E XT (f ) = lim E X(t)e−j2πf t dt .
T →∞ 2T T →∞ 2T −T

Physically, Sx (f ) has units of watts/Hz = Joules. Both the autocorrelation function and

the power spectral density function convey information about the time structure of X(t).
Z ∞ Z ∞
−j2πf τ
SX (f ) = RX (τ )e dτ, RX (τ ) = SX (f )ej2πf τ df,
−∞ −∞

 For a wide sense stationary random process X(t), the power spectral density Sx (f ) is a

real-valued function with the following properties:

1. SX (f ) ≥ 0, for all f .

R∞
2. −∞
SX (f )df = E[X 2 (t)] = RX (0)

3. SX (−f ) = SX (f )

Example 9

A wide sense stationary process X(t) has autocorrelation function RX (τ ) = Ae−b|τ | where

b > 0. Derive the power spectral density function Sx (f ) and calculate the average power

E[X 2 (t)]. To find Sx (f ), we use the above table, since RX (τ ) is of the form ae−a|τ | .

2Ab
SX (f ) =
(2πf )2 + b2

The average power is


2Ab
Z
2 −b|0|
E[X (t)] = RX (0) = Ae = df = A
−∞ (2πf )2 + b2

Figure 5.3 displays three graphs for each of two stochastic processes. For each process, the

three graphs are the autocorrelation function, the power spectral density function, and one

Spring 2023 85
Figure 5.3: Random processes V (t) and W (t) with autocorrelation functions Rv (τ ) = e−05|τ |

and Rw (τ ) = e−2|τ | are examples of the process X(t) in above Example. These graphs show

Rv (τ ) and Rw (τ ), the power spectral density functions Sv (f ) and Sw (f ), and sample paths

of V (t) and W (t).

sample function. For both processes, the average power is A = 1 watt. Note W (t) has a

narrower autocorrelation (less dependence between two values of the process with a given

time separation) and a wider power spectral density (more power at higher frequencies) than

V (t). The sample function w(t) fluctuates more rapidly with time than v(t).

5.7 Power Spectral Density of a Random Sequence

The spectral analysis of a random sequence parallels the analysis of a continuous-time pro-

cess. A sample function of a random sequence is an ordered list of numbers. Each number in

the list is a sample value of a random variable. The discrete-time Fourier transform (DTFT)

Spring 2023 86
is a spectral representation of an ordered set of numbers.

The sequence {· · · , X−2 X−1 x0 , X1 , x2 , · · · } and the function X(φ) are a discrete-time

Fourier transform (DTFT) pair if



X Z 1/2
−j2πφn
X(φ) = Xn e , Xn = X(φ)ej2πφn dφ,
−∞ −1/2

where φ is normalized frequency, f = φfs .

The power spectral density function of the wide sense stationary random sequence Xn is

X Z 1/2
−j2πφk
SX (φ) = RX [k]e , RX (k) = SX (φ)ej2πφk df.
k=−∞ −1/2

The properties of the power spectral density function of a random sequence are similar to

the properties of the power spectral density function of a continuous-time stochastic process.

1. SX (φ) ≥ 0, for all f .

R 1/2
2. −1/2
SX (φ)dφ = E[Xn2 ] = Rf X[0]

3. SX (−φ) = SX (φ)

4. For any integer n, SX (φ + n) = SX (φ).

Example 10

The wide sense stationary random sequence Xn has zero expected value and autocorrelation

function 
 σ 2 (2 − |n|)/2, n = −1, 0, 1;

RX [k] =
 0,

o.w.
Derive the power spectral density function of Xn .

Spring 2023 87
Solution:

We have
1
X
SX (φ) = RX [n]e−j2πnφ
n=−1
h (2 − 1) 2 (2 − 1) −j2πφ i
= σ2 ej2πφ + + e
4 4 4
σ2  
= 1 + cos(2πφ)
2

Spring 2023 88

You might also like