Investment Studio > Expressions > Functions > Statistical > KURT

float kurt(float data [, ...])

Returns the kurtosis of the data.

Kurtosis is a measure of "peakedness" compared with the normal distribution (see normdist): positive kurtosis indicates a relatively peaked distribution, negative kurtosis indicates a relatively flat distribution.

All elements in the argument list are converted to floats, with exclusion if conversion fails. The list may contain array arguments, in which case each array element is treated as a separate list element.

Examples

=kurt(-1, -2, 3, 4, 5, -9, 8)

» 0.639.

To verify that the kurtosis of the standard normal distribution is 0, we can generate a random sequence with approximately standard normal distribution using the Box-Müller method (see rand) and feed it to kurt. Given symbols

_n = 1000

_r1 = mop("randbetween()", makevector(_n, 0, 0), makevector(_n, _n, 0)) / _n

_r2 = mop("randbetween()", makevector(_n, 0, 0), makevector(_n, _n, 0)) / _n

(Box-Müller requires _r1 and _r2 to be independent, so we can't use the same values for both) we can obtain a column vector with _n approximately standard-normal distributed numbers like this:

_s = mop("*", mop("sqrt()", -2 * mop("ln()", array(_r1))), mop("cos()", 2 * pi * array(_r2)))

To verify that its kurtosis is approximately 0, use the expression

=kurt(array(_s))

and compare with the much larger, negative kurtosis of the flat distributions of _r1 and _r2:

=kurt(array(_r1))

=kurt(array(_r2))

See also avedev, average, devsq, skew, stdev, stdevp, var, varp.