Why Standardize an Observation?
A measurement is easier to interpret when its distance from a reference mean is expressed in units of standard deviation. For example, a difference of 4 points may be large in a class where scores usually vary by 2 points, but small in a class where they usually vary by 10. A z score makes that distance explicit through a short calculation.
The calculation requires a value, a mean, and a standard deviation that describe the same reference group and use the same measurement units. It can be applied to one observation when those summary values are known, or to each observation in a data set after calculating its mean and standard deviation.
The numerator \(x-\mu\), or \(x-\bar{x}\) for a sample, is the observation's deviation from the reference mean. Dividing by the standard deviation expresses that deviation in standard-deviation units. Since numerator and denominator have the same units, the units cancel: a z score is dimensionless.
Use a population mean with a population standard deviation, or a sample mean with a sample standard deviation. These are different conventions, so identify which reference set is being used before calculating. A z score is an arithmetic standardization; the calculation alone does not require the data to follow a normal distribution.
Calculating a Z Score From a Sample
For a sample of \(n\) observations, calculate \(\bar{x}\) and \(s\) using the sample formulas. In particular, the sample standard deviation uses \(n-1\) in its variance denominator. Then substitute the observation of interest and retain the sign of the subtraction.
Worked Example: Standardizing a Quiz Score
Suppose a hypothetical sample of five quiz scores is 12, 15, 15, 18, and 20 points. Calculate the sample z score for a score of 20 points.
First find the sample mean:
The deviations from the mean are \(-4,-1,-1,2,4\) points. Their squared values sum to \(16+1+1+4+16=38\) points squared. Thus:
The score of interest is 20, so its deviation from the mean is \(20-16=4\) points. Use the unrounded standard deviation in the calculation:
The sample z score for 20 points is approximately 1.298. Rounding \(s\) to 3.082 before dividing can slightly change the last reported digit, so it is preferable to keep the exact expression or full calculator precision until the final rounding.
Using Population Parameters
Sometimes the reference values describe an entire defined population rather than a sample. In that case, use the population mean and population standard deviation. The population standard deviation divides the sum of squared deviations by the number of population values, rather than by one less than that number.
Worked Example: Standardizing Values in a Defined Population
Consider a hypothetical population consisting of exactly three recorded values: 6, 8, and 10 seconds. Find the population z score for the value 10 seconds.
The population mean is:
The deviations from the population mean are \(-2,0,2\) seconds, whose squares sum to \(4+0+4=8\) seconds squared. Because these three values make up the defined population, divide by \(N=3\):
For the observation \(x=10\) seconds:
The population z score is approximately 1.225. The denominator was not replaced with a rounded decimal until after the calculation, so the reported value follows from the displayed expression.
Calculating Several Sample Z Scores
When standardizing every observation in a sample, use the same \(\bar{x}\) and \(s\) for all of them. The arithmetic can be organized in a table: record each observation, subtract the mean, divide by the sample standard deviation, and round only the final z score. Repeated values have the same z score because they have the same value and use the same reference summaries.
Worked Example: Finding Z Scores for a Small Data Set
For a hypothetical sample of measurements in centimeters, the observations are 5, 7, 7, 9, and 12. Calculate the sample z score for each observation.
The mean is \((5+7+7+9+12)/5=40/5=8\) cm. The deviations are \(-3,-1,-1,1,4\) cm, and their squared values sum to \(9+1+1+1+16=28\) cm squared. Therefore:
Now subtract 8 cm from each observation and divide by \(\sqrt{7}\) cm:
| Observation \(x\) (cm) | Deviation \(x-\bar{x}\) (cm) | Calculation | Z score |
|---|---|---|---|
| 5 | -3 | \(-3/\sqrt{7}\) | -1.134 |
| 7 | -1 | \(-1/\sqrt{7}\) | -0.3780 |
| 7 | -1 | \(-1/\sqrt{7}\) | -0.3780 |
| 9 | 1 | \(1/\sqrt{7}\) | 0.3780 |
| 12 | 4 | \(4/\sqrt{7}\) | 1.512 |
For instance, the score for 12 cm is \(4/\sqrt{7}\approx1.512\), not \(4/2.646\) rounded from an intermediate step if greater precision is needed. The table retains the original units for the observations and deviations, while the final z scores have no units.
Why the Standardized Sample Has Mean Zero and Standard Deviation One
When every observation in a sample is standardized using that sample's own mean and standard deviation, the resulting z scores have sample mean zero and sample standard deviation one. This follows directly from the definitions; it is not an additional assumption about the shape of the data.
For each observation, let \(z_i=(x_i-\bar{x})/s\). Since \(s\) is the same for every observation, \(\sum z_i=(1/s)\sum(x_i-\bar{x})=(1/s)(\sum x_i-n\bar{x})=0\), because \(\sum x_i=n\bar{x}\).
The mean of the z scores is \(\bar{z}=(\sum z_i)/n=0/n=0\).
Because \(\bar{z}=0\), their sample variance is \(\sum(z_i-\bar{z})^2/(n-1)=\sum z_i^2/(n-1)=\sum(x_i-\bar{x})^2/((n-1)s^2)=1\), by the definition of \(s^2\). Its square root, the sample standard deviation, is therefore 1.
This result is a useful arithmetic check when all the observations have been standardized with the sample formulas. Small departures from zero or one in a hand calculation can occur if intermediate values were rounded; larger departures may indicate an error in the mean, standard deviation, or division.
Checks, Limits, and Common Mistakes
Before reporting a z score, check that the observation, mean, and standard deviation refer to the same variable, reference group, and units. A measurement in seconds cannot be combined with a mean in minutes unless one is converted so that the units match. Also confirm that the standard deviation is positive. If it is zero, all values in the reference set are identical, and the z-score formula would require division by zero; no z score can be calculated by this formula.
A common mistake is to divide an observation by the standard deviation without first subtracting the mean. For example, with mean 50 and standard deviation 5, an observation of 60 has z score \((60-50)/5=2\), not \(60/5=12\). The subtraction measures the observation's deviation from the reference center; only that deviation is divided by the standard deviation.
- Do not mix conventions. Using \(\bar{x}\) with \(\sigma\), or \(\mu\) with \(s\), combines summaries from different definitions unless the problem explicitly establishes a reason to do so.
- Do not discard the subtraction's sign. Calculate \(x-\bar{x}\) or \(x-\mu\) as written; replacing a negative result with its absolute value changes the z score.
- Do not round too early. Keep a square-root expression or full calculator precision through the division, then round the final score.
- Do not treat a z score as a probability. It is a standardized measurement, not a probability or a statement about how likely an observation is.
Check Your Understanding
Try these questions using the formulas and checks above.
- A sample has mean 24 minutes and sample standard deviation 3 minutes. Calculate the sample z score for an observation of 30 minutes.
- A defined population has mean 100 units and population standard deviation 12 units. Calculate the population z score for an observation of 82 units.
- For the sample 2, 4, 6, 8, calculate its mean, sample standard deviation, and the sample z score for 8. Keep the square root unrounded until the final step.
- Explain why dividing an observation directly by a standard deviation does not generally calculate its z score.
- What happens to the z-score calculation if every value in the reference set is identical? Explain using the formula.