# How do I transform my data so that it has mean zero and standard deviation one?

Given a series of values,

3.00,5.00,7.00,4.00,7.00,5.00,22.00,4.00,6.00,7.00,9.00,6.00,4.00


I need to 'rescale' the data so they have new values with a mean of 0 and a standard deviation of 1. Having followed a number of examples for the equation, I get the following,

Mean    6.85
StdDev  4.85


The standard deviation I worked out the long way via taking an original value, subtracting the Mean, squaring the result, summing all the squares, dividing that sum by the count -1 before finally getting the square root of that.

(3.00 - 6.85) = -3.85    >    -3.85² = 14.79
(5.00 - 6.85) = -1.85    >    -1.85² =  3.41
...
(4.00 - 6.85) = -2.85    >    -2.85² =  8.10

Sum                                   281.69
Variance (using n -1)                  23.47
Standard Deviation                      4.85


I'm sure it's correct as I checked it here http://www.mathsisfun.com/data/standard-deviation-calculator.html

Using the mean and standard deviation I get new values of,

-0.79,-0.38,0.03,-0.59,0.03,-0.38,3.13,-0.59,-0.17,0.03,0.44,-0.17,-0.59


These values were calculated in the following manner

((3.00 - 6.85)/4.85) = -0.79
((5.00 - 6.85)/4.85) = -0.38
....
((4.00 - 6.85)/4.85) = -0.59


So, to my question.

It's the standard deviation that is the confusing part. I want my new values to have a Mean of 0, and a standard deviation of 1. When I work out the SD for my original values, I get an SD of 4.85. What do I need to do to get an SD of 1 ?

Thank you for taking the time to read the question. John.

• Your new values do have a standard deviation of $1$ because after subtracting the mean from each of your original values you divided by $4.85$. Where does the confusion arise? – M. Berk Sep 24 '13 at 11:11
• @M. Berk. Thank you. The confusion came about because, this is all rather new to me and I thought I would need to do soemthing to 4.85 to get a value of 1. – Johnny Sep 24 '13 at 11:25
• Take a look at gung's answer. He nicely explains the different transformations. In your case, you are doing a standardization. A standardized variable has a mean of $0$ and a standard deviation of $1$, which is also called standard score or $z$-score. – COOLSerdash Sep 24 '13 at 11:25
• @COOLSerdash. Brilliant, thanks. Another thing that has confused me are the terms used. Standardization / Normalization I now know are different things, but the terms are used interchangeably on a lot of sites. This will certainly help me. – Johnny Sep 24 '13 at 11:28
• @JTT. as mentioned ealier, this is new to me and I guess I expected to do something else to the new values to end up with a standard deviation value of 1, rather than 4.85. – Johnny Sep 24 '13 at 11:37

• +1 Note that division by $-4.85$ would have worked, too. :-) – whuber Sep 24 '13 at 20:31