This is a problem known as finding 'moments of moments'.
Notation
Define the power sum $s_r$:
$$s_r=\sum _{i=1}^n X_i^r$$
Your problem only involves $s_1$.
The Problem
Let $\left(X_1,\ldots,X_n\right)$ denote a random sample of size $n$ from a population random variable $X$.
The problem is to find:
$$ E\Big [\Big (\frac1n\sum_{i=1}^n X_i\Big)^2\Big ] = E\Big [\big(\frac{s_1}{n}\big)^2\Big]$$
i.e. we seek the expectation of $\big(\frac{s_1}{n}\big)^2$ ... i.e. the 1st Raw Moment of $\big(\frac{s_1}{n}\big)^2$ ... so the solution (expressed ToCentral
moments of the population) is:
where:
RawMomentToCentral
is a function from the mathStatica package for Mathematica,
$\acute{\mu}_1$ denote the 1st raw moment of random variable $X$ (i.e. the mean of $X$) and
$\mu_2$ denotes the 2nd central moment of random variable $X$ (i.e. the variance of $X$).
In your case, $X \sim N(\bar{x}_{0}, \sigma^2)$, so $\acute{\mu}_1 = \bar{x}_{0}$ and $\mu_2 = \sigma^2$. Substituting these values into Out[1]=
yields: $$\frac{\sigma^2}{n} + \bar{x}_{0}^2 \quad \quad \text{(as required)}$$ All done.
More detail
There is an extensive discussion of moments of moments in Chapter 7 of our book:
- Rose and Smith, "Mathematical Statistics with Mathematica", Springer, NY
A free download of the chapter is available here:
http://www.mathstatica.com/book/Rose_and_Smith_2002edition_Chapter7.pdf
InputForm
) ??? $\endgroup$