The Rand index or Rand measure (named after William M. Rand) in statistics, and in particular in data clustering, is a measure of the similarity between two data clusterings. A form of the Rand index may be defined that is adjusted for the chance grouping of elements, this is the adjusted Rand index. From a mathematical standpoint, Rand index is related to the accuracy, but is applicable even when class labels are not used. The Rand index or Rand measure (named after William M. Rand) in statistics, and in particular in data clustering, is a measure of the similarity between two data clusterings. A form of the Rand index may be defined that is adjusted for the chance grouping of elements, this is the adjusted Rand index. From a mathematical standpoint, Rand index is related to the accuracy, but is applicable even when class labels are not used. Given a set of n {displaystyle n} elements S = { o 1 , … , o n } {displaystyle S={o_{1},ldots ,o_{n}}} and two partitions of S {displaystyle S} to compare, X = { X 1 , … , X r } {displaystyle X={X_{1},ldots ,X_{r}}} , a partition of S into r subsets, and Y = { Y 1 , … , Y s } {displaystyle Y={Y_{1},ldots ,Y_{s}}} , a partition of S into s subsets, define the following: The Rand index, R {displaystyle R} , is: Intuitively, a + b {displaystyle a+b} can be considered as the number of agreements between X {displaystyle X} and Y {displaystyle Y} and c + d {displaystyle c+d} as the number of disagreements between X {displaystyle X} and Y {displaystyle Y} . Since the denominator is the total number of pairs, the Rand index represents the frequency of occurrenceof agreements over the total pairs, or the probability that X {displaystyle X} and Y {displaystyle Y} will agree on a randomly chosen pair. ( n 2 ) {displaystyle {n choose 2}} is calculated as n ( n − 1 ) / 2 {displaystyle n(n-1)/2} .