Trouble understanding a step in a proof, algebra with summation

24 Views Asked by At

I have this line in a proof that I do not understand and would like some help understanding please.

$$\sum_{i=1}^{n}x_i^2-n\bar{x}^2 = \sum_{i=1}^{n}(x_i^2-2x_i\bar{x}+\bar{x}^2)$$

Can anybody enlighten me on this transformation please?

Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

If $\bar x$ is the average $\bar x = \frac1n \sum_{i=1}^n x_i$, then $$\sum_{i=1}^n 2x_i \bar x = 2\bar x \sum_{i=1}^n x_i = 2n \bar x ^2. $$ Furthermore, $$ \sum_{i=1}^n \bar x^2 = \bar x^2 \sum_{i=1}^n 1 = n\bar x ^2 $$