Sample kurtosis is a measure of the “tailedness” of the probability distribution. Kurtosis is how much the shape of a distribution differs from a normal curve in terms of whether its curve in the middle is more peaked or flat than the normal curve. The kurtosis of the standard normal distribution is 3.

Distributions with kurtosis less than 3 (negative kurtosis) have a flatter curve with fewer scores in the tails than the normal distributions and are said to be thin-tailed. An example of a thin-tailed distribution is the uniform distribution, which does not produce outliers.

Distributions with kurtosis more than 3 (positive kurtosis) have a very peaked curve with more scores in the tails than the normal distribution. They are said to be heavy-tailed or fat tailed. An example of a fat-tailed distribution is the Laplace distribution, which has tails that asymptotically approach zero more slowly than a Gaussian, and therefore produces more outliers than the normal distribution.

Often, we use excess kurtosis, which is defined as kurtosis k minus 3, to provide comparison to the normal distribution. It is defined as

In 1986. Moors gave an interpretation of kurtosis in the form of z-score (also known as standard score). It is the number of standard deviations a data point is above or below the mean value. Scores above the mean will have positive values, while those below the mean have negative values. Z-score is often a way to compare random variables of different distributions so they have the “same” unit. Z-score is defined as

Combining the kurtosis and z-score,

*(since and by definition)*

*(since by definition)*

Kurtosis can therefore be seen as a measure of the dispersion of around its expectation, or simply the dispersion of around +1 and -1. For the original variable , the kurtosis is a measure of the dispersion of around . attains its minimum value of 1 in a symmetrically two-point distribution. High values of kurtosis occurs in two situations:

- The probability mass is concentrated around the mean. (peaked unimodal distribution)
- The probability mass is concentrated in the tails of the distribution.

For the sample , the sample kurtosis is

In NM Dev, we can use the class Kurtosis to compute the kurtosis of a data set using the above formula.

` ````
```// create an array of doubles for our dataset
val values = doubleArrayOf(1.0, 1.0, 2.0, 1.0, 2.0, 3.0, 2.0, 1.0, 0.0)
// create the Kurtosis object
val kurtosis = Kurtosis(values)
println("Sample kurtosis: " + kurtosis.value())

` ````
```Sample kurtosis: -1.043839758125472