Dear Numpy/Scipy experts,
Attached is a script which I made to
test the numpy.correlate ( which is called py plt.xcorr) to
see how the cross correlation is calculated. From this it
appears the if i call plt.xcorr(x,y)
Y is slided back
in time compared to x. ie if y is a process that causes a
delayed response in x after 5 timesteps then there should be a
high correlation at Lag 5. However in attached plot the
response is seen in only -ve side of the lags.
Can any one
advice me on how to see which way exactly the 2 series
are slided back or forth.? and understand the cause result
relation better?( I understand merely by correlation one
cannot assume cause and result relation, but it is important
to know which series is older in time at a given lag.
You indeed pointed out a lack of documentation of in
matplotlib.xcorr function because the definition of covariance can
be ambiguous.