Calculate maximum of Gini impurity

56 Views Asked by At

Gini impurity is defined as : $$G = 1 - \sum_{i=1}^{k}p_i^2$$
In my book of statistics it's written that it has a maximum when $p_1 = p_2 = … = p_k = \frac{1}{k} $ but there is no derivation . How can one prove that it has a maximum in this case ? I tried something but without success.

1

There are 1 best solutions below

0
On BEST ANSWER

Use AM-QM inequality:

$\frac{\sum_{i=1}^k p_i^2}{k} \ge \left(\frac{\sum_{i=1}^k p_i}{k}\right)^2=\frac{1}{k^2}$ with equality when $p_1=p_2=\ldots=p_k=\frac{1}{k}$