Change of Variables

We want to see what happens when we change the values of in a population (or sample) by To do this we will start with a population.

We need to start with some data. We will generate a list of data on the calculator using GNRND4 with Key 1=2677354404 and Key 2=50002500. That list will be the same numbers that appear in the following table:
Figure 1
Set up the calculator and start the GNRND4 program.
Figure 2
Give the program the correct key values.
Figure 3
The program produces the list of values shown above. Figure 3 shows the start of the list as the program displays it. Then we look at the list after the program has completed. In that display we have moved to display the end of the list.

Finally, in Figure 3 we have moved to the STT menu, the CALC sub-menu, and selcted the 1-Var Stats command.

Figure 4
Figure 4 gives the two important values for our discussion here, namely the mean 25.23288889 and the standard deviation 5.352759464. Note that the discussion here will focus on the population standard deviation, but the same conclusions are true for the sample standard deviation.
Figure 5
Figure 5 completes the "picture" of the original data list.

The actions that we will take below to change the variable will also change these values. However, the discussion on this page is not really concerned about such changes. In each case we will show those changes to the values shown in Figure 5 and we will comment on them, but we will do so in italics to distinguish them from the more important discussions about changes to the eman and standard deviation.

Figure 6
In Figure 6 we generate the changed variables.
  • add a constant to each value: we add 11 to each value in L1 to produce L2,
  • multiply each value times a constant: we multiply each value in L1 by 15 to produce the values in L3,
  • both add one constant and multiply the sum by a different constant: We subtract 20, i.e., add 20, to each value in L1 and then multiply that result by .5 to produce the values in L4.
In each case we can see the first few items in the newly generated lists to confirm our actions.
Figure 7
Figure 7 repeats the last tranformation style, add a constant and then multiply the sum by a constant, but it does so with two special constants. First we add the opposite of the original mean of L1, i.e., we subtract that mean from each original value, then we divide that result by the original standard deviation, i.e., we multiply by the reciprocal of the standard deviation of L1, to get the new list of values in L5.

Then, after constructing our new lists we start to investigate them, first using 1-Var Stats L2 to look, in Figure 8, at the second list.

Figure 8
Compare the mean and standard deviation given in Figure 8 to the corresponding values in Figure 4. The mean has increased by the amount that we added to L1 to produce L2, namely, 11.

However, the standard deviation has not changed. This is an important concept. Adding a constant to a set of data does not change the standard deviation of that data.

Figure 9
Compare Figure 9 to the values in Figure 5. Each value has increased by 11, the amount that we added to the items of the original list.
Figure 10
Set up the examination of the values in L3.
Figure 11
Compare the mean and standard deviation given in Figure 11 to the corresponding values in Figure 4. The new mean is 15 times the old one. The new standard deviation is 15 times the old one. That is the same multiplier that we used on L1 to produce L2.

The important concept here is that multiplying a set of data by a constant results in multiplying the standard deviation by the same value.

Figure 12
Compare Figure 12 to the values in Figure 5. Each value has multiplied by 15, the amount that we multiplied times the items of the original list.
Figure 13
Set up the examination of the values in L4.
Figure 14
Compare the values for L4 in Figure 14 to those for L1 in Figure 5. Remember that we produced L4 via (L1-20)*.5L1. The new mean shows exactly the same transformation.

However, the new standard deviation is just 0.5 times the old standard deviation. This reinforces the concept that the mean changes in the same way that the data changes, but the standard deviation only changes by the amount of the multiplier.

Figure 15
Compare Figure 15 to the values in Figure 5. Each value has is equal to the value in Figure 5 minus 20 and then the result multiplied by 0.5, exactly the same transformation that we used on the original data.
Figure 16
Set up the examination of the values in L5.
Figure 17
Again we compare the mean and standard deviation in Figure 17 with the same values in Figure 5. As we saw above, the mean has changed by the same transformation. However, because we tried, in Figure 7, to subtract the mean of L1 from the values in L1, our new mean is about as close to 0 as we can get. The new mean is expressed as 1.665111E12. This is the calculator notation for 1.665111*10–12 which we would expand as 0.000000000001665111, or, for all practical purposes, 0.

Then, because, back in Figure 7, we tried to divide the results by the standard deviation of L1, the resulting standard deviation has changed to be essentially 1. The difference is due to the approximation that we used in our calculation. We can try to improve on those approximations by using the exact values for the mean and standard deviation of L1 in a new version of the transformation that we did in Figure 7.

Figure 18
Compare Figure 18 to the values in Figure 5.
Figure 19
In order to redo the calculations of Figure 7 using the calculator computed values, we need to redo the 1-Var Stats command for L1.
Figure 20
Figure 20 just redisplays the output from our 1-Var Stats command.
Figure 21
Create L6 using the computed values of the mean and standard deviation of L1. We find these values in the VARS menu using the Statistics option. At the end of the command we save the results in L6.

Then set up the examination of the values in L3.

Figure 22
Using the new values we have moved to be a bit closer to 0 for the new mean, and the new standard deviation is so close to 1 that the calcualtor has rounded the value to be 1.

©Roger M. Palay
Saline, MI 48176
October, 2012