# Can it ever be that for a random sample $X_1, ..., X_n$ we have that $\frac{1}{n}\Sigma_{i=1}^n x_i^2 \lt (\frac{1}{n}\Sigma_{i=1}^n x_i)^2$

I have had a homework problem about using method of moments for estimating a uniform random variable.

I probably made a calculation mistake because as was pointed out to me, we've shown in some exercise via the cauchy inequality that: $$\frac{1}{n}\Sigma_{i=1}^n x_i^2 \geq (\frac{1}{n}\Sigma_{i=1}^n x_i)^2$$

But I can come up with examples and I distinctly remember having read somewhere that it's actually a pitfall of using the method of moments in estimating variance when the opposite is true. i.e.

$$\frac{1}{n}\Sigma_{i=1}^n x_i^2 \lt (\frac{1}{n}\Sigma_{i=1}^n x_i)^2$$ which would result in negative variance which does not exist. So I am a bit confused, can this case even ever occur or am I mixing up something?

thank you for your time and help!

• The $\;\ge\;$ inequality always holds. It's known as the arithmetic mean - root mean square (or quadratic mean) inequality.
– dxiv
Commented Aug 5, 2021 at 15:30
• It also holds for all real $x_i$, since we have $\frac{1}{n}\sum_{i=1}^n x_i^2=\frac{1}{n}\sum_{i=1}^n |x_i|^2 \geq (\frac{1}{n}\sum_{i=1}^n |x_i|)^2\geq (\frac{1}{n}\sum_{i=1}^n x_i)^2$. Commented Aug 5, 2021 at 15:33
• Thank you both! I am now a bit more confused but I think I see the issue, the second moment estimator does not divide by 1 over n squared, so the inequality actually doesn't apply? Edit: never mind, I was seeing something wrong! Commented Aug 5, 2021 at 15:35
• I don't know if the $<$ inequality ever holds, but I don't think so. Check the Jensen inequality. I think that will help you to find the answer of your question. If I understand your question correctly, than $x_{i}$'s are random variables, so you calculate a kind of “empirical mean”/average (and you take the square of it), and a kind of “empirical second moment”... Commented Aug 5, 2021 at 19:32
• ...Jensen inequality is easy to memorize if you know how to calculate for example the squared standard deviation: $\mathbb{D}^{2}\left(X\right)=\mathbb{E}\left(X^{2}\right)-\mathbb{E}^{2}\left(X\right)$, where $X$ denotes an appropriate random variable. We know that the standard deviation is always nonnegative, so $\mathbb{E}\left(X^{2}\right)\geq\mathbb{E}^{2}\left(X\right)$. It is just a trick how to memorize it. It helped me when I studied this topic. And I think this example is "almost exactly" your question... Commented Aug 5, 2021 at 19:32