3

Okay, so I am trying to address a biological problem here. I have asked a variant of this question here, but I was not able to get to solving it.

The question:

Four objects are vibrating constantly with some variable frequency and amplitude. I have the X-Y coordinates of the objects w.r.t time. Now, I want to find if there is any correlation between the objects movements.

Also, if there is any correlation between the movement of an object with itself w.r.t time.

I am not sure what to do, I have absolutely no idea about the mathematics involved, but can try to understand what needs to be done.

Thanks! A

C.M
  • 31
  • 2
  • This question is very low quality. Use "cross-correlation" for object to object. use "auto-correlation" for object with itself. But this question is very low quality. You can search for what is correlation. – acs Sep 20 '15 at 21:52
  • 3
    For what it's worth, I thought the question was fine. – Jim Clay Sep 20 '15 at 22:35
  • i'm more concerned about the quality of answers. i also think the question is okay as it is and that Jim answered it adequately. – robert bristow-johnson Sep 21 '15 at 01:40

1 Answers1

2

Since you have the x/y position for each object it should be fairly straightforward. Call the position of each $p_1(t)$ through $p_4(t)$. Subtract the mean from all of them since it sounds like you only care about their movement, not their position.

Once you have done that it should be a fairly simple matter of cross-correlating the position functions. If the vibration frequencies don't change with time you will only get a strong cross-correlation if the vibration frequencies of the two objects are either the same or quite close to each other.

Jim Clay
  • 12,101
  • 31
  • 55
  • I wonder, Jim, if user1599497's vibrations are in 1-dimension only (like a plucked guitar string) or are the vibrations fluctuating in 2-dimensions (like the x/y position of a bee flying around in a room). This sounds like a fun problem. – Richard Lyons Sep 21 '15 at 04:44
  • @Jim Clay: Thanks! I have calculated eucledian distance and angle of movement, using the most frequent position of the object as reference. Now I am trying to calculate if the movements (based on eucledian distance) are corelated, and if the direction of motion is also corelated. That is easy. But I need to corelate both together, how do I do that? I was suggested to use eucledian distance and angle as complex number pair and then find the correlation. But I am not sure how to do that in python. Also, can we find anything other than pearson's corealtion factor? – C.M Sep 21 '15 at 09:49
  • @Richard Lyons: its a 2D motion. Its actually 3-D, but I am discounting the third dimension for sake of simplicity for now. I am stuck with this for few months now. :( I would be highly grateful to you guys if you can help me solve this. :) – C.M Sep 21 '15 at 09:54
  • @C.M I think that is straightforward if you do it as complex data. The "real" portion of the movement vector would be the x-axis movement, the "imaginary" portion of the vector would be the y-axis movement. Then just do a complex cross-correlation. The normalized magnitude of the cross-correlation will tell you how strong it is, and the angle of the complex peak will tell you the relative angle between their movements. – Jim Clay Sep 21 '15 at 17:26