EmpiricalCumulantsK[data_List] :=
Module[{stdata, n, s2, s3, s4, s5, s6, gamma3, gamma4, gamma5,
gamma6, cumulants},
stdata = (data - Mean[data])/StandardDeviation[data];
n = Length[data];
s2 = n - 1;
s3 = Total[stdata^3];
s4 = Total[stdata^4];
s5 = Total[stdata^5];
s6 = Total[stdata^6];
Print[ "Standardized third, fourth, fifth, and sixth cumulants \
based on Fisher's k-statistics."];
gamma3 = 1/(n*(n - 1)*(n - 2))*(n^2*s3);
gamma4 =
1/(n*(n - 1)*(n - 2)*(n - 3))*( (n^3 + n^2)*s4 -
3*(n^2 - n)* s2^2 );
gamma5 =
1/(n*(n - 1)*(n - 2)*(n - 3)*(n - 4))* ((n^4 + 5*n^3)*s5 -
10*(n^3 - n^2)* s3*s2 );
gamma6 =
1/(n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n -
5))*( ( n^5 + 16*n^4 + 11*n^3 - 4*n^2)*s6 -
15*n*(n - 1)^2*(n + 4)*s4*s2 -
10*(n^4 - 2*n^3 + 5*n^2 - 4*n)* s3^2 +
30*(n^3 - 3*n^2 + 2*n)*s2^3 ) ;
cumulants = {gamma3, gamma4, gamma5, gamma6} ]