Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could anyone help me on the topic of quantifying list similarity? I'm looking at two nature conservation sites, and wonder how similar they are in types of animals living there.

Site 1 is the habitat of these species: A,B,C,D,E,F,G

Site 2 is the habitat of these species: A,C,D,H,I

Would it be possible to calculate the degree of similarity between them? Are there any programs or functions for this?

Thank you so much,


P.S: I'm so unfamiliar with this that I cannot tag this question properly. Sorry.

share|cite|improve this question
For starters, check the book by Deza and Deza:, in which hundreds of families of distance and similarity functions are catalogued. Also the book by Zezula et al "Similarity Search":… – alancalvitti Jan 14 '13 at 19:38
up vote 1 down vote accepted

Here's a thought. You have a total of $9$ species, so $9$ opportunities for the sites to agree/disagree. They agree on $A,C,D$ and disagree on the others; they agree on $3$ out of the $9$. So, you could say the degree of similarity is $3/9$, also known as $1/3$, or (rounding a little) $33$ percent.

Whether this method is any good depends on what properties you would like a "degree of similarity" to have, and that's really the right place to start. If you can write down a list of desired properties of a "degree of similarity", you can start narrowing down the set of functions satisfying your desiderata.

share|cite|improve this answer

Your Answer


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.