Measuring orderedness I've found this a frustrating topic to Google, and might have an entire field dedicated to it that I'm unaware of.
Given an permutation of consecutive integers, I would like a "score" (real [0:1]) that evaluates how in-order it is.
Clearly I could count the number of misplaced integers wrt the ordered array, or I could do a "merge sort" count of the number of swaps required to achieve order and normalise to the length of the array. Has this problem been considered before (I assume it has), and is there a summary of the advantages of various methods?
I also assume there is no "true" answer, but am interested in the possibilities.

One book which treats metrics on permutations (that is, metrics on the symmetric group) is Persi Diaconis:"Group representations in probability and statistics"
which it is possible to download from here:
Link
