EE 6333/6307 assignment 3 (Random Processes)
Instructions
1. You may use the problems for practice before midsem.
2. Coding questions (7-10) can be attempted after midsem. The codes for those questions
and the resulting figures, along with your comments (if asked), need to be submitted.
Question 1. A random sequence is given by the stochastic difference equation,
Y ( n ) = X ( n ) − X ( n − 1),
where X (k ) is a zero mean WSS process for all k. Is Y (n) WSS?
Question 2. A random sequence is described by the stochastic difference equation,
Y (n) = W (n) + αW (n − 1),
where W (k) is a zero mean white noise with variance σ2 for all k.
(a) Find mean E[Y (n)].
(b) Is Y (n) WSS?
(c) If Y (n) is WSS, find autocorrelation RYY (τ ) for all possible τ.
(d) Find the power spectral density SYY (ω ).
Question 3. A random process, X (t) is described by,
X (t) = a + bt,
where a, b are zero mean uncorrelated random variable with unit variance. Find,
(a) the mean vector E[ X (t1 ) X (t2 ) . . . X (tn )] T ,
E[ X (t1 ) X (t1 )] E[ X (t1 ) X (t2 )] . . . E[ X (t1 ) X (tn )]
E[ X (t2 ) X (t1 )] E[ X (t2 ) X (t2 )] . . . E[ X (t2 ) X (tn )]
(b) the covariance matrix,P= .
.. .. . . ..
. . . .
E[ X (tn ) X (t1 )] E[ X (tn ) X (t2 )] . . . E[ X (tn ) X (tn )]
Question 4. Autocorrelation of a WSS process is given by,
( |τ |
σ2 1 − T , if|τ | ≤ T,
R XX (τ ) =
0, if|τ | > T.
Find the power spectral density.
Question 5. A professor gives tests that are hard, medium, or easy. If he gives a hard
test, the next test will either be medium or easy with equal probability. However, if he
gives a medium or easy test, there is a 0.5 probability that the next test will be of the same
difficulty, and a 0.25 probability for each of the other two levels of difficulty. Construct a
Markov chain and find the steady state probabilities.
Figure 1: Markov Chain in Question 6.
Question 6. In a Markov Chain, the set of states that are all accessible from each other, and
no state outside of that set is accessible from them, is called a recurrent class. The Markov
chain in Fig. has two recurrent classes, R1 = {1, 2}, and R2 = {5, 6, 7}. Assuming initial
state, X0 = 3, find the probability that the chain gets absorbed in R1 . (Hint: Redraw the
Markov chain replacing each recurrent class as an absorbing state.)
Question 7. Consider a random process defined by the following stochastic difference
equation,
Y ( k ) = θ + V ( k ),
where θ is a constant (θ = 5) and V (k ) is a zero-mean Gaussian random process with unit
variance.
(a) Simulate this process for 10000 data points (n = 1, 2, ..., 10000) and 10000 realizations.
Save this in a 10000x10000 matrix (where columns represent time instants and rows rep-
resent realizations, each column element is the value that a random variable takes at a
particular time instant). You may use randn in MATLAB and a similar function in the
Python numpy library for simulating V (k ).
(b) Plot the histogram of any column in this matrix. This represents the statistical PDF of
the random variable in a particular time instant. (use hist in matlab).
Question 8. (a) Find the mean vector of this random process by taking the mean of the
random variables at each time instant. Plot any realization of the random process (any
row of the matrix) and the mean vector against time instants in a single figure.
(b) Calculate the autocorrelation, R xx (i, j) = E(Yi Yj ) for different values of i and j keeping
|i − j| = 1. To do this you may do elementwise multiplication of ith and jth time instant
column and take mean. Plot R xx (i, j) with respect to i and take Y-axis limit from 0 to 50.
(c) Comment on stationarity of this random process.
Question 9. (a) Take a single realization of this process (any row of the matrix) as data.
1
Find the time average of this data, Ȳ = 10000 ∑10000
i =1 Y ( i ).
1 10000−(i − j)
(b) Find the time-averaged autocorrelation, r xx (i, j) = 10000 ∑ i =1 Y (i )Y ( j) for |i −
j| = 1.
(c) Comment on ergodicity of this random process.
2
Question 10. (a) Define estimator-1, θ̂1 = N1 ∑ Y (k) and estimator-2, θ̂2 = Y (0). Use the
data in Question 9(a) to find θ̂1 and θ̂2 .
(b) Check the performance of these two estimators statistically. Find θ̂1 and θ̂2 for all the
10000 realizations of the process and save them in two arrays. Plot histogram of these two
arrays. Also find mean and variance of these two arrays. Which one is the more efficient
estimator?