<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span>Dear Numpy/Scipy experts,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>                                              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)</span></div><div style="background-color: transparent;"><span><font size="1">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.</font></span></div><div style="background-color: transparent;"><span><font size="1">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.</font></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span><font size="1"><br></font></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span><font size="1"><br></font></span></div><div
 style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span><font size="1">with best regards,</font></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span><font size="1">Sudheer   </font></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">***************************************************************<br>Sudheer Joseph         <br>Indian National Centre for Ocean Information Services<br>Ministry of Earth Sciences, Govt. of India<br>POST BOX NO: 21, IDA Jeedeemetla P.O.<br>Via
 Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55<br>Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),<br>Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)<br>E-mail:sjo.India@gmail.com;sudheer.joseph@yahoo.com<br>Web- http://oppamthadathil.tripod.com<br>***************************************************************<br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> </font></div><br> </div> </div>  </div></body></html>