# Variance of sample variance (proof explanation)

Here is the proof of Variance of sample variance. Can you please explain me the highlighted places:

1. Why $(X_i - X_j)$?
2. why are there 112 terms, that are equal to 0?
3. How do we know, that there are 24,96 and 24 terms of the provided form?
4. How do we derive the results (3) result(formulas)?
• It tells you why the 112 zero ones are zero right after your highlight of that bit -- because $i=j$. Dec 6, 2017 at 21:27
• @Glen_b I understood, but why 112? Dec 6, 2017 at 21:40
• Oh, sorry, I misunderstood the issue you wanted clarified on that. I'll delete these comments soon. Dec 7, 2017 at 0:25

1. You can prove more general results. $$S^2=\frac{1}{n-1} \sum_{i=1}^n(X_i - \bar{X})^2 =\frac{1}{n^2(n-1)}\sum_{i=1}^n(nX_i - \sum_{j=1}^n X_j)^2 \\=\frac{1}{n^2(n-1)}\sum_{i=1}^n(\sum_{j=1}^n(X_i - X_j))^2 \\=\frac{1}{n^2(n-1)}[ \sum_{i=1}^n\sum_{j \ne i} (X_i-X_j)^2 +\sum_{i=1}^n \sum_{j \ne i}\sum_{k \ne j, i} (X_i-X_j)(X_i-X_k)]$$

Note that , $$\sum_{i=1}^n\sum_{j \ne i} (X_i-X_j)^2 = \frac{1}{n-2} \sum_{i=1}^n\sum_{j \ne i} \sum_{k \ne i,j}(X_i-X_k-(X_j-X_k))^2 \\= \frac{1}{n-2} \sum_{k=1}^n\sum_{j \ne k} \sum_{i \ne k,j}(X_k-X_i-(X_k-X_j))^2 \\= \frac{1}{n-2}[2(n-2)\sum_{k=1}^n\sum_{k \ne i} (X_k-X_i)^2-2\sum_{k=1}^n\sum_{j \ne k} \sum_{i \ne k,j}(X_k-X_i)(X_k-X_j)] \\ \Rightarrow \sum_{i=1}^n\sum_{j \ne i} (X_i-X_j)^2 =\frac{2}{n-2} \sum_{i=1}^n \sum_{j \ne i}\sum_{k \ne j, i} (X_i-X_j)(X_i-X_k),$$ where the first equality is by the fact that $k$ has $n-2$ choices. Thus,

$$S^2 = \frac{1}{2n(n-1) }\sum_{i=1}^n\sum_{j \ne i} (X_i-X_j)^2$$

This will be the "straight algebra" in part (ii).

1. $(X_i-X_i)^2$ is included in the formula. So essentially there are only $(16-4)(16-4)=144$ nonzero terms, the number of zero terms is $256-144=112$. The reason why $4 \times 16 \times 2 -4^2$ is terms $(X_i-X_i)^2 \times (X_j-X_j)^2$ is counted twice.

2. Number of form $E(X_i-X_j)^4$ is ${{4}\choose {2}} \times 2\times 2$.

Number of form $E(X_i-X_j)^2(X_i-X_k)^2$ is ${{4}\choose{1}}{{3}\choose{2}} \times 4 \times 2$.

1. Use the decomposition $(X_i-X_j)=(X_i-\mu-(X_j-\mu))$.