I have a time series model y(t)= h^T y(t-1) + n(t)
where n(t) is a white Gaussian noise that excites and drives the process. y
is the output of a linear regression model for t = 1,2,...
denoting the number of data points.
Question: If the Correlation matrix is Ryy = E[y(t)*y(t)^T],
then is it possible to compute Correlation of the lagged random variables such as
[E[y(t-1)*y(t-1)']]
In general, these operators and expressions are also found in:
Slide2 mentions the Autocorrelation matrix. In the formula, there is the Expectation operator. So how do I implement the expectation of the product of the lagged random variable with itself and other such expressions without using the inbuilt commands?
I am unable to implement these kind of formulae. Please help.
Thank you for any explanation!
UPDATE: After doing multiple revisions to this Question, it has boiled down to another Question asked Matlab: Calculating Correlation of time series . So, these two Questions have become duplicate.
Here is a sample code
y = randn(10,1);
for t = 1:10
disp(y(t));
end
Expectation_y = sum(y(1:end))/10 % this give a scalar
Mean_y = mean(y); % This returns 10 values
You might be confusing the Correlation matrix of a random vector (multivariate random variable), and the autocorrelation matrix of a random process (stochastic process)...
So if your serie is a vector autoregressive model of order 1 (which it seems to be, so
h'
is your coefficient matrix), then indeedE[y(t-1)*y(t-1)']
makes sense, and is the Correlation matrix of the random vector itself.Now under the assumption of stationarity, which you can check by checking that the roots
x_i
ofdet(I - h'*x) = 0
are outside the unit circle (have modulus greater than 1), then the statistical properties ofy[t_1]
are equivalent to those ofy[t_2]
for allt_1, t_2
that are large enough. So in effect:If your process is NOT stationary, you're in trouble, since now your correlation matrix depends on the boundary conditions of
t_0
...What you might be looking for, however, are expressions like:
But I don't know if there are analytical representations of these in function of
E[y(t)*y(t)']
... You can research that online, or in the references that your slides provide...EDIT:
Since the OP has mentioned that this is a simple autoregressive model and not a vector autoregressive model, things are greatly simplified.
For stationary AR(1) models, there are nice analytical representations of the mean, variance and autocovariance (and thus autocorrelation), I'll give them here for the more general model:
y(t) = c + h*y(t-1) + n(t)
You can find all the mathematical derivations for these nicely explained in a reference book, or on the french wikipedia page: here, in the section "Moments d'un processus AR(1)"
It really boils down now to what you are looking for...
E[y(t-1)y(t-1)]
is simply equal toE[y(t)y(t)]
by definition of stationarity, maybe you were really looking for the derivation ofE[y(t)y(t-1)]
, which I will develop here:Now since
n(t)
is the white noise in t, it is uncorrelated with y(t-1), soE[n(t)*y(t-1)] = 0
, so we have:Which matches exactly the definition of
Cov[y(t)y(t-j)]
given above...Hope this helps.