Calculates the first 4 moments (mean, variance, skewness, kurtosis) of array elements.
[in] Array with data for calculation.
[out] Variable for the mean (1st moment)
[out] Variable for the variance (2nd moment)
[out] Variable for the skewness (3rd moment)
[out] Variable for the kurtosis (4th moment)
[in] Initial index for calculation.
[in] The number of elements for calculation.
Returns true if the moments have been calculated successfully, otherwise false.
Calculation of the kurtosis is performed using the excess kurtosis around the normal distribution (excess kurtosis=kurtosis-3), i.e. the excess kurtosis of a normal distribution is zero.
It is positive if the peak of the distribution around the expected value is sharp, and negative if the peak is flat.