Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a program that randomly generates line plots and what I would like to do now is compare two of those line plots and get a measure of 'similarity' between them. Now I feel as if this measure of similarity is relative to other measures I'm taking; correct me if I'm wrong. So is there any theorem/algorithm that can do this? If not, any that will get me closer to what I want?

share|improve this question
    
I'm a bit dense, I'm sorry. What is a line plot? –  mixedmath Jul 28 '11 at 18:47
    
For example, my graphs have time on the x-axis and speed of an object on y-axis. What I'm looking to do is get a sense of how similar they are to each other. –  Ram Jul 28 '11 at 18:51
5  
If the x-coordinates of both sets match, just take the sum of squares of differences of corresponding y-coordinates. The nearer to zero, the more "similar". –  J. M. Jul 28 '11 at 19:29
1  
In that case you would create an affine model and compare the models. –  Emre Jul 28 '11 at 21:34
1  
Hmm, after lots of sleep, I think @Emre's is a good idea. You could try fitting a (shape-preserving) interpolant to both data sets, subtract one interpolant from the other, and take the (integral) norm of that difference. –  J. M. Jul 29 '11 at 4:21

1 Answer 1

You could check section 14.7 of Numerical Recipes on whether two two-dimensional distributions differ. Obsolete versions are free.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.