Search for question
Question

3. (3 points) Let ER denote a random signal that is uniformly distributed in [-1,2]. Suppose that we

have observation of the following measurement:

X=tanh(9)+W

(5)

where tanh(u) :=, and W is a random noise that has zero mean Gaussian distribution with

variance one. The signal and the noise W are statistically independent. In this problem, we will

obtain the linear MMSE estimator of using the observation of X. Since it is not easy to obtain the

coefficients of the linear MMSE estimator analytically, we will use MATLAB simulations (or Python

simulations) to approximate them.

(a) Using MATLAB or Python, generate 1000 independent samples of (X, O, W); call them (21,01,w₁),

(F2, 0₂, W₂) (1000, 1000, 1000). For MATLAB, you can use rand and randn functions to gener-

ate independent samples of uniform random variables and Gaussian random variables respectively.

Specifically, if we type

>> T = 3*rand (1000, 1)-1

>> W = randn (1000, 1)

MATLAB will generate a 1000-dimensional vector T consisting of 1000 i.i.d. random variables

that are uniformly distributed between 1 and 2 and a 1000-dimensional vector W consisting of

1000 i.i.d. zero mean Gaussian random variables with the variance equal to one (in addition, T

and W are also independent). You can use these commands to first generate (0₁, ₁), (0₂, W₂)...

(1000, 1000). Then, you can use these in conjunction with the measurement equation (5) to

generate #1, #2, 1000 as follows:

2ị= tanh(0) +M, ấ=1,2,..., 1000.

For Python, you can use the Numpy library (please check the last page of this problem set for

more information.)

Use these samples to obtain the sample means, sample variance, and sample covariance as follows:

=

1000-1

μx =

0₁.

It.

1000 1000

1000

de,x=-1(0; – μе)(¹¡— μ¹x).

(x₂ − μ^x)².

6 = –

1000

Use the above sample statistics to obtain an approximation of the linear MMSE estimator:

Pappraz (2) = μ + ³x (2-x). Provide an approximation of the MSE we can achieve us-

ing this estimator (provide a justification)./n(b) Using MATLAB or Python, generate another set

of 1000 independent samples of (X, O,W):

call them (21001, 01001, W1001), (21002, 01002, 21002) (22000, 2000, 2000). Use these samples to

numerically evaluate the estimation performance of approx (-). In particular, compute the average

squared estimation error:

2000

Σ (0; – Happro(ma))".

in1001

Is it close to your approximation of the MSE from part (a)?

1

1000

Fig: 1

Fig: 2