# Gini coefficient finite sample correction

I wanted to compute some gini coefficients for different populations of differents sizes. In R I used the ineq package containing a Gini coefficient implementation. One of the paramater (i.e. corr)

corr (logical). Argument of the function Gini specifying whether or not a finite sample correction should be applied.

Here's the code of the function. If corr=TRUE then we enter into the if and the gini coefficient is divided by the size of the population -1 . Could someone explain me when and why this correction is important ?

function (x, corr = FALSE, na.rm = TRUE)
{
if (!na.rm && any(is.na(x)))
return(NA_real_)
x <- as.numeric(na.omit(x))
n <- length(x)
x <- sort(x)
G <- sum(x * 1L:n)
G <- 2 * G/sum(x) - (n + 1L)
if (corr)
G/(n - 1L)
else G/n
}


This correction is supposed to reduce bias in estimation of population coefficient. If you work on entire population, you should use corr = F.

Please see wolphram for explanation and Bessel correction for a proof and details for analoguous problem in sample variance and standard deviation estimation.