12
$\begingroup$

I am looking for a method to transform my dataset from its current mean and standard deviation to a target mean and a target standard deviation. Basically, I want to shrink/expand the dispersion and scale all numbers to a mean.

It doesn't work to do two separate linear transformations, one for standard deviation, and then one for mean. What method should I use?

Could the solution possibly be applied to an example where a point 1.02 in a dataset with SD .4 and a mean 0.88 is transformed when I adjust the mean of the dataset to 0.5 and the SD to 0.1667? What is the new value of the point?

$\endgroup$
  • 3
    $\begingroup$ If $Y = aX + b$, then $E(Y) = a E(X) + b$ and $Var(Y) = a^2 Var(X)$. Does this help? $\endgroup$ – ocram Dec 22 '12 at 9:00
  • $\begingroup$ @ocram, I think that's an answer (and a good one)... $\endgroup$ – Peter Ellis Dec 22 '12 at 10:09
  • $\begingroup$ @PeterEllis: Thanks! I'll make it an answer then :-) $\endgroup$ – ocram Dec 22 '12 at 10:20
  • $\begingroup$ @ocram Thanks much for your answer, and I sense it's what I need. But could you provide an example calculation? Quite frankly, I have very little statistics background. I will edit my post to have more detail $\endgroup$ – Wagtail Dec 22 '12 at 10:23
29
$\begingroup$

Suppose you start $\{x_i\}$ with mean $m_1$ and non-zero standard deviation $s_1$ and you want to arrive at a similar set with mean $m_2$ and standard deviation $s_2$.

Then multiplying all your values by $\frac{s_2}{s_1}$ will give a set with mean $m_1 \times \frac{s_2}{s_1}$ and standard deviation $s_2$.

Now adding $m_2 - m_1 \times \frac{s_2}{s_1}$ will give a set with mean $m_2$ and standard deviation $s_2$.

So a new set $\{y_i\}$ with $$y_i= m_2+ (x_i- m_1) \times \frac{s_2}{s_1} $$ has mean $m_2$ and standard deviation $s_2$.

You would get the same result with the three steps: translate the mean to $0$, scale to the desired standard deviation; translate to the desired mean.

$\endgroup$
  • $\begingroup$ Thanks, clear and helpful explanation. $\endgroup$ – asmgx May 26 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.