Monday, January 23, 2012

How to calculate the percentage of similarity with these string of numbers?

i would like to ask a help from you guys.. i have these 2 set of string of numbers [42 37 41 40 42 48 48 49 53 43]

and [42 37 27 26 26 39 36 38 47 51].



I want to calculate the percentage on how similar the 2 sets are. Please help me guys. thanks a lot guys! i hope someone will really answer my question..looking forward to it.How to calculate the percentage of similarity with these string of numbers?
The most difficult thing about answering your question is working out just what you are trying to ask. That's not meant to be a criticism. I is really just highlighting the fact that if you can be more precise about a question then it often becomes easier to answer.



If you mean, what percentage of the numbers are in the first set as well as the second set, then count how many appear in both sets, divide the result by 10 and multiply by 100. It turns out that even doing this is tricky because it isn't obvious whether we should be counting 42 just the once, or twice. (It's in one of the sets twice and although it is also in the other set, it only appears once).



If you mean, how similar in terms of the numbers AND their positions within the sets, then you'd say that there is one match in first position (42), a match in second position (37) ... and so on ... with just the two matches in total. Divide by 10 and multiply by by 100 gives you 20%.



There are probably other ways of asking about similarity, with each way giving a different answer.

No comments:

Post a Comment