# Math Help - Variance of S^2

1. ## Variance of S^2

Haven't used this for a while.. not sure if i get the texing.
I prove first that (this was fine)
$\frac{1}{2n(n-1)} \sum^n_{i=1}\sum^n_{j=1}(X_i-X_j)^2 = S^2$

Then i am to calculate, assuming all the $X_i's$ have finite fourth moment, denoting $\theta_1 =EX_i, \theta_j=E(X_i - \theta_1)^j, j=1,2,3$, the
$Var(S^2)=\frac{1}{n}\left(\theta_4-\frac{n-3}{n-1}\theta_2^2 \right)$. I first used $Var(S^2)=E(S^4)-E(S^2)^2$ and tried to calculate $E(S^2)$ but
I don't really get how these cross terms work. My first attempt i got $\theta_2/(n-1)$ but i'm only assuming that's wrong.

2. ## Re: Variance of S^2

$
Var (S^2) = E(S^4)-E(S^2)^2$

We know that $E(S^2) = \theta_1^2$ so we just need to calculate $E(S^4)$. Let $Y_i = X_i - \theta_2$, for $i=1,2,...n$. Then put
$S^2 =\frac{n \sum_{i=1}^n Y_i^2-(\sum_{i=1}^n Y_i)^2}{n(n-1)}
$

So that
$
S^4 = \frac{n^2(\sum Y_i^2)^2 -2n(\sum Y_i^2)(\sum Y_i)^2 +(\sum Y_i)^4}{n^2(n-1)^2}
$

and
$E(S^4) = \frac{n^2E(\sum Y_i^2)^2 -2nE[(\sum Y_i^2)(\sum Y_i)^2] +E(\sum Y_i)^4}{n^2(n-1)^2}
$

Now we have $i \neq j \neq k$
$
E(Y_i Y_j) = 0, E(Y_i^3Y_j)=0, E(Y_i^2Y_jY_k)=0,
E(Y_i^2Y_j^2) = \theta_2, E(Y_i^4)= \theta_4
$

and
$
E(\sum Y_i^2)^2 = n\theta_4 + n(n-1)\theta_2^2
E[ (\sum Y_i^2)(\sum Y_i)^2] = n\theta_4 + 3n(n-1)\theta_2^2
E(\sum Y_i)^4 = n\theta_4 + 3n(n-1) \theta_2^2
$

Giving us
$
E(S^4) = \frac{n^2(n\theta_4 + n(n-1)\theta_2^2) -2n(n\theta_4 + 3n(n-1)\theta_2^2) + n\theta_4 + 3n(n-1) \theta_2^2}{n^2(n-1)}
= \frac{(n-1)\theta_4 +(n^2 -2n +3)\theta_2^2}{n(n-1)}
$

Which gives
$
Var(S^2) = \frac{(n-1)\theta_4 +(n^2 -2n +3)\theta_2^2}{n(n-1)} - \theta_2^2 \\
= \frac{1}{n} \left (\theta_4 -\frac{n-3}{n-1} \theta_2^2 \right)
$

Not sure why it hates my teXing... anyways its solved