I am reading The Elements of Statistical Learning.
At pag. 309 the Gini index is defined as:
$$ \text{Gini} = \sum_{k \neq k'} \hat{p}_{mk} \hat{p}_{mk'} $$
where the index $k = {1,2,\dots,K}$.
In case $K=2$, does the notation implies
$$ \text{Gini} = \hat{p}_{m1} \hat{p}_{m2} $$
Or is it
$$ \text{Gini} = \hat{p}_{m1} \hat{p}_{m2} + \hat{p}_{m2} \hat{p}_{m1} = 2 \hat{p}_{m1} \hat{p}_{m2}$$
Is the order important?
Is this kind of notation "officially" defined? Where is it used?
$$ \sum_{k \neq k'} \hat{p}_{mk} \hat{p}_{mk'}= \hat{p}_{m1} \hat{p}_{m2} + \hat{p}_{m2} \hat{p}_{m1}. $$
$$ \sum_{k \lt k'} \hat{p}_{mk} \hat{p}_{mk'}= \hat{p}_{m1} \hat{p}_{m2}.$$