4
$\begingroup$

I have a set of data with a certain mean, variance, and standard deviation. I centered the mean around the origin the standard way by subtracting it from the data.

Now how do I modify the data to make variance = 1?

1 Answers 1

7

Just divide everything by the standard deviation.

Suppose first that you have a finite data set $x_1,x_2,x_3,\ldots,x_n$.

Let $\overline{x} = (x_1+\cdots+x_n)/n$ be the mean and $s=\sqrt{(1/n)\sum_{i=1}^n (x_i - \overline{x})^2}$ be the standard deviation. Let $y_i=x_i/s$, i.e. we're dividing everything by the standard deviation. Then $ \overline{y} = \frac{y_1+\cdots+y_n}{n} = \frac{\frac{x_1}{s}+ \cdots+\frac{x_n}{s}}{n} = \frac 1 s \cdot \frac{x_1+\cdots+x_n}{n} = \frac{\overline{x}}{s}. $ And the standard deviation of the $y$-values is $ \sqrt{\frac 1 n ((y_1-\overline{y})^2 + \cdots+(y_n-\overline{y})^2)} = \sqrt{\frac 1 n \left( \left(\frac{x_1}{s}-\frac{\overline{x}}{s}\right)^2+ \cdots + \left(\frac{x_n}{s}-\frac{\overline{x}}{s}\right)^2\right)} $ $ = \frac{1}{\sqrt{s^2}}\sqrt{\frac 1 n ((x_1-\overline{x})^2 + \cdots+(x_n-\overline{x})^2)} = \frac 1 s \cdot s = 1. $

For discrete data sets with non-uniform distributions, including infinite discrete data sets, one replaces $1/n$ with appropriate weights $p_i$. For continuous data sets, one uses integrals, but the argument is essentially the same.

  • 0
    @MichaelHardy: You're right, of course. Thanks for the correction.2012-05-21