Kurtosis (FPScript)
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:
...plus a constant, which determines the processing of data matrices and signal series....
...plus an optional constant, which determines the calculation method:
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}. |