homework of data analysis

2
System Identification and Data Analysis Homework # 1 Exercise 1. 1. For N points x i (with N at least 100), equally spaced between 1 and 10, simulate the random variables y i = A cos (ωx i + φ)+ e i , i =1,...,N with A = 5, ω =2π and φ = π 4 , where the e i are independent random variables from the Gaussian distribution N (0, 4). 2. Assuming that ω and φ are known, compute the least squares estimate of A, based on the data simulated in point 1. Plot the obtained model y = ˆ A LS cos (ωx i + φ) and compare it with the data points (x i ,y i ). Repeat the estimation on different data realizations. 3. Repeat point 2, with new data sets such that e i N (0, 0.01). Which differences do you notice? 4. Simulate a new set of data, so that the first half of the random variables e i have variance equal to 1 and the last half have variance equal to 0.01. Assuming that ω and φ are known, compute the minimum variance linear estimate of A based on the simulated data. Compare it with the least squares estimate. Which differences do you notice? Explain. 5. Now assume that both A and φ are not known. Using the same data set generated in point 1, try to estimate simultaneously A and φ. Which kind of problem is this? Find a meaningful approximate technique to solve the estimation problem.

Upload: andrew-garza

Post on 16-Apr-2017

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Homework of data analysis

System Identification and Data Analysis

Homework # 1

Exercise 1.

1. For N points xi (with N at least 100), equally spaced between 1 and 10, simulate

the random variables

yi = A cos (ωxi + φ) + ei , i = 1, . . . , N

with A = 5, ω = 2π and φ =π

4, where the ei are independent random variables

from the Gaussian distribution N(0, 4).

2. Assuming that ω and φ are known, compute the least squares estimate of A, based

on the data simulated in point 1. Plot the obtained model y = ALS cos (ωxi + φ)

and compare it with the data points (xi, yi). Repeat the estimation on different

data realizations.

3. Repeat point 2, with new data sets such that ei ∼ N(0, 0.01). Which differences do

you notice?

4. Simulate a new set of data, so that the first half of the random variables ei have

variance equal to 1 and the last half have variance equal to 0.01. Assuming that ω

and φ are known, compute the minimum variance linear estimate of A based on the

simulated data. Compare it with the least squares estimate. Which differences do

you notice? Explain.

5. Now assume that both A and φ are not known. Using the same data set generated

in point 1, try to estimate simultaneously A and φ. Which kind of problem is this?

Find a meaningful approximate technique to solve the estimation problem.

Page 2: Homework of data analysis

Exercise 2.

1. Simulate a sequence of independent two-dimensional random vectors ei, i = 1, . . . , N ,

with N = 100, such that ei are Gaussian random variables with E[ei] = 0 and

E[eieTi ] =

2 1

1 1

.

2. Simulate a sequence of one dimensional independent random variables xi, uniformly

distributed in the interval [−1, 1] and independent from variables ei. Then, define

the sequence of two-dimensional random vectors yi such that

y1,i = xi + e1,i

y2,i = 3xi + e2,i

for i = 1, . . . , N. (1)

3. By using equations (1) and the statistical properties of the involved random va-

riables, compute the LMSE estimator of the random variable x based on a single

measurement of the vector y = [y1 y2]′, and the corresponding MSE.

4. Now assume that the equations (1) and the statistical properties of the random

variables are not known, but only the simulated sequences xi and yi are availa-

ble. Compute the LMSE estimator by calculating the necessary sample means and

covariances. Compare the resulting estimator with that obtained at point 3.

5. Repeat point 4 by simulating a data sequence of length N = 10000. What are the

main differences? Explain.