BioDeviceHub

Z-Score Calculator

Calculate the Z-score of a value from a mean and standard deviation, its percentile and normal probabilities, the value for a Z-score, or the Z-scores of a whole data set.

Formula

Z=x−μσZ = \dfrac{x - \mu}{\sigma}
x=μ+Zσx = \mu + Z\sigma
percentile=Φ(Z)\text{percentile} = \Phi(Z)
ptwo-sided=2 (1−Φ(∣Z∣))p_{\text{two-sided}} = 2\,(1 - \Phi(|Z|))
μ, σ\mu,\ \sigma
mean and standard deviation of the distribution
Φ\Phi
the standard normal cumulative distribution function

How it works

A Z-score says how many standard deviations a value lies from the mean. It puts measurements from different scales on one footing, and, if the values are normally distributed, converts directly to a percentile or a probability: a Z of 1.96 has 2.5% of values above it.

For a data set the tool uses the sample's own mean and standard deviation. Z-scores are often used to flag unusual values, with ±2 or ±3 as common thresholds. In a small sample the largest attainable |Z| is (n − 1)/√n, so in a sample of eight no value can reach 3, and a Z-score rule cannot flag outliers there.

Worked example

A value of 128 from a population with mean 100 and standard deviation 15.

  1. Z = (128 − 100) / 15 = 1.867.
  2. Percentile = Φ(1.867) = 96.90%; the one-sided probability above is 0.0310.

Z = 1.87, the 96.9th percentile. The chance of a value at least this far from the mean, in either direction, is 0.062.

These are the values the calculator opens with, so you can check its output against this example.

Assumptions

  • For probabilities, a normal distribution with the stated mean and standard deviation.
  • For a data set, that the sample's mean and standard deviation describe it.

Common mistakes

  • Interpreting a probability as certain when the data are not normal.
  • Using a Z-score cut-off on a small sample, where it is mathematically limited.
  • Mixing up population σ with the sample SD.