sum calculation

26 Views Asked by At

i have the follwoing values

$\sum_{i=1}^{n} x_{i} = 34$

$\sum_{i=1}^{n} x_{i}^{2} = 262.22$

$a = 3.78$

$n = 9$

and i want to calculate

$$ \sum_{i=1}^{n} (x_{i}-a)^2 $$

i thought this may work

$$ \sum_{i=1}^{n} (x_{i}-a)^2 = \sum_{i=1}^{n} x_{i}^{2} - (2a \sum_{i=1}^{n} x_{i}) + n*a^2$$

the result should be equal to 133,8 but my result was 19,46

2

There are 2 best solutions below

0
On BEST ANSWER

Your last term is incorrect, you should be $a^2$ adding each time. So you don't have $a^2$ but rather $$ \sum_{i=1}^n a^2=\cdots $$ which should be simple for you to solve.

0
On

Actually, $\sum\limits_{i=1}^n(x_i-a)^2 = \sum\limits_{i=1}^nx_i^2 -2a\sum\limits_{i=1}^nx_i + na^2$