The diversity index measures the probability that any two residents, chosen at random, would be of different ethnicities.
If all residents are of the same ethnic group it's zero. If half are from one group and half from another it's .50.