A Z‑score (also called a standard score) measures how far a single observation lies from the mean of a dataset in units of standard deviations. It answers the question: “How many standard deviations above or below the mean is this value?” Z‑scores are widely used in statistics, finance, testing, medicine and quality control to standardize values, detect outliers and compare results across different scales.
Key takeaways
– Z‑score formula (population): z = (x − μ) / σ
– Z‑score formula (sample): z = (x − x̄) / s, where s is the sample standard deviation (usually computed with N−1)
– Interpreting z: z = 0 means the value equals the mean; positive z means above the mean; negative z means below.
– Empirical (normal) rule: ≈68% of values lie within ±1σ, 95% within ±2σ, 99.7% within ±3σ (for roughly normal data).
– Z‑scores assume you’ve measured dispersion with a standard deviation; if data are skewed or heavy‑tailed, results can be misleading.
Understanding the Z‑score (intuition)
– Standardizes different units: a z‑score places observations on the same scale (standard deviations), so you can compare test scores, returns, or measurements that have different means and variances.
– Shows extremeness: high absolute z (e.g., |z| > 2 or 3) suggests the observation is far from the typical value.
– Gives direct link to probability (via the standard normal distribution): you can convert z to percentiles or p‑values.
Z‑score formulas
– Population z‑score:
z = (x − μ) / σ
where x is the observation, μ is the population mean, σ is the population standard deviation.
– Sample z‑score:
z = (x − x̄) / s
where x̄ is the sample mean and s is the sample standard deviation (often computed using N−1).
How to calculate a Z‑score — step‑by‑step
1. Define the dataset and the observation x you want to standardize.
2. Decide whether you’re treating the data as a sample or as the full population (affects which SD you use).
3. Compute the mean:
• Population mean μ or sample mean x̄ = (Σxi) / N.
4. Compute the standard deviation:
• Population σ = sqrt[(Σ(xi − μ)²) / N].
• Sample s = sqrt[(Σ(xi − x̄)²) / (N − 1)].
5. Apply the formula: z = (x − mean) / standard deviation.
6. Interpret z:
• z ≈ 0: near average
• |z| ≈ 1: one standard deviation away
• |z| ≥ 2: unusually far (≈5% two‑tailed beyond ±2 if normal)
• |z| ≥ 3: very extreme (≈0.3% two‑tailed beyond ±3 if normal)
Numeric example
– Data set mean x̄ = 12.17 and sample SD s = 6.4 (example numbers often used).
– If x = 20:
z = (20 − 12.17) / 6.4 ≈ 7.83 / 6.4 ≈ 1.22.
Interpretation: the value 20 is about 1.22 standard deviations above the mean (roughly at the 89th percentile for a normal distribution).
Spreadsheets — Excel / Google Sheets practical formulas
– Mean: =AVERAGE(range)
– Sample standard deviation: =STDEV.S(range) (Excel/Sheets)
– Population standard deviation: =STDEV.P(range)
– Z‑score for a cell A2 with data in A2:A11 (sample):
=(A2 – AVERAGE($A$2:$A$11)) / STDEV.S($A$2:$A$11)
– Standard normal cumulative (percentile) from z:
=NORM.S.DIST(z, TRUE)
– Convert percentile back to z:
=NORM.S.INV(percentile)
How the Z‑score is used (practical applications)
– Hypothesis testing and p‑values: convert sample statistics to z and reference the standard normal for probabilities.
– Comparing different tests or measures: standardize scores across different scales (e.g., test scores, lab results).
– Outlier detection: flag observations with |z| above a chosen threshold (commonly 2 or 3).
– Finance and trading:
• Quant traders use z‑scores to measure how far returns deviate from historical averages and to identify mean‑reversion opportunities.
• Volatility scaling: normalize returns by their rolling standard deviation.
• Factor construction: standardize factor returns across stocks before weighting or combining them.
• Strategy analysis: test win/loss streaks and confidence limits using z‑based measures.
– Medicine and growth charts: z‑scores show how a patient’s measurement compares with population norms (e.g., BMI‑for‑age z‑score).
Z‑Scores vs. Standard deviation — relationship
– Standard deviation is a measure of spread/dispersion for a dataset.
– Z‑score converts a single observation’s deviation from the mean into units of standard deviation. In short: z uses SD (z = deviation / SD).
Interpreting z‑scores in practice — what’s “good”?
– There’s no universal “good” z‑score — it depends on context.
– For quality control or anomaly detection, small |z| (close to zero) might be desirable.
– For contrarian mean‑reversion trading, large positive or negative z may indicate opportunities.
– Typical cutoffs:
• |z| > 1.5 or 2: worth investigation
• |z| > 3: extreme/outlier under normality assumptions
– Remember: these rules rely on (approximate) normality; heavy tails or skewness change interpretation.
Why Z‑scores matter
– They give a standardized, comparable measure of how unusual a datum is relative to its peers.
– They link directly to probabilities via the standard normal distribution, enabling hypothesis testing and percentile calculations.
– In finance, they support risk controls, factor standardization and signal generation.
Limitations and cautions
– Assumes distribution shape: interpretation using the empirical rule depends on approximate normality. If data are skewed or heavy‑tailed, z‑scores over/understate rarity.
– Nonstationarity: means and standard deviations can change over time in finance — use rolling windows or regime‑aware methods.
– Serial correlation: time‑series data often aren’t independent; z‑score methods assume independent observations for some statistical inferences.
– Robust alternatives: use median and MAD (median absolute deviation) or transform data (e.g., winsorize, log) when outliers or nonnormality are present.
Practical steps for applying Z‑scores (for a trader or analyst)
1. Collect a relevant dataset (returns, measurements, scores) and confirm time frame and frequency.
2. Visualize distribution (histogram, QQ‑plot); check skewness/kurtosis.
3. Choose window and method for mean/SD estimation (static vs rolling; sample vs population).
4. Compute z‑scores using formula with the chosen mean and SD.
5. Convert z to percentile or p‑value if you need probabilities (Excel: NORM.S.DIST).
6. Apply your decision rule (e.g., flag |z| > 2, scale position size by inverse volatility).
7. Backtest or validate any trading or control rule; adjust for nonstationarity.
8. Consider robust or parametric alternatives if data deviate substantially from normality.
Altman Z‑Score — a different metric
– Note: the Altman Z‑score is a distinct bankruptcy‑prediction model (uses financial ratios). Don’t confuse the statistical z‑score with Altman’s bankruptcy formula. (See: Business Compass / Altman Z‑Score literature.)
Converting z to probability / percentile quickly
– One‑tailed p‑value (probability of being ≤ observed if mean 0): p = Φ(z) where Φ is standard normal CDF.
– Two‑tailed p‑value for extremeness: p = 2 × (1 − Φ(|z|)).
– In Excel: =NORM.S.DIST(z, TRUE) gives Φ(z); =1 − NORM.S.DIST(|z|, TRUE) gives upper tail.
References and further reading
– Investopedia, “Z‑Score” (Tara Anand). (Source overview used for this article.)
– Penn State Eberly College of Science, STAT 500: “Probabilities for Normal Random Variables (Z‑scores)” and “The Empirical Rule.”
– Zhao, Tianyang (2015). “The Relationship Between Z‑Score and Stock Prices.” (academic analysis)
– Business Compass, LLC. “Corporate Distress & Bankruptcy: Altman Z‑Score+.”
The bottom line
A Z‑score standardizes an observation in terms of standard deviations from the mean so you can compare, quantify extremeness and convert to probabilities. It’s simple to compute and very useful, but interpret it with care: check distributional assumptions, update estimates for changing data, and use robust alternatives when appropriate.