SKEWNESS

The SKEWNESS function computes the statistical skewness of an n -element vector. If the variance of the vector is zero, the skewness is not defined, and SKEWNESS returns !VALUES.F_NAN as the result. SKEWNESS calls the IDL function MOMENT.

Calling Sequence

Result = SKEWNESS( X )

Arguments

X

A numeric vector.

Keywords

DOUBLE

If this keyword is set, computations are done in double precision arithmetic.

NAN

Set this keyword to cause the routine to check for occurrences of the IEEE floating-point value NaN in the input data. Elements with the value NaN are treated as missing data. (See Special Floating-Point Values for more information on IEEE floating-point values.)

Example

x = [65, 63, 67, 64, 68, 62, 70, 66, 68, 67, 69, 71, 66, 65, 70]
; ;Define the n-element vector of sample data.

result = SKEWNESS(x); ;Compute the skewness.

IDL prints:

-0.0942851

See Also

KURTOSIS , MEAN , MEANABSDEV , MOMENT , STDDEV , VARIANCE