Stochastic proof variance

I have trouble solving following problem:

Let $$X_1,...,X_n$$ be independently,identically distributed random variables with

the Riemann-density $$f$$ on a probability space $$(\Omega,\mathcal{A},P).$$

Moreover denote $$\sigma^2=Var(X_1)$$ and let $$\int_{\Bbb R}x^2 f(x)dx<\infty.$$

We have to show that:

$$E[\frac{1}{n-1}\sum_{i=0}^n(X_i-\frac1n\sum_{j=1}^nX_j)^2]=\sigma^2.$$

I would really appreciate any help and I hope everything is correctly written.

Greetings

First assume that $E[X_i]=0$, then expand out the square. You'll need to be able to calculate $E[X_i X_j]$ for $i=j$ as well as $i \neq j$. To handle the case $E[X_i]=\mu \neq 0$, consider

$$X_i - \frac{1}{n} \sum_{j=1}^n X_j = (X_i - \mu) - \frac{1}{n} \sum_{j=1}^n (X_j-\mu)$$

which reduces the problem to the previous case.

Let $\mu:=\mathbb{E}X_{1}$ and for convenience assume that $\mu=0$ and $\sigma^{2}=1$.

$\mathbb{E}\left(X_{1}-\overline{X}\right)^{2}=\mathbb{E}\left[X_{1}^{2}-2X_{1}\overline{X}+\overline{X}^{2}\right]=\mathbb{E}\left[X_{1}^{2}-\frac{2}{n}\sum_{i=1}^{n}X_{1}X_{i}+\frac{1}{n^{2}}\sum_{i=1}^{n}\sum_{j=1}^{n}X_{i}X_{j}\right]$

Here $\mathbb{E}X_{i}X_{j}=\mathsf{Cov}\left(X_{i},X_{j}\right)=0$ if $i\neq j$ and $\mathbb{E}X_{i}^{2}=\mathsf{Var}X_{i}=1$.

So applying linearity of expectation we find:

$\mathbb{E}\left(X_{1}-\overline{X}\right)^{2}=1-\frac{2}{n}+\frac{1}{n^{2}}n=1-\frac{1}{n}$ so that $\mathbb{E}\frac{1}{n-1}\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)^{2}=\mathbb{E}\frac{1}{n-1}n\left(1-\frac{1}{n}\right)=1$.

In the more general case it can be exploited that we can write $X_{i}=\sigma U_{i}+\mu$ where $U_{i}$ has mean $0$ and variance $1$.

This leads easily to: $\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)^{2}=\sigma^{2}\sum_{i=1}^{n}\left(U_{i}-\overline{U}\right)^{2}$.