Question: There are 23 employees in a particular division of a company. Their salaries have a mean of \$70,000, a median of \$55,000, and a standard deviation of \$20,000. The largest number on the list is \$100,000. By accident, this number is changed to \$1,000,000.
I am asked to calculate the new standard deviation, which is $$ \sqrt{ \frac{\displaystyle \sum_{i=1}^{n}(x_{i}-\bar{x})^{2}}{n-1} } $$
where $\bar{x}$ is the new mean, which is $$ \frac{23\cdot 70,000-100,000+1,000,000}{23}=109,130.43 $$
Plugging in $\bar{x}$, I need to calculate $$ \sqrt{ \frac{\displaystyle \sum_{i=1}^{n}(x_{i}-109,130.43)^{2}}{22} } $$
Here's where I'm having trouble. How can I calculate the new standard deviation without knowing each $x_{i}$?
It doesn't seem to help that I know the old standard deviation is $$ \sqrt{ \frac{\displaystyle \sum_{i=1}^{n}(x_{i}-70,000)^{2}}{22} }=20,000 $$ since I don't think the new standard deviation can be rewritten to include this expression.
I have seen the solution and understood it. The equality $\displaystyle \sum_{i=1}^{n}(x_{i}-\bar{x})^{2}=\displaystyle \sum_{i=1}^{n}x_{i}^{2}-n\bar{x}^{2}$, credit to Andrei for pointing it out, seems to simplify things significantly.
Note: all numbers will be in thousands.
For the original set of $n=23$ numbers containing 100:
For convenience, we define the following $$T_{0}=\displaystyle \sum_{i=1}^{n}x_{i}^{2}$$
Let $\bar{x}_{0}=70,V_{0},S_{0}$ be the mean, variance, standard deviation. We have $$ V_{0}=S_{0}^{2}=400=\frac{1}{n-1}(T_{0}-n\bar{x}_{0}^{2}) $$ We get $T_{0}=121,500$ after solving for it.
For the changed set of $n=23$ numbers containing 1000:
$$T_{1}=T_{0}-100^{2}+1000^{2}=1,111,500$$ Let $\bar{x}_{1}=109.13043,V_{1},S_{1}$ be the new mean, variance, and standard deviation $$\displaylines{ V_{1}=S_{1}^{2}=\frac{1}{n-1}(T_{1}-n\bar{x}_{1}^{2}) }$$ After solving, we get that $S_{1}=195.12$ and we are done.
The new standard deviation is \$195,120.