# If you were to add 5 to each value in a data set, what effect would this have on the standard deviation of the data set?

Dec 20, 2014

Adding 5 to every value in a data set has no effect on the standard deviation of the data set.

Recall that the formula for standard deviation of a sample is:

s = sqrt((sum_(i=1)^n (x_i-barx)^2)/(n-1)

Of the terms in the equation, $n$ will not be affected by the adjustment, as we still have the same number of values. Recall that $\overline{x} = \frac{{\sum}_{i = 1}^{n} {x}_{i}}{n}$. All of our ${x}_{i}$ values are being modified by $+ 5$; what effect will this have on $\overline{x}$? Our new $\overline{x}$, denoted by $\overline{x} '$, can be calculated from our old ${x}_{i}$ values as follows:

$\overline{x} ' = \frac{{\sum}_{i = 1}^{n} \left({x}_{i} + 5\right)}{n}$.

Recall, ${\sum}_{i = 1}^{n} \left({x}_{i} + c\right) = {\sum}_{i = 1}^{n} {x}_{i} + {\sum}_{i = 1}^{n} c$ Further, if $c$ is a constant that does not change as $i$ changes (i.e. $c = {c}_{1} = {c}_{2} = {c}_{3} = \ldots = {c}_{n}$), then we are adding $c$ to itself $n$ times, which is the same as multiplying $c$ by $n$, such that ${\sum}_{i = 1}^{n} c = n c$. Thus:

$\overline{x} ' = \frac{{\sum}_{i = 1}^{n} \left({x}_{i} + 5\right)}{n} = \frac{{\sum}_{i = 1}^{n} x + {\sum}_{i = 1}^{n} 5}{n} = \frac{{\sum}_{i = 1}^{n} x}{n} + \frac{{\sum}_{i = 1}^{n} 5}{n} = \frac{{\sum}_{i = 1}^{n} x}{n} + \frac{5 n}{n} = \frac{{\sum}_{i = 1}^{n} x}{n} + 5 = \overline{x} + 5$

Thus, when calculating our standard deviation for the new $x {'}_{i}$, defined such that $x {'}_{i} = {x}_{i} + 5$, our standard deviation will be:

s' = sqrt((sum_(i=1)^n(x'_i - bar x')^2) /(n-1)

Given that $x {'}_{i} = {x}_{i} + 5$, and $\overline{x} ' = \overline{x} + 5$, each term in the summation will be ${\left({x}_{i} + 5 - \overline{x} - 5\right)}^{2} = {\left({x}_{i} - \overline{x} + 5 - 5\right)}^{2} = {\left({x}_{i} - \overline{x}\right)}^{2}$, which is the term from our initial formula. Thus $s ' = s$.

As a general rule, the median, mean, and quartiles will be changed by adding a constant to each value. However, the range, interquartile range, standard deviation and variance will remain the same. Multiplying every value by a constant, however, will multiply the mean, median, quartiles, range, interquartile range, and standard deviation by that constant, and multiply the variance (which is simply the square of the standard deviation) by the square of that constant.

Dec 20, 2014

Adding a constant to each value in a data set does not change the distance between values so the standard deviation remains the same.

For example, consider the following numbers

$2 , 3 , 4 , 4 , 5 , 6 , 8 , 10$ for this set of data the standard deviation would be

$s = \sqrt{\frac{{\sum}_{\text{i=1}}^{n} {\left({x}_{i} - \overline{x}\right)}^{2}}{n - 1}}$

$s = \sqrt{\frac{{\left(2 - 5.25\right)}^{2} + {\left(3 - 5.25\right)}^{2} + \ldots + {\left(10 - 5.25\right)}^{2}}{8 - 1}}$

$s = 2.65922$

If we were to add 5 to each value in this data set, the new set of values would be:
$7 , 8 , 9 , 9 , 10 , 11 , 13 , 15$

$s = \sqrt{\frac{{\left(7 - 10.25\right)}^{2} + {\left(8 - 10.25\right)}^{2} + \ldots + {\left(15 - 10.25\right)}^{2}}{8 - 1}}$

$s = 2.65922$

As you can see the s.d. remains the same unless you multiply every value by a constant.

Standard Deviation Calculator