How to calculate z score
The phrase how to calculate z score refers to converting a raw value x into a standardized value z that measures distance from the mean in units of the standard deviation. This standard score supports comparisons across different scales and connects raw values to the standard normal distribution.
Definition and notation
A z score (standard score) is a dimensionless number describing how far a value x lies from a distribution’s mean μ, measured in standard deviations σ.
Core definition
\[ z = \frac{x - \mu}{\sigma} \]
Positive z indicates x above the mean; negative z indicates x below the mean; z = 0 corresponds to x = μ.
Interpretation in standard-deviation units
- Magnitude: |z| equals the number of standard deviations from the mean.
- Sign: z > 0 lies to the right of μ; z < 0 lies to the left.
- Scale-free: units cancel because both numerator and denominator share the same units.
Standardization is also written as a linear transformation:
\[ x = \mu + z \cdot \sigma \]
This inverse relationship supports converting a known z back into a raw value x.
Worked example with complete calculation
Consider test scores modeled as approximately normal with mean μ = 80 and standard deviation σ = 4. For a score x = 86, the standard score becomes:
\[ z = \frac{86 - 80}{4} \]
\[ z = \frac{6}{4} = 1.5 \]
| Quantity | Meaning | Value |
|---|---|---|
| x | Observed raw value | 86 |
| μ | Mean (population or model mean) | 80 |
| σ | Standard deviation (population or model) | 4 |
| z | Standard score in standard-deviation units | 1.5 |
Visualization of standardization on a normal curve
Connection to percentiles and probabilities
Under a normal model, standardization converts \(X \sim \mathcal{N}(\mu,\sigma^2)\) to a standard normal variable:
\[ Z = \frac{X - \mu}{\sigma} \quad \Rightarrow \quad Z \sim \mathcal{N}(0,1) \]
The standard normal cumulative distribution function is denoted by \(\Phi(z)\). Typical probability expressions become:
\[ P(X \le x) = P\!\left(Z \le \frac{x-\mu}{\sigma}\right) = \Phi\!\left(\frac{x-\mu}{\sigma}\right) \]
\[ P(X \ge x) = 1 - \Phi\!\left(\frac{x-\mu}{\sigma}\right) \]
\[ P(a \le X \le b) = \Phi\!\left(\frac{b-\mu}{\sigma}\right) - \Phi\!\left(\frac{a-\mu}{\sigma}\right) \]
Reference values for Φ(z)
Many z tables report \(\Phi(z)=P(Z \le z)\). The table below lists common values used for percentiles and critical values.
| z | \(\Phi(z)\) | Percentile (≈ \(100 \cdot \Phi(z)\)) | Common use |
|---|---|---|---|
| 0.00 | 0.5000 | 50.00 | Mean / median of the standard normal |
| 1.00 | 0.8413 | 84.13 | One standard deviation above the mean |
| 1.50 | 0.9332 | 93.32 | Example in the figure |
| 1.645 | 0.9500 | 95.00 | One-sided 5% critical value |
| 1.96 | 0.9750 | 97.50 | Two-sided 5% (central 95%) critical value |
| 2.00 | 0.9772 | 97.72 | Approximately “two-sigma” bound |
| −1.00 | 0.1587 | 15.87 | Symmetry: \(\Phi(-z)=1-\Phi(z)\) |
| −1.96 | 0.0250 | 2.50 | Lower two-sided 5% critical value |
Sample-based z scores and standardization beyond normal models
In practice, sample estimates often replace population parameters. For a dataset with sample mean \(\bar{x}\) and sample standard deviation \(s\), a common standardized score is:
\[ z = \frac{x - \bar{x}}{s} \]
This quantity still measures distance from the sample mean in units of \(s\). The normal-table connection \(\Phi(z)\) remains appropriate only when a normal model is justified for the underlying variable or for an explicitly standardized normal approximation.
Common pitfalls and consistency checks
- Zero variability: \(\sigma = 0\) (or \(s = 0\)) makes \(z\) undefined because division by zero occurs.
- Unit mismatch: \(x\), \(\mu\), and \(\sigma\) must share the same units; mixing units breaks the standardization.
- Rounding: early rounding of \(z\) changes probabilities; a few extra decimals in \(z\) preserves accuracy before table lookup.
- Symmetry check: \(\Phi(-z) = 1 - \Phi(z)\) provides a quick validation for left-tail probabilities.
Summary statement
The z score formula \(z = (x - \mu)/\sigma\) expresses a raw value as a standard score on the standard normal scale, enabling percentile and probability calculations through \(\Phi(z)\) when a normal model is appropriate.