Compute the sample skewness of the elements of x.
The sample skewness is defined as
mean ((x - mean (x)).^3) skewness (X) = ------------------------. std (x).^3
The optional argument flag controls which normalization is used. If flag is equal to 1 (default value, used when flag is omitted or empty), return the sample skewness as defined above. If flag is equal to 0, return the adjusted skewness coefficient instead:
sqrt (N*(N-1)) mean ((x - mean (x)).^3) skewness (X, 0) = -------------- * ------------------------. (N - 2) std (x).^3
The adjusted skewness coefficient is obtained by replacing the sample second and third central moments by their bias-corrected versions.
If x is a matrix, or more generally a multi-dimensional array, return the skewness along the first non-singleton dimension. If the optional dim argument is given, operate along this dimension.
See also: var, kurtosis, moment.
Package: octave