Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given $X_1, \dots , X_n$ i.i.d. and the two sample moments $$M_1 = \frac{1}{n} \sum_{i = 1}^{n} X_i = \bar{X}$$ and $$ M_2 = \frac{1}{n} \sum_{i = 1}^{n} X_i^2$$ how can I compute: $$ S^2 = \frac{1}{n} \sum_{i = 1}^{n} (X_i - \bar{X})^2$$ such as: $$S^2 = f(M_1, M_2)$$

Thank you.

share|cite|improve this question
Hint: This has nothing to do with statistics and could have been tagged (algebra) or (polynomials). – Did Jun 13 '12 at 11:13
ok, got it. Thank you did. – Aslan986 Jun 13 '12 at 11:21
This has to do with statistics in that the derived formula is commonly used for computing the variance estiamte. – Michael Chernick Jun 13 '12 at 18:34
up vote 2 down vote accepted

$S^2 = \frac{1}{n}\sum_{i=1}^n (X_i - M_1)^2 = \frac{1}{n}\sum_{i=1}^n (X_i^2 - 2 X_i M_1 + M_1^2) =$

$= \frac{1}{n}\sum_{i=1}^n X_i^2 - 2 M_1 \frac{1}{n}\sum_{i=1}^n X_i + \frac{1}{n}\sum_{i=1}^n M_1^2 =$

$= M_2 - 2M_1^2 + M_1^2 = M_2 - M_1^2$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.