# The data set $\{x_1,\dots,x_{10}\}$ has a mean $\mu=10$ and a standard deviation $\sigma=3$. Find the value of $\sum_{i=1}^{10}[(x_i-12)^2]$.

### Problem

The data set $\{x_1,\dots,x_{10}\}$ has a mean $\mu=10$ and a standard deviation $\sigma=3$. Find the value of $$\sum_{i=1}^{10}\left[\left(x_i-12\right)^2\right]$$

### My solution

Using formulae for variance and mean,

$$\mu = \frac{1}{10}\sum_{1=1}^{10}x_i = 10 \implies \sum_{1=1}^{10}x_i = 100$$ $$\sigma^2 = \frac{1}{10}\sum_{i=1}^{10}\left(x_i^2\right)-\mu^2 = 9 \implies \sum_{i=1}^{10}x_i^2 = 10\left(9+\mu^2\right) = 1090$$

Then, with a bit of algebra,

\begin{align} \sum_{i=1}^{10}\left[(x_i-12)^2\right] &= \sum_{i=1}^{10}\left(x_i^2-24x_i+144\right) \\ &= \sum_{i=1}^{10}\left(x_i^2\right)-24\sum_{i=1}^{10}\left(x_i\right)+\sum_{i=1}^{10}\left(144\right) \\ &= 1040-24\left(100\right)+144\cdot10 \\ &= 130 \end{align}

### Question

Is there another (significantly different) approach to solving this problem? Any input is welcome!

I believe that I had originally tried to somehow arrive at a univariate function that mapped the mean to the variance and then evaluate that for a mean equal to $12$, but I soon realized that I had erroneously parenthesized the $\mu^2$ with the $x_i^2$ term in the argument of the summation formula for $\sigma^2$, so that approach definitely wouldn’t work.

Credit: Thanks to B. Mehta for simplifying the working using $\sum_{i=1}^n (x_i -\mu) = 0$
• For slightly less working, it's worth noting that $\sum_{i=1}^n (x_i - \mu) = 0$ by definition of the mean, so you can go straight from the second line to $10(3^2) + 40 = 130$. Aug 31 '17 at 15:24
• In the second line, it might be more clear if you used $\sum_{i=1}^{10}4$ instead of $40$. Aug 31 '17 at 17:00