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
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} $$