[Numpy-discussion] Numpy correlate

Sudheer Joseph sudheer.joseph at yahoo.com
Thu Mar 14 05:18:01 EDT 2013


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.


with best regards,
Sudheer   
 
***************************************************************
Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
E-mail:sjo.India at gmail.com;sudheer.joseph at yahoo.com
Web- http://oppamthadathil.tripod.com
***************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130314/067815b4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plt_xcorr.py
Type: text/x-python
Size: 428 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130314/067815b4/attachment.py>


More information about the NumPy-Discussion mailing list