skewness

Compute skewness values.

Syntax

s=skewness(X)

s=skewness(x,dim)

Inputs

x
Data sample.
Type: double | integer | struct | cell
Dimension: scalar | vector | matrix
dim
Dimension on which to perform the calculation.
Default: first non-singleton dimension.
Type: integer
Dimension: scalar

Outputs

s
Skewness.

Examples

Vector example:

x=[9.3, 10.6, 11.9, 13.3, 15.1, 18.2];
s=skewness(x)
s = 0.47872
Matrix example:
x=[9.3, 4.8; 10.6, 6.6; 11.9, 8.0; 13.3, 9.3; 15.1, 10.6; 18.2, 11.9];
s=skewness(x)
s = [Matrix] 1 x 2
 0.47872  -0.14697

Comments

skewness (X) = (mean ((x - mean (x)).^3)/ (std (x).^3)