Re: Definition of the similarity in a set of integers

• To: mathgroup at smc.vnet.net
• Subject: [mg96447] Re: Definition of the similarity in a set of integers
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Fri, 13 Feb 2009 03:48:21 -0500 (EST)

```On 2/12/09 at 6:40 AM, overgeo at gmail.com (Ryan Markley) wrote:

>Hello I have two sets of integers eg

>S1 = (25,14,32,45) and S2 = (26,12,31,48)

>I want to define an operation similar to the variance that give me
>how similar both sets are, for example in the above example for both
>sets the results I have to get need to be similar because both sets
>are similar.

>The problem with the variance is this

>S1 = (25,1,1,1) and S2 = (1,1,25,1) these two sets have the same
>variance but they are completly different. What mathematical
>operation can I use to do what I am looking for.

As you've noted, variance is order independent. In fact,
variance is a measure of the variation between elements within a
set not a measure of difference between sets.

In version 7 there are a number of built-in functions that give
measures of the difference between sets. A list of those can is
returned by evaluating

?*Distance

From your comments, perhaps the EditDistance or HammingDistance
will do.

```

• Prev by Date: Re: Custom label for a slider in Manipulate
• Next by Date: Re: Re: Log[x]//TraditionalForm
• Previous by thread: Re: Definition of the similarity in a set of integers
• Next by thread: Re: Definition of the similarity in a set of integers