covariance example
-
Here is a data set.
This is an ascii file. Right click on it and "save as" a
text file. It contains 38 traces each with 2170 samples. Each trace
is an independent realization of a random time series. Read in the
data set and take just the first 500 samples of each trace, to
speed things up.
-
OK, now you have a matrix with 38 columns and 500 rows. Compute
the sample covariance of this data set. You will first need to
compute the sample mean. The formulae are given at the end
of section 6.10 in the notes.
-
Now suppose you only had one trace, say, the first. Now implement
the formula for the approximate covariance (equation 6.63) and see
how this compares to the sample covariance matrix.
Not sure if you will need this or not, but
here is a matlab function that takes a length l
vector and paritions it into
an n by m matrix, where l = n x m. This function should work under
scilab too, but I haven't tried it.