Kurtosis (FPScript)

21.09.2021

Calculates the kurtosis or excess for a data set.

Syntax

Kurtosis(DataSet, [ Mode = KURTOSIS + PROCESS_ROWS ] [ , IntervalWidth ])

 

The syntax of the Kurtosis function consists of the following parts:

Part

Description

DataSet

The data set to be evaluated.

All data structures are allowed. All numeric data types are permitted.

For complex data types the absolute value is formed.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Mode

Specifies how data matrices and signal series are to be processed and whether to determine individual, moving or block kurtosis.

The argument Mode can have the following values:

Constant

Meaning

KURTOSIS

The kurtosis is calculated.

EXCESS_KURTOSIS

The excess is calculated. This corresponds to the kurtosis minus 3.

The excess is also called excess kurtosis.

...plus a constant, which determines the processing of data matrices and signal series....

Constant

Meaning

+ PROCESS_COLUMNS

Processing takes place column by column. The result contains one value per column.

+ PROCESS_ROWS

Processing takes place row by row. The result contains one value per row.

+ PROCESS_COMPLETE

Processing is done globally. The result contains one value for the whole data set.

...plus an optional constant, which determines the calculation method:

Constant

Meaning

+ CALC_BLOCK

Block-by-block calculation. One value is calculated per interval.

+ CALC_MOVING

Moving calculation. For every value in the data set, a result is determined in the specified interval.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value KURTOSIS + PROCESS_ROWS.

IntervalWidth

This argument is required for determining moving and block kurtosis. The interval width then specifies the number of values to be examined. The width should be an odd number. Otherwise, the interval is asymmetrical, and one more value is included in the calculation to the right of the center as opposed to the left.

Permitted data structures are scalar value. All integral data types are permitted.

The value must be greater or equal to 1.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Remarks

The result always has the data type 64-bit floating point.

The kurtosis of a sample is defined as:

with the mean

For signals and signal series, the Y component is processed and the X or Z component is copied, if possible. When calculating moving and block kurtosis, the data structure of the result is that of the argument. If, on the other hand, DataSet is a data series or a signal, the result is a scalar value with the kurtosis searched for; otherwise, the result is a data series or a signal with one kurtosis per column or row.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Kurtosis({1, 3, 5, 2, 4})

Results in 1.7.

Kurtosis({{1, 3, 5, 2, 4}, {1, 3, 4, 2, 1}}, EXCESS_KURTOSIS + PROCESS_COLUMNS)

Results in { -1.299999999999997, -1.371972318339105 }. The function calculates the excess from the matrix column by column.

Kurtosis({{1, 3, 5}, { 4, 3, 3}, { 1, 2, 1}, {2, 6, 10}})

Results in { 2, 2.185185185185185, 1.93118192316095 }. The function calculates the kurtosis from the matrix row by row.

Kurtosis({1, 2, 3, 2, 1}, CALC_MOVING, 3)

Results in { 1, 1.499999999999993, 1.499999999999478, 1.499999999999993, 1 }. The function calculates the moving kurtosis for {1, 2}, {1, 2, 3}, {2, 3, 2}, {3, 2, 1} and {2, 1}.

Kurtosis({1, 0, 1, 2, 4, 2, 2, 2}, CALC_BLOCK, 4)

Results in { 2, 2.333333333333333 }. The function calculates the kurtosis block by block for {1, 0, 1, 2} and {4, 2, 2, 2}.

See Also

Skewness Function

Statistical Quantity Analysis Object

Share article or send as email:

You might be interested in these articles