I am trying to calculate a statistic for inequality at the zip code or county level in order to merge with another data set. I am using IRS SOI data, but the data given is returns by AGI bin (i.e., 1-25k, 25-50k,..., 200k+)

This does not seem specific enough to calculate a Gini coefficient because there is no microdata available to the general public and percentile shares are not given.

  1. How could I calculate a measure of inequality from the data in the IRS SOI datasets?

  2. Are there better methods to approach this problem?


1 Answer 1


I'm not sure specifically what data you have but it sounds like you have enough data to calculate a rough gini estimate.

Gini is equal to: (The average variance for incomes) / (2 * the mean)

Since Gini is a standardized indicator and not dependent on the level of income, just the variance, you can construct a rough gini metric using your data.

If you assume 0-25K = 0, 25K-50K = 1, 50K-75K = 2 etc. You can treat the buckets as incomes. You can then calculate the average variance between the incomes weighted by the number of individuals in each bucket and divide it by 2 X the average income (bucket). In doing so you've created a rough gini coefficient for each zipcode.

You should note that this statistic is rough and not perfectly accurate since it ignores any variation in distribution of income within the bucket. It may be that the 25K-50K bucket has most of its individuals at 40K income and few in the 25K income which would negatively bias your gini estimate.

Assuming this is for a research paper this methodology should be discussed and the possible flaws with this estimate should be disclosed. It does however provide the best approximation for inequality given the information you have.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.