Skip to content
Tutorials Center
My learning

Topics

Lesson 10 of 57 ยท Describing Data

Skewness, Kurtosis and Z-Scores

Describe the shape of a distribution with skewness and kurtosis, standardize values with z-scores, and learn how these measures connect to the normal curve.

Center and spread are two properties of a distribution. The third is shape: is the data symmetric, does it have a long tail, do extreme values show up often? This lesson introduces the numbers that capture shape and the z-score, which expresses any value in units of standard deviations.

Z-scores

A z-score tells you how many standard deviations a value is above or below the mean:

z = (x - mean) / sd

If exam scores have mean 70 and standard deviation 10, a score of 85 has z = 1.5, and a score of 55 has z = -1.5. Z-scores make different scales comparable. A student with 85 on that exam and another with 640 on a test with mean 500 and sd 100 (z = 1.4) can be ranked fairly: the first is slightly better relative to peers.

Standardizing a whole dataset gives it mean 0 and standard deviation 1. A rough rule for bell-shaped data: |z| above 2 is unusual and |z| above 3 is rare.

Python Compute and compare z-scores

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Skewness

Skewness measures asymmetry. A common definition averages the cubed z-scores:

skew = (1/n) * sum(z^3)

  • Skewness near 0: symmetric (the normal distribution has exactly 0).
  • Positive skew (right-skewed): a long tail to the right; mean > median. Examples: income, house prices, waiting times.
  • Negative skew (left-skewed): a long tail to the left; mean < median. Example: scores on an easy test where most people score high.

Cubing keeps the sign, so deviations on the long side dominate. As a rough guide, |skew| below 0.5 is nearly symmetric, between 0.5 and 1 moderately skewed, and above 1 strongly skewed.

Positively skewed data is often handled by a log transform, which compresses the long tail.

Python Skewness of three shapes

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The exponential data has skewness near 2 (its theoretical value), with the mean above the median. Taking logs changes the shape, here swinging it to a negative skew of about -1.1, so a transform must be checked rather than assumed. (Logs help most for data that is log-normal, such as incomes.)

Kurtosis

Kurtosis describes how heavy the tails are, that is, how often extreme values occur compared with a normal distribution. It averages the fourth power of the z-scores:

kurtosis = (1/n) * sum(z^4)

The normal distribution has kurtosis 3. Most software reports excess kurtosis = kurtosis - 3, so the normal has 0.

Excess kurtosis Name Meaning
About 0 Mesokurtic Tails like the normal
Positive Leptokurtic Heavy tails, more extreme values, sharper peak
Negative Platykurtic Light tails, flatter top

Kurtosis is about tails, not the "peakedness" many textbooks claim. It matters in finance, where heavy tails mean crashes happen far more often than a normal model predicts.

Python Excess kurtosis of different distributions

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The uniform distribution's excess kurtosis is -1.2, the normal's is about 0, and the t distribution with 5 degrees of freedom is clearly positive (theoretically 6, though samples vary a lot because heavy tails are rare events).

flowchart TD
    S["Shape of a distribution"] --> A["Skewness<br/>asymmetry, 3rd power"]
    S --> B["Kurtosis<br/>tail weight, 4th power"]
    A --> A1["> 0 right tail"]
    A --> A2["< 0 left tail"]
    B --> B1["> 0 heavy tails"]
    B --> B2["< 0 light tails"]

Moments of the z-scores summarize shape: the 1st gives the mean, the 2nd the variance, the 3rd skewness, the 4th kurtosis.

Using shape in practice

  1. Choose the center. Skewed data: prefer the median.
  2. Choose a model. Strongly skewed positive data might be modeled after a log transform.
  3. Check assumptions. Many tests assume roughly symmetric, light-tailed data.
  4. Spot outliers. Heavy tails mean extreme values are expected, not necessarily errors.

Do not rely on one number. A histogram, shown in the next lesson, visualizing distributions, often tells you more than any statistic.

Pearson's skewness shortcut

For a quick estimate when you only know the center, you can use 3 * (mean - median) / sd. It is positive for right skew and negative for left skew and is easy to compute from a summary table.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A value has z = -2. What does it mean?

    z measures distance from the mean in standard deviations; the sign gives the direction.
  2. 2. House prices have a long tail of expensive homes. The skewness is most likely...

    A long right tail means positive skew, with the mean above the median.
  3. 3. A distribution with excess kurtosis of 4 has...

    Positive excess kurtosis means extreme values occur more often than in a normal distribution.
  4. 4. What are the mean and standard deviation of a set of z-scores?

    Standardizing shifts the mean to 0 and rescales the standard deviation to 1.

Summary

  • A z-score is (x - mean) / sd and puts values on a common scale.
  • Skewness measures asymmetry: positive means a right tail, negative a left tail.
  • Excess kurtosis measures tail weight relative to the normal distribution (0).
  • Shape guides your choice of summary, transformation and statistical method.
  • Combine numbers with plots; no single statistic describes a distribution fully.

Next: Visualizing Distributions