Statistics Toolbox    
skewness

Sample skewness

Syntax

Description

y = skewness(X) returns the sample skewness of X. For vectors, skewness(x) is the skewness of the elements of x. For matrices, skewness(X) is a row vector containing the sample skewness of each column.

Skewness is a measure of the asymmetry of the data around the sample mean. If skewness is negative, the data are spread out more to the left of the mean than to the right. If skewness is positive, the data are spread out more to the right. The skewness of the normal distribution (or any perfectly symmetric distribution) is zero.

The skewness of a distribution is defined as

where µ is the mean of x, is the standard deviation of x, and E(t) represents the expected value of the quantity t.

y = skewness(X,flag) specifies whether to correct for bias (flag = 0) or not (flag = 1, the default). When X represents a sample from a population, the skewness of X is biased; that is, it will tend to differ from the population skewness by a systematic amount that depends on the size of the sample. You can set flag = 0 to correct for this systematic bias.

Example

See Also
kurtosis, mean, moment, std, var


  silhouette squareform