0

I have the following equation in a statistics textbook and cannot see how the right side comes into being.

$$\frac{1}{n} \sum_{i=1}^n x^2_i - \left(\frac{1}{n} \sum_{i=1}^n x_i\right)^2 = \frac{1}{n} \sum_{i=1}^n (x_i-\bar{x_n})^2 $$

  • Have you tried induction? You are trying to solve for n. So you could try X= 1,2, n-1 – zevij Mar 30 '16 at 21:18
  • This is not correct, for example, for n=1, x=1,3. Both sides are not equal! –  Mar 30 '16 at 21:24

2 Answers2

5

$\frac{1}{n} \sum_{i=1}^n x^2_i - (\frac{1}{n} \sum_{i=1}^n x_i)^2= \frac{1}{n} \sum_{i=1}^n (x_i-\bar{x})^2$ (you had dropped the $^2$ at the end)

This is the definition of variance. Usually you start with the equation on the right and show that it is equivalent to what is on the left.

$\frac{1}{n} \sum_{i=1}^n x_i = \bar{x}$

$\frac{1}{n}\sum_{i=1}^n (x_i-\bar{x})^2= \frac{1}{n}\sum_{i=1}^n (x_i^2 -2x_i\bar{x}+\bar{x}^2)$

$\frac{1}{n}\sum_{i=1}^n (x_i^2) - (2\bar{x})\frac{1}{n}\sum_{i=1}^n(x_i) + \bar{x}^2$

$\frac{1}{n}\sum_{i=1}^n (x_i^2) - \bar{x}^2$

Doug M
  • 58,694
0

I think it should be like:

$1/n \sum {x_i}^2 - (1/n\sum {x_i})^2 = 1/n \sum {x_i}^2 - \bar{x}^2 =1/n \sum ({x_i}^2 - \bar{x}^2$)

John
  • 403