A student scores on a chemistry test where the class mean is and the standard deviation is , and on a history test where the mean is and the standard deviation is . The two tests are on different scales, so setting beside says little. Yet each score lies exactly standard deviations above its class mean. This lesson defines that standardized distance, shows how adding a constant, rescaling and converting units affect means and standard deviations, and explains what a z-score does not tell you, such as a percentile.
Key terms
Z-score
Definition Let a reference distribution have mean and standard deviation . The z-score of a value relative to that reference is
When the reference is a sample, the sample mean and the sample standard deviation take the places of and . A z-score is a pure number, because the units of and of cancel. It is positive above the mean, negative below it and at the mean. It is undefined when the standard deviation is , since then every reference value is the same.
In plain words A z-score says how many standard deviations a value lies from the reference mean, and on which side. It describes position relative to one stated reference group, so the same raw score can have different z-scores against different groups. A z-score alone does not give a percentile. Turning it into a share of the group requires the whole distribution, or a model for it.
Example On the chemistry test the score has , and on the history test the score has . A history score of would have , two standard deviations below the mean. The scores and hold the same standardized position, but they need not sit at the same percentile of their classes, as the last question below shows.
Shift
Definition A shift adds the same constant to every observation, replacing each by . The mean, the median and the quartiles all move by . Every deviation from the mean stays the same, since
so the variance and the standard deviation do not change. The IQR and the MAD stay the same as well, because the quartiles and the median move together with the data. A value shifted together with its reference group keeps its z-score.
In plain words Sliding the whole dataset along the number line moves its center but not the distances between points, so no measure of spread changes. Adding the shift to the standard deviation as well is a common mistake.
Example Give every student on the chemistry test bonus points. The mean becomes , the standard deviation stays , and the score becomes . Its z-score is , the same as before, because the score and the mean moved together.
Change of scale
Definition A change of scale multiplies every observation by the same constant , replacing by . Every deviation from the mean is multiplied by , so every squared deviation is multiplied by , and
The same rules hold for the population mean, variance and standard deviation, and the IQR and MAD are also multiplied by . A positive keeps the order of the observations and every z-score. A negative reverses the order and changes the sign of every z-score. With every value becomes , the standard deviation is , and z-scores are undefined.
In plain words Rescaling the number line by a factor multiplies every distance by the size of that factor. The standard deviation is therefore multiplied by , and the variance, which is in squared units, by . A spread is a length and is never negative. A negative factor flips the data so that high values become low ones, but it does not make the standard deviation negative.
Example Multiply history scores with mean and standard deviation by . The new mean is , the new standard deviation is , and the variance goes from to . The score , which had , becomes , with z-score . The size of the standardized distance is unchanged and its sign is reversed.
Linear transformation
Definition A linear transformation of the data replaces each by for constants and , a change of scale followed by a shift. Statistics calls this linear even when , although linear algebra would call it affine. The deviations satisfy , because cancels, and so
The same rules hold for population summaries, provided the same divisor is used before and after. When and , the z-score of each equals the z-score of if and its negative if .
In plain words The mean follows the same formula as each data value. The shift moves the center and cancels from every deviation, and the factor multiplies the length of each deviation by , so the new standard deviation ignores completely.
Example Reverse the history scores , which have mean and standard deviation , with the formula . The new mean is , and the new standard deviation is . The score becomes , with z-score , the negative of its original .
Standardization
Definition Standardizing a dataset with mean and standard deviation replaces every observation , for , by its z-score
This is the linear transformation with and , so the standardized values have mean and standard deviation , computed with the same divisor as . A population standardized with and likewise gets mean and standard deviation . Because , standardization keeps the order of the values and the shape of the distribution.
In plain words Standardization puts any dataset with some spread on a common scale, centered at with unit spread. It relabels the axis and changes nothing else, so it does not make a skewed distribution symmetric or turn a non-normal distribution into a normal one. Calling values z-scores does not attach normal-curve percentiles to them.
Example The constructed values , , and have mean and squared deviations , , and , which total . The sample variance is , so . The z-scores are , , and , which have mean and sample standard deviation . Three values are still bunched together with one far above them, so the distribution is just as skewed as before.
Unit conversion
Definition A unit conversion expresses the same measurements in other units. Many conversions multiply by a positive factor, such as from hours to minutes, and some also add a constant, such as
from degrees Celsius to degrees Fahrenheit. A conversion of the form with is a linear transformation, so means and quartiles convert like single values, standard deviations, IQRs and MADs are multiplied by alone, variances are multiplied by , and every z-score stays the same.
In plain words Changing units changes the numbers but not the measurements, so a value’s position within its group stays the same. A conversion that adds a constant moves the zero point of the scale. That affects the mean but no distance, so the constant is never added to a standard deviation. Matching z-scores before and after a conversion is a quick check that the value, the mean and the spread were all converted consistently.
Example A constructed set of temperatures has mean degrees Celsius and standard deviation degrees. In Fahrenheit the mean is degrees and the standard deviation is degrees, not . The variance goes from square degrees Celsius to square degrees Fahrenheit. A reading of degrees Celsius is degrees Fahrenheit, and its z-score is in Celsius and in Fahrenheit.
Check yourself
- A reference group has mean and standard deviation . Find the z-score of . Then find it again after points are added to every value, and separately after every value is multiplied by .
Show the answer
The z-score is , so lies one and a half standard deviations below the mean. After the shift the value is , the mean is and the standard deviation is still , so the z-score is . After multiplying by the value is , the mean is and the standard deviation is , so the z-score is again. Neither a shift nor a positive change of scale moves a value’s standardized position.
- Travel times on a route have mean hours, standard deviation hours, median hours and IQR hours. The times are converted to minutes and a fixed boarding time of minutes is added. Predict the new mean, standard deviation, variance, median and IQR, and the z-score of a trip of hours before and after.
Show the answer
The new time is minutes, a linear transformation with and . The mean becomes minutes and the median minutes. The standard deviation becomes minutes, not , the variance square minutes, and the IQR minutes, because the added minutes cancels from every distance. The trip of hours has z-score . On the new scale it becomes minutes, and its z-score is , unchanged as it should be.
- In a class of students, nine scored and four scored . Treat the class as the whole reference group. Find the mean, the standard deviation and the z-score of , and the share of the class that scored at or above . Under a normal model, about 6.7 percent of values lie more than standard deviations above the mean. What does the comparison show?
Show the answer
The mean is . The deviations are for the nine scores of and for the four scores of , so
and . The z-score of is . Yet of the students, about 31 percent, scored at or above , far more than the 6.7 percent a normal model would suggest. The same z-score can sit at very different percentiles, because a z-score measures distance in standard deviations and says nothing by itself about the shape of the distribution.