The Student Room Group

S1- How does coding affect the mean / standard deviation?

Hi guys, I just wanted to know how coding afects the values for mean and standard deviation. So say I multiplied all the data by 10, how would this affect the standard deviation and the mean? Would it have the same effect if I added / took away a number? If not how would it affect the mean and the S.D?

Any responses much appreciated.

Thanks in advance.

EDIT: and also, how would the mean and S.D be affected if I multiplied the data by a constant and added/ took away a number at the same time?
Reply 1
If E(X)=x and Var(X)=y, then

E(aX+b)=ax+b


Var(aX+b)=a²y
i.e. for variance if you multiply the data by ten, the variance is multiplied by 100.
Reply 2
Thankyou yet again :smile:
Hi, your answer is very good but could you explain why it is like that? Very appreciate.