In several online sources, e.g. NIST engineering statistics handbook I have read that for the calculation of skewness & kurtosis I should use N in the denominator instead of (N-1) when calculating the variance.

However the programming language I work with (IDL) has (N-1) there (see moment function of IDL). This seems copied from Numerical Recipes, pp 722-724.

Which is correct? Just to be sure before I submit an error report.

Wouldn't the unbiased estimators be even more complicated?

  • $\begingroup$ Do you really need an unbiased estimate? Or are you computing these measures for some other purpose, such as describing data or testing the shape of their distribution? $\endgroup$
    – whuber
    Jul 25, 2016 at 12:57
  • $\begingroup$ I don't need an unbiased estimate. But when submitting an error report it would be useful to have a confirmation, that what IDL does is neither correct for the biased nor the unbiased form. $\endgroup$ Jul 25, 2016 at 13:14
  • $\begingroup$ I don't understand what you mean by "neither correct." In what sense could one evaluate "correctness" in the absence of a clearly stated purpose? $\endgroup$
    – whuber
    Jul 25, 2016 at 13:17
  • $\begingroup$ While something being correct depends on the context, some things are wrong in all or at least most practical purposes. A function delivered with a programming language should deliver meaningful results for most practical purposes. - Shouldn't there be a definition for biased and for unbiased estimates? makes 2 correct solutions, all else false (ok, +-3 in case of Kurtosis, makes 4 correct solutions) $\endgroup$ Jul 25, 2016 at 13:56
  • $\begingroup$ Actually, there are far more "correct" solutions than that. The problem is that bias often is just a small part of the potential error in any estimator. Thus, one cannot maintain that "correct" implies "unbiased." This consideration opens the field to infinitely many possible kurtosis estimators. You're doing well to investigate and understand what your programming language does, but is there any need to go further? Either use what it offers, apply an adjustment to its results, or code your own if you need something different. $\endgroup$
    – whuber
    Jul 25, 2016 at 14:35

1 Answer 1


Kurtosis is equal to $E(Z^4)$, where $Z = (X-\mu)/\sigma$. (Subtract 3 if you want, it doesn't matter).

If you apply this formula to the empirical probability distribution of the data, where you put $1/n$ probability on each distinct observation $x_i$ (and collate probabilities for the repeats), then you get the following estimate of kurtosis:

$\hat{k} = (1/n) \sum_{i=1}^n \{(x_i - \bar{x})/\hat{\sigma}\}^4$, where $\hat{\sigma}^2 = (1/n) \sum_{i=1}^n (x_i - \bar{x})^2$.

This logic suggests using the $n$ formula for variance rather than the $n-1$ formula.

I am not saying that this formula gives the best estimator. Rather, I am saying that there is a consistent logic to this estimator, because it uses the same formula as for any other probability distribution.

I would be interested in knowing how this estimator compares to others, in terms of mean squared error, mean absolute error, and median absolute error, if someone has some research they would like to share with the community.


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.