How this calculator works
The index measures how evenly observations are distributed across nominal categories. First calculate one minus the sum of squared category shares. Its largest possible value depends on the number of categories, so divide by 1 - 1/K to place the index on a zero-to-one scale. K counts every defined category, including supplied zeros. At least two categories and a positive total are required.
Formula
p_i = count_i/N; diversity = 1 - Σp_i²; IQV = K/(K - 1) × (1 - Σp_i²).
Worked example
Counts 8, 2, 0 have shares 0.8, 0.2, 0. Their squared shares total 0.68, so IQV = (3/2) × 0.32 = 0.48.
Advertisement
Frequently asked questions
What do zero and one mean?
Zero means all observations lie in one category. One means equal counts across all defined categories.
Should I omit empty categories?
Only if they are outside the category system being studied. Removing an available empty category changes K and therefore the normalisation.
Does the order of categories matter?
No. This is a measure for nominal categories; it does not use distances or an ordering between them.