# Kurtosis

As is true of skewness, there are multiple flavors of kurtosis. Once again
we'll assume Pearson's version, called *Pearson's moment coefficient of kurtosis*, or the
*moment coefficient of kurtosis*.

Kurtosis measures the "tailedness" of a distribution, ignoring the distinction between left and right tails. That is, distributions with either large outliers or else heavy tails will generally have higher kurtosis.

Looking at the formulas will help us see how this works, so let's do that. We're going to start with something
called *raw kurtosis*. After that we'll look at *excess kurtosis*.

## Measuring raw kurtosis

**Population raw kurtosis.** Population kurtosis is given by

where \(\mu_X\) is the population mean, \(\sigma_X\) is the population standard deviation and \(N\) is the population size.

**Sample raw kurtosis.** The formula for sample kurtosis \(g_2\) is given by

where \(\bar{x}\) is the sample mean.

## Measuring excess kurtosis

An interesting thing happens when we take the raw kurtosis of normally distributed data. For example, here's a
histogram for some data (`N` = 10,000) I
generated randomly from a normal distribution in R:

```
> library(moments)
> kurtosis(data)
[1] 2.9836
```

Notice that the result is very close to 3. That's no accident—the raw kurtosis of normally distributed data is in fact exactly 3.

Because we typically think of normally distributed data as the baseline, and because 3 is a weird value to
attach to a baseline, it's common to use a modified version of the kurtosis called *excess kurtosis*.
This is just the raw kurtosis minus 3. You can think of excess kurtosis as the kurtosis that's left over
after you subtract out the baseline kurtosis.

**Population excess kurtosis.** Population excess kurtosis is given by

where \(\mu_X\) is the population mean, \(\sigma_X\) is the population standard deviation and \(N\) is the population size.

**Sample excess kurtosis.** Sample excess kurtosis is given by

where \(\bar{x}\) is the sample mean.

## Applications of kurtosis

Kurtosis can help identify the presence of outliers in a dataset, since larger values are often indicative of outliers.

In finance, excess kurtosis is useful for identifying tail risk in a portfolio. This is where the distribution of returns has heavier tails than what we'd see with normally distributed returns. Nassim Taleb's bestselling book, The Black Swan, discusses "fat-tailed" distributions at length.

Sample kurtosis, like sample skewness, can be useful for testing the
normality of a distribution, since a sample drawn from a normal distribution should have
*excess* kurtosis close to zero.

## Exercises

**Exercise 1.** Consider small population of scores { 2, 3, 2, 4, 3, 15 }. Calculate the
raw and excess kurtosis.

**Exercise 2.** Create a small *mesokurtic* dataset, and measure its kurtosis.

**Exercise 3.** Create a small *leptokurtic* dataset, and measure its kurtosis. How would
you characterize the tails of the distribution?

**Exercise 4.** Create a small *platykurtic* dataset, and measure its kurtosis. How would
you characterize the tails of the distribution?