EE7401 Probability and Random Processes
EE7401 Probability and Random Processes
Random Processes
Anamitra Makur
Office: S1-b1c-103
Phone: 4013
Email: [email protected]
Basic application
Random walk and Wiener process. Thermal noise. Shot noise. Modulation, bandlimited process,
sampling expansion.
Ergodicity
Time average. Mean ergodic process, Slutsky’s theorem. Discrete-time case. Covariance ergodic
process. Distribution ergodic process. Measurement of power spectrum, autocorrelation estimate of
power spectrum, periodogram estimate.
Stochastic Process
Random variable x takes a value for every outcome of an experiment.
Stochastic process x(t ) takes a function of time for every outcome
ζ of an experiment.
x(t )
x(t ) : an ensemble of 2
1
time functions t
3
2 F ( x1 , x2 ; t1 , t2 )
second order density f ( x1 , x2 ; t1 , t2 )
x1x2
autocorrelation
Rxx (t1 , t2 ) E{x(t1 )x (t2 )} xx
*
1 2 f ( x1 , x2 ; t1 , t2 )dx1dx2
1
but E{cos(t φ)} cos(t ) 2 d 0
(t ) 0
1 E {r 2 } Rxx ( )
2
2
2π - cos-1x
P{cos y x}
P{cos 1 x y 2 cos 1 x}
for 0 cos 1 x , 1 x 1
2 2 cos 1 x since uniform
2
cos 1 x
1
1
F ( x, t ) 1 cos x 1 x 1 0.8
1 1 x
0.6
F(x,t)
0.4
0.2
0
F(x,t) independent of t
-1.5 -1 -0.5 0 0.5 1 1.5
x
2.5
1 | x |
2
0
f ( x, t )
1.5
1
| x | 1
f(x,t)
1
1 x
2
0.5
Poisson Process
Place points t i at random on the entire t axis such that on an
average there are λ points per unit time.
x x x x x x x t
ti
ak
using Taylor series expansion, e a
k 0 k!
d 2e a
k (k 1)a k 2
da 2 k 1
k!
1 ak 1 ak
ea
a2
k2
k 1
k! a 2
k
k 1 k!
ak
ea a k
k
but k
k 1 k!
ea k
k 1 k!
ea a
1 2 a 1
ea 2
a
k 1
k
k! a
2 ea a
ak
k2 ea a ea a 2
k 1 k!
therefore Rxx (t , t ) E{x 2 (t )} a a 2 t 2t 2
i j
for t1 t2 t , C xx (t , t ) variance of x (t )
C xx (t1 , t2 )
correlation coefficient r (t1 , t2 )
C xx (t1 , t1 )C xx (t2 , t2 )
Stationary Process
Strict-Sense Stationary (SSS): statistics does not change with time
f ( x1 ,K , xn ; t1 ,K , tn ) f ( x1 ,K , xn ; t1 c,K , tn c) c
Two processes x(t ) and y (t ) are called jointly WSS if each is WSS
and Rxy (t , t ) Rxy ( )
Example 1 (contd.)
Show that x(t ) cos(t φ) with ( ) E{e jφ }, (1) (2) 0
is WSS. Find E{x(t )} and Rxx ( ) .
1 1
E{cos(2t 2φ )} cos( )
2 2
1 1
Re e2 jt j E{e2 jφ } cos( )
2 2
1 1 1
Re e 2 jt j 2 cos( ) 0 cos( )
2 2 2
1
e x / 2 Rxx ( t ,t )
2
But f ( x, t )
2Rxx (t , t )
2Rxx (t , t )
1 2
Ie 2
a Rxx ( t ,t )
1 2
If x(t ) is stationary, then Rxx (t1 , t2 ) Rxx ( ) , and y Ie 2
a Rxx ( 0 )
I f ( x1 , x2 ; )dx1dx2
2 a ( x1 x2 )
e
x12 2 rx1 x2 x22
a ( x1 x2 )
I2
2R
2 (1 r 2 ) Rxx ( 0 )
e dx1dx2
xx ( 0) 1 r
2
( x1 ) 2 2 r ( x1 )( x2 ) ( x2 )2 2
a Rxx ( 0 )(1 r )
I2
2R
2 (1 r 2 ) Rxx ( 0 )
e dx1dx2
xx ( 0) 1 r
2
for any a1 , a 2 , x1 (t ), x 2 (t )
If x(t ) is WSS, then x(t ) and y (t ) are jointly WSS: x , y , Rxx , Ryy , Rxy
Fundamental theorem:
E L x(t ) E
x(t )h( )d
xh( ) f ( x, t )d dx
h( ) xf ( x, t )dx d
but xf ( x, t )dx E x(t ) x (t )
x (t )h( )d
L x (t ) L E{x(t )}
Special case: if x(t ) is white noise, then Rxx (t1 , t2 ) q (t1 ) (t1 t2 )
It follows that E{| y (t ) |2 } q (t ) | h(t ) |2
x (t ) x(t ) d () z (t ) z (t )
t
dt t
differentiator
d
here L
dt
Anamitra Makur School of Electrical & Electronic Engineering 34
So Rzz (t1 , t2 ) L1 L2 Rxx (t1 , t2 )
2
Rxx (t1 , t2 )
t1t2
2t1 U (t1 t2 )
t1
2 (t1 t2 )
For t1 t2 , Rzz ( ) 2 ( )
S zz ( ) 22 ( ) Hence z (t ) at
least WSS
d d d
E{z (t )} E x(t ) E{x(t )} t
dt dt dt
Anamitra Makur School of Electrical & Electronic Engineering 35
0 c T t
Rxx (t1 , t2 )
0 min(t1 , t2 ) 0 0 min(t1 , t2 ) 0
1 2 1
min( t ,t ) t / T 0 min(t1 , t2 ) T , t1 t2
1
dc 0 min(t1 , t2 ) T
0 T t2 / T 0 min(t1 , t2 ) T , t2 t1
T1 1 T min(t1 , t2 )
dc T min(t1 , t2 )
0 T
y (t )
(ii)
0 c T t
(t t ) / T 0 t1 , t2 T
1 2
0 else
Rxx (t1 , t2 )
t1
U (t1 ) U (t1 T )U (t2 t1 )
T
0 t1 T t1 t 2
t2
U (t2 ) U (t2 T )1 U (t2 t1 ) U (t1 T )U (t 2 T )
T
0 t2 T t 2 t1 T t1 ,t 2
d 2
y (t ) x(t ) Ryy (t1 , t2 ) Rxx (t1 , t2 )
dt t1t2
Anamitra Makur School of Electrical & Electronic Engineering 39
Rxx (t1 , t2 )
t1
t1
U (t1 ) U (t1 T )U (t2 t1 )
t1 T
t2
U (t2 ) U (t2 T )1 U (t2 t1 ) U (t1 T )U (t2 T )
t1 T t1
1
U (t1 ) U (t1 T )U (t2 t1 ) t1 (t1 ) (t1 T )U (t2 t1 )
T T
1 U (t1 ) U (t1 T ) (t 2 t1 )
t
cancels each other
T since t1 = t2
U (t 2 ) U (t 2 T ) (t 2 t1 ) (t1 T )U (t2 T )
t2
T
Anamitra Makur School of Electrical & Electronic Engineering 40
1
U (t1 ) U (t1 T )U (t2 t1 ) t1 (t1 )U (t2 t1 )
T T
t1 zero since t1 = 0
(t1 T )U (t 2 t1 ) (t1 T )U (t 2 T )
T
cancels each other
since t1 = T
U (t1 ) U (t1 T )U (t 2 t1 )
1
T
1
U (t1 ) U (t1 T )U (t2 t1 )
t2 T
1
U (t1 ) U (t1 T ) (t 2 t1 ) which is same as before
T
Existence theorem:
If ( ) = , ω has density fω ( ) and φ is uniform in –π,π
then ( ) = { ( + ) ∗ ( )} = { }
d
a 2 e j fω ( )d 2 a 2 f ω ( ) e j
2
S xx ( ) 2a 2 f ω ( ) where a 2 Rxx (0)
S ( )
Thus, choosing fω ( ) for some S ( ) 0,
2 Rxx (0)
and ( ) = would make S xx ( ) S ( )
Rxx ( ) * h* ( )
Therefore S xy ( ) S xx ( ) H * ( ) where H ( ) h(t )e jt dt
S xx ( ) H ( )
2
S xx ( ) H * ( ) S xy ( ) S xx ( ) H * ( ) H ( ) S yy ( ) S xy ( ) H ( )
S xx ( ) q flat
S yy ( ) q H ( )
2
S xx( ( ) j sgn S xx ( )
x(t ) z (t )
2U ( )
2S xx ( ) 2 jS xx( ( )
Wiener-Khinchin theorem:
d
E{| x (t ) |2 } Rxx (0) S xx ( ) 0
2
It follows that Sxx(ω) ≥ 0
Property of correlation:
d
Now Rxx ( ) S xx ( )e j
2
d d
| Rxx ( ) | | S xx ( )e j | S xx ( ) Rxx (0)
2 2
Thus, | Rxx ( ) | Rxx (0) or Rxx ( ) is maximum at the origin.
E | x(t 1 ) x (t ) |2 E | x(t ) |2
x[n] is white noise if x[n1 ] and x[n2 ] are uncorrelated for any n1 n2
1, n 0
Therefore Rxx [n1 , n2 ] q[n1 ] [n1 n2 ] , where [n]
0, n 0
Anamitra Makur School of Electrical & Electronic Engineering 52
If x[n] and y[n] are input and output to a linear system, then
y[n] x[n] h[n] x[n k ]h[k ]
k
where h[n] is the impulse response of the system, h[n] L [n]
S xy ( )
cross power spectrum Rxy [m] DTFT
S xxc ( )
covariance spectrum C xx [m] DTFT
DTFT is a special case of z-transform (on the unit circle)
z-transform version: Rxx [m ]
zT
S xx ( z ) R
m
xx [m ]z m
S xx ( ) and S xx ( z ) are different. On unit circle z e j
S xx ( e j ) S xx ( )
Linear system:
impulse resp. freq. response transfer function
h[n ] H ( )
DTFT
h[n ]
zT
H( z ), H( e j ) H ( )
S xy ( ) S xx ( ) H * ( ) S xy ( z ) S xx ( z )H( z 1 )
h[n] real
S yy ( ) S xx ( ) | H ( ) |2 S yy ( z ) S xx ( z )H( z )H( z 1 )
real white
noise x[n] y[n]
h[n] y[n] x[n] ay[n 1]
a n , n 0 1
h[n] H( z) a 1 for stability
0, n 0 1 az 1
1 S xx (e j )
Then S yy (e j ) S xx (e j )
1 ae 1 ae
j j
1 2a cos a 2
q q 1 az
or S yy ( z ) 1 az 1 1 az
1 az 1 az
1
1 a2
1
Now
1 az 1
k 0
a k k
z
k 0
a z k
k
1 1
az 1
1 al z l 1 al z l ak z k a z k
k
Also
1 az 1 az l 0 l 1 k k
q
Thus S yy ( z )
1 a2
a
k
k
z k
But S yy ( z ) R
k
yy [k ]z k
q
Therefore Ryy [m] am
1 a 2
a0 a0
m m
q
Ryy [0] E{y 2 [n]} where q Rxx [0] E{x 2 [n]}
1 a2
x(t)
x(t) is a stochastic process
called the random walk s
t
T
h h h t t t h t t
n k n k 1
p q e ( k np ) / 2 npq
2
For large n and k ≈ np ,
k 2npq
1
P{x( nT ) ms} e ( m / 2 ) /( 2 n / 4 ) since m 2k n
2
2 (n / 4)
which is like a normal density in m/2 with mean 0, variance n/4
m/2 (m / 2) / n / 4
therefore P{x(nT ) ms} N (0, n / 4)
N (0,1)
Substituting w = ms and t = nT , or
m m w/ s w
2 n/4 n t / s t
w / t
P{w (t ) w} N (0,1)
1
Or, the first-order density of w(t) is f ( w, t ) e w / 2t
2
E{w (t1 )[w (t 2 ) w (t1 )]} E{w (t1 )}E{w (t2 ) w (t1 )}
which is 0 since E{w (t )} 0
t1s 2
Therefore in this case Rww (t1 , t2 ) E{w 2 (t1 )} t1
T
Thermal Noise
Noise due to thermal agitation of atoms above 0oK
Reactive elements assumed noiseless
Resistors replaced by noiseless resistor in parallel with a current
source
ni (t ) R
ni (t ) is a normal process, zero-mean, white
2kT k Boltzmann constant
Sni ni ( )
R T Temperature in oKelvin
V ( ) output voltage
H ( ) in reverse mode
I ( ) input current
V ( )
2
I ( ) Re Z( j )
2
Therefore
R
H ( ) R Re Z( j )
2
or
kT Z( j ) Z ( j )
but Z ( j ) Z( j )
kT Z( j ) Z( j )
Therefore Rvv ( ) kT z ( ) kT z ( )
since z (t ) is inverse transform of Z( s ),
then z ( t ) is inverse transform of Z( s ) .
Shot Noise
s(t ) h(t t i ) where h(t) is a real function, t i are a set of
i
Poisson points with average density
s(t ) is shot noise.
S zz ( ) 2 ( )
2
(earlier result, Poisson impulses)
S ss ( ) S zz ( ) H ( )
2
Therefore
2 2 H ( ) ( ) H ( )
2 2
2 2 H 2 (0) ( ) H ( )
2
so s2 h 2 (t )dt
Note:
Re z (t ) x(t ) a(t ) cos(0t ) b(t )sin(0t ) r (t ) cos 0t φ(t )
Im z (t ) y (t ) b(t )cos(0t ) a(t )sin(0t ) r (t )sin 0t φ(t )
2 Raa ( ) 2 jRab ( )
Rzz ( ) E{w (t )e j0 ( t ) w (t )e j0t }
Rww ( )e j0
Bandlimited Process
x(t ) is bandlimited if Rxx (0) (finite power)
and S xx ( ) 0 for | | (limited spectral width)
n 0 n!
H1 ( ) j , differentiator
n
Thus x(t ) x( n ) (t )
n 0 n!
Anamitra Makur School of Electrical & Electronic Engineering 75
d
2 S xx ( ) 2 sin 2
2 2
2 2 d
2 2
4 S xx ( ) since sin or sin 2
4 2 2 2 2 4
and S xx ( ) 0
d
S
xx ( ) 2 2
2
2 2 Rxx (0)
Sampling Expansion
x(t ) x(t ) F 1 e j
1
sin ( nT )
an
2
e j e jnT d
( nT )
output y (t ) y f (t ) y v (t )
y f (t )
f (t ) h( )d , Y f ( ) F ( ) H ( )
d
F ( ) H ( )e Similarly, y v (t ) v (t ) h(t )
jt
2
Anamitra Makur School of Electrical & Electronic Engineering 80
2
y f (t0 )
Output sampled at t t0 , when SNR is r 2
2
E{y v2 (t0 )}
Find h(t) to maximize r
Colored noise: 2
F ( ) jt
2
jt0 d d
F ( ) H ( )e 2 Svv ( ) e 0 Svv ( ) H ( ) 2
r
2
E{y 2v (t0 )} E{y 2v (t0 )}
2
F ( )e jt0 d
2 d
Svv ( ) 2 Svv ( ) | H ( ) | 2
E{y 2v (t0 )}
d d
but E{y 2v (t0 )} R yv yv (0) S yv yv ( )
Svv ( ) | H ( ) |2
2 2
Anamitra Makur School of Electrical & Electronic Engineering 81
*
F ( ) d F ( ) jt0
2
So r
2
, equality if k e Svv ( ) H ( )
S ( ) 2
vv Svv ( )
F ( ) jt0
*
for some constant k, or H ( ) k e
Svv ( )
White noise:
If v(t ) is white noise, Svv ( ) S0 and H ( ) k F ( )e jt0
or h(t ) k f (t0 t )
Thus, optimum filter impulse response is (scaled, shifted) time-
reversed signal hence, matched filter.
Colored noise from white noise (using innovations):
(2nd edition, chap.10-5, p.300)
v (s) H1 ( )
x(t ) x1 (t ) y (t )
Anamitra Makur School of Electrical & Electronic Engineering 82
x(t ) f (t ) v (t ) with v(t) colored noise having psd Svv ( )
1
Use a whitening filter v ( s ) such that Svv ( )
| v ( j ) |2
from slide 34
Now, mean square estimation error
e E y (t ) f (t )
2
E y (t ) f (t ) y (t )
f v
2
2
y f (t ) f (t ) E{y v2 (t )} b 2 2
E{v 2 (t )} e
em b2
Typical behavior
2
T
1
2 t
3
time average
ensemble
average
T
1
ηT is a random variable, E ηT E{x(t )}dt
2T T
Therefore, ηT is an estimate of .
| |
2T 2T
1 2
T2 Cww (0)
2T 2T Cxx ( )1 2T d 2T C
0
xx ( ) 1
2T
d
2T
1
Thus, x(t) is mean-ergodic iff
T 0
C xx ( ) 1
2T
d 0 as T
T
Slutsky’s Theorem: mean-ergodic 1 Cxx ( )d 0 as T
T 0
Proof: ( ) mean-ergodic means T 0 as T
Anamitra Makur School of Electrical & Electronic Engineering 89
1 T
So E{ ηT x(0) } E x (t ) x (0) dt
2T T
T T
E x (t ) x (0) dt
1 1
2T T 2T T
C xx (t )dt
but E 2 ηT x (0) E ηT E x(0) T2C xx (0)
2
2
T
1
Therefore C xx ( )d T C xx (0) 0 as T
T 0
2T
T
T 0
2 T0 2T
1 1
T
0
C xx ( ) 1
2T d C xx ( ) 1
T 2T0 2T
d I1 I 2
2 T0
1
I1
T C
0
xx (0) 1
2T
d since | C xx ( ) | C xx (0)
2 T0
1 2T0
T C
0
xx ( 0) 1 d
T
C xx (0) 0 as T
1
2T
1
2T
2T
I2
2T 2 Cxx ( )(2T )d 2T 2 2T0
C xx ( ) dt d
2 T0 t
t
1
2T t 1
2T 2T
2 xx I dt
C ( )d dt 3
2T t 2T0 2T0 2T 2 2 T0 2T0
1
T 2T0 2T t
T 0
now, given C xx ( )d 0 as T
c c
1 1 1 0
c1 0 c0 0
C xx ( ) d C xx ( )d for c1 c0
c c
1 1 1 0
c1 c0 c0 0
or C xx ( ) d C xx ( )d
c t
1 1 1
c1 c0
then C xx ( )d , or C xx ( )d , c c0 , t c
tc
t
So, choosing 2T0 c0 , I 3 C
2 T0
xx ( )d t
1
2T
T02
then I 2 tdt 1 2 as T
2 2
( 4T 4T0 )
2T 2 2 T0
4T 2 T
Thus, T2 I1 I 2 as T .
Since is arbitrary, T 0 as T .
Anamitra Makur School of Electrical & Electronic Engineering 93
d
now Cww (0) S ( )
2 c
2
T ww
sin(T )
2
T
sin 2 (T ) d sin 2 (T )
so, T2 S xxc ( ) As T large, 0 for 0
T
2 2
2 T
2 2
1
So, T2 S xxc (0)
0 as T if S xxc (0) is finite, i.e., S xxc ( )
2T
does not have an impulse at 0 [S xxc ( ) is continuous at origin].
Discrete-time Process:
1 M
1 2M
|m|
ηM
2 M 1 n M
x[ n ], 2
M
2 M 1 m 2 M
C xx [m ]1
2M 1
1 M
x[n] is mean-ergodic iff Cxx [m] 0 as M
M m 0
Anamitra Makur School of Electrical & Electronic Engineering 94
Covariance-Ergodic Process:
Assume x(t) zero-mean, then time average estimate of C xx ( ) is
T
1
CT ( )
2T z (t )dt
T
where z (t ) x(t )x(t )
T
1
T 0
x(t) is covariance-ergodic iff C zz ( )d 0 as T
Distribution-Ergodic Process:
1, x(t ) x
Let y (t ) U x x(t )
0, x(t ) x
then E{y (t )} P{x(t ) x} F1 ( x)
Thus, F1 ( x) estimated by the time average of y(t):
T
1
2T T
FT ( x) y (t )dt
T
1
T 0
and x(t) is distribution-ergodic iff C yy ( )d 0 as T
Assume covariance-ergodic
T
1
Rxx ( ) x t x t dt
2T T 2 2
xt xt
2 2
T T 0 T T t
2 2
Integrand available only in the interval T t T , 0
2 2
T / 2
1
2T T / 2 2 2
Option 1: RT ( ) x t x t dt
Periodogram estimate:
Take Fourier transform of the available signal,
T
x(t )e
jt
XT ( ) dt
T
1
Then power spectrum is ST ( ) | XT ( ) |2
2T
Anamitra Makur School of Electrical & Electronic Engineering 99
1
xT ( ) xT ( )
2T
1
Taking Fourier transform, ST ( ) XT ( ) XT ( )
2T
31
state probabilities pi [n] P{x n ai } i 1, 2,...
P[1] P
or P is an eigenvector of the transition matrix
CK equation becomes ij ( ) ir ( ) rj ( )
(where t3 t2 ) r
In vector form ( ) ( ) ( ) , 0
1 i j 0 i j
Also ij (0) [i j ] ij
0 i j 0 i j
11 L 1n
define (0 ) M O M
n1 L nn
Differentiate CK equation with respect to α,
( ) ( ) ( )
Set α=0, ( ) ( ) (0)
It follows from p (t )
i
i 1 ij (t1 , t2 ) p j (t2 ) that
P (t ) P (t ) ( )
Differentiate with respect to τ, P(t ) P(t ) ( )
Two states a1 A, a2 A t
−A
Given
11 (t ) P{x(t t ) A | x(t ) A} 1 1t
22 (t ) P{x(t t ) A | x(t ) A} 1 2 t
we can find 12 (t ), 21 (t ) and hence ij ij :
12
1 1
11 A −A 22 (0)
2 2
21
1 1
P(t ) P(t ) (0) [ p1 (t ) p2 (t )] [ p1 (t ) p2 (t )]
2 2
Anamitra Makur School of Electrical & Electronic Engineering 113
p1 (t ) 1 p1 (t ) 2 p2 (t )
( 1 2 ) p1 (t ) 2 since p2 (t ) 1 p1 (t )
2
Solution: p1 (t ) ce ( 1 2 ) t for some c
( 1 2 )
2 ( 1 2 ) t 2
p1 (t ) p1 (0) e
1 2 1 2
( 2 1 ) A
Mean: E{x(t )} p1 A p2 ( A)
1 2
Autocorrelation: P{x(t ) a j , x(t ) ai } pi ij ( )
E{x(t ) x(t )}
A2 p1 11 ( ) p2 22 ( ) A2 p1 12 ( ) p2 21 ( )
A2 ( p1 p2 ) 2 4 p1 p2 e ( 1 2 )
2 4 A2 p1 p2 e ( 1 2 )