In sociology and political studies, diversity is the degree of differences in identifying features among the members of a purposefully defined group, such as any group differences in racial or ethnic classifications, age, gender, religion, philosophy, physical abilities, socioeconomic background, sexual orientation, gender identity, intelligence, mental health, physical health, genetic attributes, personality, behavior or attractiveness.
When measuring human diversity, a diversity index exemplifies the likelihood that two randomly selected residents have different ethnicities. If all residents are of the same ethnic group it's zero by definition. If half are from one group and half from another, it is .50. The diversity index does not take into account the willingness of individuals to cooperate with those of other ethnicities.