Skewness and Kurtosis in Stata | Johan Osterberg - Product Engineer

Skewness and Kurtosis in Stata

June 05, 2019

Let's look at two statistical concepts commonly used to describe a distribution - skewness and kurtosis.

Skewness is a measurement of the asymmetry of the probability distribution. Simply put, skewness gives an indication of the direction and amount by which a dataset is stretched or squashed.

  1. If skewness > 0, the data are spread out more to the right of the mean than to the left.
  2. If skewness < 0, the data are spread out more to the left.
  3. If skewness is close to 0, the data are roughly symmetrical.

Kurtosis is a sort of measure of the tails of the probability distribution. In other words how weighty the tails of the distribution are compared to a normal distribution.

  1. If kurtosis > 3, the distribution has heavier tails with a sharper peak than the normal distribution with more outliers.
  2. If kurtosis < 3, the distribution has lighter tails with a flatter peak than the normal distribution with fewer outliers.
  3. If Kurtosis is close to 0, the distribution is approximately normal.

Let's look at some examples in Stata. The summarize command along with the detail option will suffice for this:

sysuse auto, clear
summarize mpg, detail

Summarize output

Looking at this we can see that we get a skewness of 0.9487176 and a kurtosis of 3.975005. Going back to our previous reasoning this would mean that we have a slightly positively skewed distribution with a bit of overweight on the tails. In any case, both numbers are still rather close to 0 and 3 respectively which would categorize as a perfectly normal distribution so not that far off.

Let's look at another example, this using the nlsw88 dataset.

sysuse nlsw88, clear
summarize wage, detail

Summarize output

Here we get some more interesting numbers, with a skewness of 3.096199 and 15.85446 for kurtosis. This would indicate a quite positively skewed distribution with very heavy tails.


Profile picture

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin

2024 © Johan Osterberg