I have two numbers x & y for N different readings and wish to find how close they are from each other and would like to rank the reading in order of they equalness.
If I were to have the following set of data
Reading____x__________y 1__________1__________0 2__________0__________1 3__________1__________1 4__________1000_______1000 5__________990________1000 6__________1000_______990 7__________10_________9 8__________9__________10 9__________5__________10 10_________10_________6
I would expect something like this after sorting by equalness
Reading____x__________y 4__________1000_______1000 3__________1__________1 5__________990________1000 6__________1000_______990 8__________9__________10 7__________10_________9 10_________10_________6 9__________5__________10 1__________1__________0 2__________0__________1
I wish to use the exact values in combination with the magnitude of the values for comparison, such that
- 990 is more equal to 1000 than what 9 is to 10
- 1000 is more equal to 1000 than 1 is equal to 1
For simplicity, I wish to only consider whole numbers.
What would be an
f(x,y) that I could use to sort the values?
I am trying to use this function to find out users that have almost equal scores on Questions and Answers on Stack Overflow