## SKEWNESS

The SKEWNESS function computes the statistical skewness of an n-element vector. Skewness determines whether a distribution is symmetric about its maximum. Positive skewness indicates the distribution is skewed to the right, with a longer tail to the right of the distribution maximum. Negative skewness indicates the distribution is skewed to the left, with a longer tail to the left of the distribution maximum.

SKEWNESS calls the IDL function MOMENT.

### Syntax

Result = SKEWNESS( X [, /DOUBLE] [, /NAN] )

### Return Value

Returns the floating point or double precision statistical skewness. If the variance of the vector is zero, the skewness is not defined, and SKEWNESS returns !VALUES.F_NAN as the result.

### Arguments

#### X

A numeric vector.

### Keywords

#### DOUBLE

Set this keyword to force computations to be done in double-precision arithmetic.

#### NAN

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

### Examples

```; Define the n-element vector of sample data:
x = [65, 63, 67, 64, 68, 62, 70, 66, 68, 67, 69, 71, 66, 65, 70]
; Compute the skewness:
result = SKEWNESS(x)
PRINT, 'Skewness = ', result
```

IDL prints:

```Skewness =    -0.0942851
```

Introduced: 5.1