Kurtosis
A natural but biased estimator

For a sample of n values, a method of moments estimator of the population excess kurtosis can be defined as g 2 = m 4 m 2 2 − 3 = 1 n ∑ i = 1 n (x i − x ¯) 4 2 − 3 {\displaystyle g_{2}={\frac {m_{4}}{m_{2}^{2}}}-3={\frac {{\tfrac {1}{n}}\sum _{i=1}^{n}(x_{i}-{\overline {x}})^{4}}{\left^{2}}}-3} where m is the fourth sample moment about the mean, m is the second sample moment about the mean (that is, the sample variance), x is the i value, and x ¯ {\displaystyle {\overline {x}}} is the sample mean.

This formula has the simpler representation, g 2 = 1 n ∑ i = 1 n z i 4 − 3 {\displaystyle g_{2}={\frac {1}{n}}\sum _{i=1}^{n}z_{i}^{4}-3} where the z i {\displaystyle z_{i}} values are the standardized data values using the standard deviation defined using n rather than n − 1 in the denominator.

For example, suppose the data values are 0, 3, 4, 1, 2, 3, 0, 2, 1, 3, 2, 0, 2, 2, 3, 2, 5, 2, 3, 999.

Then the z i {\displaystyle z_{i}} values are −0.239, −0.225, −0.221, −0.234, −0.230, −0.225, −0.239, −0.230, −0.234, −0.225, −0.230, −0.239, −0.230, −0.230, −0.225, −0.230, −0.216, −0.230, −0.225, 4.359

and the z i 4 {\displaystyle z_{i}^{4}} values are 0.003, 0.003, 0.002, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.003, 0.003, 360.976.

The average of these values is 18.05 and the excess kurtosis is thus 18.05 − 3 = 15.05. This example makes it clear that data near the "middle" or "peak" of the distribution do not contribute to the kurtosis statistic, hence kurtosis does not measure "peakedness". It is simply a measure of the outlier, 999 in this example.
oulipo:avoid_letter[a], change_case:english_lowercase, punctuation:no_comma