kurtosis

Compute kurtosis values.

Syntax

k=kurtosis(X)

k=kurtosis(X,bc,dim)

Inputs

X
Data sample.
Type: double
Dimension: scalar | vector | matrix
bc
Bias correction flag, either 0 or 1 (default). Using [] also produces the default. See Comments.
Type: integer
Dimension: scalar
dim
Dimension on which to perform the calculation.
Default: first non-singleton dimension.
Type: integer
Dimension: scalar

Outputs

k
kurtosis.

Examples

Vector example:

x=[9.3, 10.6, 11.9, 13.3, 15.1, 18.2];
k=kurtosis(x)
k = 2.09762811
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];
k=kurtosis(x, 0)
k = [Matrix] 1 x 2
2.86808  2.08156

Comments

kurtosis(X, 1) = mean((X - mean (X)).^4) / (std(X, 1).^4)

kurtosis(X, 0) = 3 + (N-1)/((N-2)*(N-3)) * ((N+1)*kurtosis(X, 1) - 3*(N-1))

Setting bc to 0 corrects the bias in the second and fourth moments.