double summation with adding and removing bar X

91 Views Asked by At

I need help with this please: we have from other question (question 1) $$Sxx=\sum_{i=1}^n (x_i-\bar X)^2=\sum_{i=1}^nx_i²-n\bar X=\sum_{i=1}^nx_i(x_i-\bar X)$$ And we have to transform this: $$\sum_{i=1}^n\sum_{j=1}^n (x_i-x_j)^2$$ with the equation Sxx from earlier (express this in term of Sxx)

the hint was to add $$\bar X-\bar X $$ making it: $$\sum_{i=1}^n\sum_{j=1}^n (x_i+\bar X-\bar X-x_j)^2$$

but i still cant find result

2

There are 2 best solutions below

3
On

Don't know how to use the hint, but: $$ \sum_{i=1}^n\sum_{j=1}^n (x_i-x_j)^2 = \sum_{i=1}^n\sum_{j=1}^n (x_i^2 -2x_ix_j + x_j^2) = 2n \sum_{i=1}^n x_i^2 - 2\sum_{i=1}^n\sum_{j=1}^n x_i x_j $$ $$ \sum_{i=1}^n\sum_{j=1}^n x_ix_j = \left(\sum_{i=1}^n x_i\right)^2 = n^2 \bar X^2 $$ Thus: $$ \sum_{i=1}^n\sum_{j=1}^n (x_i-x_j)^2 = 2n\left(\sum_{i=1}^n x_i^2 - n\bar X^2\right) = 2n S_{xx} $$

1
On

Using the hint: $$(x_i-x_j)^2=[(x_i-\bar X)-(x_j-\bar X)]^2=(x_i-\bar X)^2 -2(x_i-\bar X)(x_j-\bar X) + (x_j-\bar X)^2 $$ Summing over $i$ and $j$, the first term on the right gives $$\sum_i\sum_j(x_i-\bar X)^2 = \sum_j\left(\sum_i(x_i-\bar X)^2\right)=\sum _j S_{xx}=nS_{xx}$$ and similarly the third term on the right gives $$\sum_i\sum_j (x_j-\bar X)^2=nS_{xx}.$$ Now argue that the middle term sums to zero: $$-2\sum_i\sum_j (x_i-\bar X)(x_j-\bar X)=0$$