I would like to know the formulation used to calculate skewness and kurtosis in Mathematica. I see that for a discrete data set, skewness is calculated as CentralMoment[data,3]/CentralMoment[data,2]^(3/2).

In my case, I have a discrete set of data in two dimensions from which I compute its smoothkernel distribution. I then compute skewness and kurtosis based on the smooth kernel distribution. I would like to what formulation Mathematica would use in this case.

Here's what I am using:

\[ScriptCapitalD] = SmoothKernelDistribution[data, 2.0]

Any help would be much appreciated.Thank you.


1 Answer 1


I am not sure that the question is well-defined. Nor does referring the OP to help pages on kurtosis or skewness help answer his question.

The standard definition of skewness and kurtosis are UNIVARIATE: even then, Mma uses the same term to do entirely two different things:

1) To calculate the symbolic skewness or kurtosis (ratio of moments) for a given univariate random variable (a problem in integration)

2) To calculate an estimate of skewness or kurtosis, given univariate sample data. In this respect, there is no absolute definition of what the estimator should be, and there are a number of different approaches that can be (and are) used.

OP's problem

The OP's problem is neither of these scenarios. By contrast, the OP has bivariate discrete data, which he produces a SmoothKernelDistribution data object from ... which is still a bivariate 'object'. If you look at its guts, it is a list of data, with a DataDistribution head. e.g.

data = RandomVariate[BinormalDistribution[.29], 100];
dd = SmoothKernelDistribution[data]

DataDistribution[ ]

Given bivariate data, there is no standard definition of what skewness or kurtosis is, or should do. There are papers that propose different measures, or different approaches, but not, as far as I am aware, any standard. So, I would have no idea what to expect Mma to produce from asking it to find Skewness or Kurtosis of bivariate data or indeed a bivariate distribution.

HOWEVER, if one refers to the HELP file for say Kurtosis, it says:

Kurtosis[{{x1, y1}, {x2, y2}, ...}] gives {Kurtosis[{x1, x2, ...}],Kurtosis[{y1, y2, ...}]}

And that is what seems to be happening here. Mathematica appears to be interpreting your bivariate DataDistribution object as a bivariate data list, and returning to you Kurtosis[xdata] and Kurtosis[ydata]. This view is consistent with the output returned for the above example:


{2.93941, 3.0398}

i.e. sample kurtosis of around 3 for the xdata, and around 3 for the ydata.


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.