# Arithmetic mean and Gini index in a grouped distribution

In the following table is represented the relative frequency distribution of 100 families related to the class of annual income (in thousands of dollars):

Income:                         10-25   25-40   40-60   60-100  100-200
Relative frequencies:           0,48    0,25    0,15    0,10    0,02


Calculate arithmetic mean and Gini index.

I started calculating the middle value of the classes and the cumulative frequency:

Income (middle value):          17,5    32,5    50      80      150
Cumulative frequency:           0,48    0,73    0,88    0,90    1


Problem is, how do I calculate the arithmetic mean? I though it was the summation of the middle values * their relative frequency, which outputs 35,025 (8,4 + 8,125 + 7,5 + 8 + 3). The problem is that the sum of the residuals from the estimated mean isn't zero!

17,5-35,025 = -17,525   +
32,5-35,025 = -2,525    +
50-35,025   = 14,975    +
80-35,025   = 44,975    +
150-35,025  = 114,975   =

154,875 ≠ 0


Is 35,025 still the correct value for arithmetic mean even if the sum of residuals isn't 0?

The other question: Gini index. It's a concentration estimator. It's calculated in this way:

Where Qi are cumulative frequency and Pi are cumulative frequency in case of equidistribution.

Can you help me? :)

• The sum of the frequency-weighted residuals should be zero. – Glen_b Dec 20 '13 at 23:28
• True! It's zero! Thanks. What about the Gini index? Have any idea on how I should calculate the cumulative frequencies in case of equidistribution? Thanks in advance – MultiformeIngegno Dec 22 '13 at 14:22