Z-score

Also known as: standard score, standardised value.

How many standard deviations a value lies above or below the average of its group. It puts different measures on one scale.

Synthetic dataExamples on this page use synthetic data created for illustration.

Definition

A z-score says how many standard deviations a value lies above or below the average of its group: subtract the mean, then divide by the standard deviation. It puts values measured in different units on one scale and makes unusual values easy to spot.

In plain terms

Is a price of 45 high? Is a rating of 4.0 low? It depends on the group. A z-score answers by measuring distance from the group’s average in units of its usual spread. A z of 0 is average, +1 is one standard deviation above, −2 is two below.

For roughly bell-shaped data, about 95% of values fall within ±2. For skewed or heavy-tailed data that rule fails and large z-scores are common, so treat them as a prompt to look, not as proof of an error (see Outlier).

Example

QuantityValueGroup meanGroup standard deviationZ-score
A price45405+1.0
A rating4.04.30.2−1.5
Stories on a day (see Event Detection)4810.31.1+34

The first two can be compared directly: the rating is further below its group than the price is above its own. The third is so far out that it is certainly not routine variation.

Common misunderstandings

  • “A z-score above 2 means the value is wrong.” It means unusual relative to the group; the value may be right.
  • “The 95% rule holds for any data.” It is a property of bell-shaped data; skewed data break it.
  • “A z-score is a probability.” It is a distance; a probability follows only with an assumption about the distribution.

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods . NIST.
  2. David S. Moore, George P. McCabe, Bruce A. Craig. Introduction to the Practice of Statistics . W. H. Freeman, 2021. ISBN 978-1319013387.