Unit 2, lesson 9

Z-Scores and Changes of Scale

What a z-score measures, how standardization rescales data to mean 0 and standard deviation 1, and how shifts, changes of scale, linear transformations and unit conversions affect the mean and spread.

  • Video 9
  • Center, Spread and Position

A student scores 7474 on a chemistry test where the class mean is 6262 and the standard deviation is 88, and 6565 on a history test where the mean is 5050 and the standard deviation is 1010. The two tests are on different scales, so setting 7474 beside 6565 says little. Yet each score lies exactly 1.51.5 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 μ\mu and standard deviation σ>0\sigma > 0. The z-score of a value xx relative to that reference is

z=x−μσ.z = \frac{x - \mu}{\sigma} .

When the reference is a sample, the sample mean xˉ\bar{x} and the sample standard deviation s>0s > 0 take the places of μ\mu and σ\sigma. A z-score is a pure number, because the units of x−μx - \mu and of σ\sigma cancel. It is positive above the mean, negative below it and 00 at the mean. It is undefined when the standard deviation is 00, 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 7474 has z=(74−62)/8=1.5z = (74 - 62)/8 = 1.5, and on the history test the score 6565 has z=(65−50)/10=1.5z = (65 - 50)/10 = 1.5. A history score of 3030 would have z=(30−50)/10=−2z = (30 - 50)/10 = -2, two standard deviations below the mean. The scores 7474 and 6565 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 aa to every observation, replacing each xix_i by xi+ax_i + a. The mean, the median and the quartiles all move by aa. Every deviation from the mean stays the same, since

(xi+a)−(xˉ+a)=xi−xˉ,\begin{aligned} &(x_i + a) - (\bar{x} + a) \\[0.4em] &\quad = x_i - \bar{x} , \end{aligned}

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 55 bonus points. The mean becomes 6767, the standard deviation stays 88, and the score 7474 becomes 7979. Its z-score is (79−67)/8=1.5(79 - 67)/8 = 1.5, 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 bb, replacing xix_i by yi=bxiy_i = b x_i. Every deviation from the mean is multiplied by bb, so every squared deviation is multiplied by b2b^2, and

yˉ=b xˉ,sy2=b2sx2,sy=∣b∣ sx.\begin{gathered} \bar{y} = b\,\bar{x}, \\[0.4em] s_y^2 = b^2 s_x^2, \\[0.4em] s_y = \lvert b \rvert\, s_x . \end{gathered}

The same rules hold for the population mean, variance and standard deviation, and the IQR and MAD are also multiplied by ∣b∣\lvert b \rvert. A positive bb keeps the order of the observations and every z-score. A negative bb reverses the order and changes the sign of every z-score. With b=0b = 0 every value becomes 00, the standard deviation is 00, 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 ∣b∣\lvert b \rvert, and the variance, which is in squared units, by b2b^2. 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 5050 and standard deviation 1010 by −2-2. The new mean is −100-100, the new standard deviation is ∣−2∣⋅10=20\lvert -2 \rvert \cdot 10 = 20, and the variance goes from 100100 to 400400. The score 6565, which had z=1.5z = 1.5, becomes −130-130, with z-score (−130+100)/20=−1.5(-130 + 100)/20 = -1.5. The size of the standardized distance is unchanged and its sign is reversed.

Linear transformation

Definition A linear transformation of the data replaces each xix_i by yi=a+bxiy_i = a + b x_i for constants aa and bb, a change of scale followed by a shift. Statistics calls this linear even when a≠0a \ne 0, although linear algebra would call it affine. The deviations satisfy yi−yˉ=b(xi−xˉ)y_i - \bar{y} = b(x_i - \bar{x}), because aa cancels, and so

yˉ=a+b xˉ,sy2=b2sx2,sy=∣b∣ sx.\begin{gathered} \bar{y} = a + b\,\bar{x}, \\[0.4em] s_y^2 = b^2 s_x^2, \\[0.4em] s_y = \lvert b \rvert\, s_x . \end{gathered}

The same rules hold for population summaries, provided the same divisor is used before and after. When sx>0s_x > 0 and b≠0b \ne 0, the z-score of each yiy_i equals the z-score of xix_i if b>0b > 0 and its negative if b<0b < 0.

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 ∣b∣\lvert b \rvert, so the new standard deviation ignores aa completely.

Example Reverse the history scores xx, which have mean 5050 and standard deviation 1010, with the formula y=100−2xy = 100 - 2x. The new mean is 100−2⋅50=0100 - 2 \cdot 50 = 0, and the new standard deviation is ∣−2∣⋅10=20\lvert -2 \rvert \cdot 10 = 20. The score 6565 becomes 100−130=−30100 - 130 = -30, with z-score (−30−0)/20=−1.5(-30 - 0)/20 = -1.5, the negative of its original 1.51.5.

Standardization

Definition Standardizing a dataset with mean xˉ\bar{x} and standard deviation s>0s > 0 replaces every observation xix_i, for i=1,…,ni = 1, \dots, n, by its z-score

zi=xi−xˉs.z_i = \frac{x_i - \bar{x}}{s} .

This is the linear transformation with b=1/sb = 1/s and a=−xˉ/sa = -\bar{x}/s, so the standardized values have mean 00 and standard deviation 11, computed with the same divisor as ss. A population standardized with μ\mu and σ>0\sigma > 0 likewise gets mean 00 and standard deviation 11. Because b>0b > 0, 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 00 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 00, 00, 00 and 44 have mean 11 and squared deviations 11, 11, 11 and 99, which total 1212. The sample variance is 12/3=412/3 = 4, so s=2s = 2. The z-scores are −0.5-0.5, −0.5-0.5, −0.5-0.5 and 1.51.5, which have mean 00 and sample standard deviation 11. 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 6060 from hours to minutes, and some also add a constant, such as

F=32+1.8 CF = 32 + 1.8\,C

from degrees Celsius to degrees Fahrenheit. A conversion of the form y=a+bxy = a + bx with b>0b > 0 is a linear transformation, so means and quartiles convert like single values, standard deviations, IQRs and MADs are multiplied by bb alone, variances are multiplied by b2b^2, 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 2020 degrees Celsius and standard deviation 55 degrees. In Fahrenheit the mean is 32+1.8⋅20=6832 + 1.8 \cdot 20 = 68 degrees and the standard deviation is 1.8⋅5=91.8 \cdot 5 = 9 degrees, not 32+1.8⋅5=4132 + 1.8 \cdot 5 = 41. The variance goes from 2525 square degrees Celsius to 8181 square degrees Fahrenheit. A reading of 3030 degrees Celsius is 8686 degrees Fahrenheit, and its z-score is (30−20)/5=2(30 - 20)/5 = 2 in Celsius and (86−68)/9=2(86 - 68)/9 = 2 in Fahrenheit.

Check yourself

  1. A reference group has mean 8080 and standard deviation 88. Find the z-score of 6868. Then find it again after 55 points are added to every value, and separately after every value is multiplied by 1.251.25.
Show the answer

The z-score is (68−80)/8=−12/8=−1.5(68 - 80)/8 = -12/8 = -1.5, so 6868 lies one and a half standard deviations below the mean. After the shift the value is 7373, the mean is 8585 and the standard deviation is still 88, so the z-score is (73−85)/8=−1.5(73 - 85)/8 = -1.5. After multiplying by 1.251.25 the value is 8585, the mean is 100100 and the standard deviation is 1010, so the z-score is (85−100)/10=−1.5(85 - 100)/10 = -1.5 again. Neither a shift nor a positive change of scale moves a value’s standardized position.

  1. Travel times on a route have mean 1.51.5 hours, standard deviation 0.40.4 hours, median 1.41.4 hours and IQR 0.50.5 hours. The times are converted to minutes and a fixed boarding time of 1010 minutes is added. Predict the new mean, standard deviation, variance, median and IQR, and the z-score of a trip of 2.32.3 hours before and after.
Show the answer

The new time is y=10+60xy = 10 + 60x minutes, a linear transformation with a=10a = 10 and b=60b = 60. The mean becomes 10+60⋅1.5=10010 + 60 \cdot 1.5 = 100 minutes and the median 10+60⋅1.4=9410 + 60 \cdot 1.4 = 94 minutes. The standard deviation becomes 60⋅0.4=2460 \cdot 0.4 = 24 minutes, not 3434, the variance 242=57624^2 = 576 square minutes, and the IQR 60⋅0.5=3060 \cdot 0.5 = 30 minutes, because the added 1010 minutes cancels from every distance. The trip of 2.32.3 hours has z-score (2.3−1.5)/0.4=2(2.3 - 1.5)/0.4 = 2. On the new scale it becomes 10+60⋅2.3=14810 + 60 \cdot 2.3 = 148 minutes, and its z-score is (148−100)/24=2(148 - 100)/24 = 2, unchanged as it should be.

  1. In a class of 1313 students, nine scored 6060 and four scored 9090. Treat the class as the whole reference group. Find the mean, the standard deviation and the z-score of 9090, and the share of the class that scored at or above 9090. Under a normal model, about 6.7 percent of values lie more than 1.51.5 standard deviations above the mean. What does the comparison show?
Show the answer

The mean is μ=(9⋅60+4⋅90)/13=900/13≈69.23\mu = (9 \cdot 60 + 4 \cdot 90)/13 = 900/13 \approx 69.23. The deviations are −120/13-120/13 for the nine scores of 6060 and 270/13270/13 for the four scores of 9090, so

σ2=9⋅1202+4⋅2702133=32400169,\begin{aligned} \sigma^2 &= \frac{9 \cdot 120^2 + 4 \cdot 270^2}{13^3} \\[0.4em] &= \frac{32400}{169} , \end{aligned}

and σ=180/13≈13.85\sigma = 180/13 \approx 13.85. The z-score of 9090 is (270/13)/(180/13)=1.5(270/13)/(180/13) = 1.5. Yet 44 of the 1313 students, about 31 percent, scored at or above 9090, 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.

How this lesson connects