Kurtosis and skewness

which formula does root use to calculate kurtosis. I am calculating but getting different results, what can I do.


For the Kurtosis, you can see the implementation in the source file here.
What is computed is the excess kurtosis, i.e the fourth standardised momentum minus 3.
(see Kurtosis - Wikipedia).

One possible reason of the discrepancy is the way underflow/overflows are used and the fact that mean and standard deviation (used in the kurtosis calculation) are computed at filling time

For the skewness, see the source code here. Here the third standardised momentum is computed.

Best regards


Hi Lorenzo,

Also one important remark.
There is issue TH1::GetSkewness() and TH1:: GetKurtosis() return `-nan` for empty histogram · Issue #13878 · root-project/root · GitHub

ROOT methods return NaN value for empty histograms.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.