# Is there a way to compute diversity in a population?

Say we have the following 5 cities, each with the same population

• CityA with 20% each of 5 ethnicities
• CityB with 99% of one ethnicity, but 100 different ethnicities in the remaining 1%
• CityC with 40% of one ethnicity and the remaining 60% distributed evenly over 10 different ethnicities

How can one measure their relative diversities?

-
Sounds like you're after some sort of diversity index –  onestop Feb 27 '11 at 19:29
+1 for diversity indices -- especially if you can figure out what kind of index would be meaningful to your particular audience/topic. You might also check out GINI Coefficients, which are used to measure economic inequality on a scale from 0-1. In your case, "more diverse" would be closer to the 0 end of the scale. –  ashaw Feb 27 '11 at 21:57
You could define diversity as the likelihood of randomly encountering some one of a different ethnic group. The geographic proximity of people can influence random encounters, so all things being equal, the measure should account for cities with highly residential segregation having less diversity. –  B_Dev May 19 '11 at 13:46

-

Tree diversity analysis book will get you up to speed with common diversity indices, along with some useful packages in R and their usage. While the book talks about trees, it can be used with marine fauna (which I did for my thesis) or even people.

-
+1 for this nice, readable and freely available resource! –  EDi Mar 1 '11 at 0:55

This paper by Massey and Denton 1988 is a fairly prolific overview of commonly used indices in Sociology/Demography. It would also be useful for some other key terms used for searching articles. Frequently in Sociology the indices are labelled with names such as "heterogeneity" and "segregation" as well as "diversity".

Part of the reason no absolute right answer exists to your question is that people frequently only use epistemic logic to reason why one index is a preferred measurement. Infrequently are those arguments so strong that one should entirely discount other suggested measures. The work of Massey and Denton is useful to highlight what many of these indices theoretically measure and when they differ to a substantively noticeable extent (in large cities in the US).

-

You may be interested in this paper: "A new axiomatic approach to diversity" from Chris Dowden.

-
It escapes me how that paper is relevant to the question. Do you mind elaborating? –  Andy W Feb 28 '11 at 13:10
As shown by the numerous answers (none being accepted by Scott Weinstein btw), the question of which diversity index is optimal seems to be trickier than it appears at first sight. In this context, I thought that a link towards that paper would be of some interest, as it aims at clarifying the topic in an axiomatic way. But you are right, it is maybe far too theoretical compare with what Scott was looking for. (And sorry for replying so late!) –  tflutre Mar 17 '11 at 3:49
no need to apologize! Welcome to the site and I hope you continue to contribute. –  Andy W Mar 22 '11 at 14:55

A diversity index such as Simpson's Diversity Index may be helpful:

$$S = \sum_{k=1}^{K} \left(\frac{n_k}{N}\right)^2$$

where there are $N$ units and $K$ types in your population with $n_k$ units of each type ($k=1,2,\dots,K$).

It is essentially the probability that two randomly selected samples (with replacement) will be of the same type.

From your examples, the values for Simpson's Diversity Index will be as follows:

City A: $S_A = (\frac{20}{100})^2+(\frac{20}{100})^2+(\frac{20}{100})^2+(\frac{20}{100})^2+(\frac{20}{100})^2 = 1/5 = 0.200.$

City B: $S_B = (\frac{99}{100})^2+\sum_{i=1}^{100}(\frac{0.01}{100})^2 \approx 0.980.$

City C: $S_C = (\frac{40}{100})^2+\sum_{i=1}^{10}(\frac{6}{100})^2 = 0.196.$

You may have noticed that the more diverse the population, the lower Simpson's index is. Therefore, to create a positive relationship, sometimes it is presented as $1-S$ or $\frac{1}{S}$.

-
You need to square your terms $n_k/N$ in the first definition. Also, with varying degrees of mild incorrectness, this measure is also attributed to Gini, Turing, Hirschman and Herfindahl, among others. The name Simpson's index appears most common in ecology. –  Nick Cox Jun 27 at 15:00