I am trying to derive a meaningful statistic from a survey where I have asked the person taking the survey to put objects in a certain order. The order the person puts the objects is compared to a correct order and I want to calculate the error.
For example:
Users order: 1, 3, 4, 5, 2
Correct order: 3, 2, 1, 5, 4
I have come up with a method of finding an error measure: For each object in the sequence I calculate how many places it is from the correct place (not wrapping on the ends) and divide by the number of alternative places. For the object 3 - this measure would be 1/4. For the object 2 - this measure would be 3/4. Then I average these measures and divide by the measure I would get in the case of the sequence that maximizes the number of total places of error.
I have found I can calculate this maximum with the following algorithm:
// Number of places is 5 in example. int sum = 0; int i = 1; while(i
How would one write this as an equation? Is this the most meaningful measure I can make for figuring the error?