learning stats from https://newonlinecourses.science.psu.edu/stat414/node/218/ but having a hard time trying to do the algebra. Need to show $SS(TO)=\sum_{i=1}^{m}\sum_{i=1}^{n}(X_{ij}-\bar{X}_{..})^2=\sum_{i=1}^{m}\sum_{i=1}^{n}X_{ij}^2-\frac{X_{..}^2}{N}$.
Just wondering why $X_{ij}X_{..}=0$
Similarly for treatment sum of squares, need to show $SS(T)=\sum_{i=1}^{k}n_i(\bar{X}_{i.}-\bar{X}_{..})^2=\sum_{i=1}^{k}n_i\bar{X}^2_{i.}-N\bar{X}_{..}^2$. So why does $\bar{X}_{i.}\bar{X}_{..}=0$ Thanks!
Here is the setup (why am I writing this out?..). $X_{ij}$ are given for $1\leqslant i\leqslant m$ and $1\leqslant i\leqslant n_{\color{red}{i}}$. $\bar{X}_{..}$ is defined as $\frac{1}{\color{red}{n}}\sum\limits_{i=1}^{m}\sum\limits_{j=1}^{n_{\color{red}{i}}}X_{ij}$, where it is not explicitly stated what $n$ is, but it is clear from the context that $n=\sum\limits_{i=1}^{m}n_i$. Similarly, $SS(TO)$ is defined as $\sum\limits_{i=1}^{m}\sum\limits_{j=1}^{n_{\color{red}{i}}}(X_{ij}-\bar{X}_{..})^2$. (Done with the setup.) Which equals $$\sum_{i=1}^{m}\sum_{j=1}^{n_i}(X_{ij}^2-2X_{ij}\bar{X}_{..}+\bar{X}_{..}^2)=\sum_{i=1}^{m}\sum_{j=1}^{n_i}X_{ij}^2-\underbrace{2(n\bar{X}_{..})\bar{X}_{..}+n\bar{X}_{..}^2}_{\text{here is the cancellation}}.$$