$$
\sum_{i=1}^{n}\left(X_{i}-\mu\right)^{2}=\sum_{i=1}^{n}\left(X_{i}-\bar{X}\right)^{2}+n(\bar{X}-\mu)^{2}
$$
My professor didn't prove this, but said it is easy to.
I am confused because I can't seem to get it.
Would appreciate it if someone could help.
I am new to statistics, please bear with me if I make stupid statements.
Asked
Active
Viewed 117 times
2
Varun Gawande
- 121
-
Just expand both sides and match terms, Note that $\sum X_i=n\overline X$. – lulu Jul 25 '20 at 12:33
-
9Hint: $(X_i - \mu)^2 = ( (X_i - \bar{X}) + (\bar{X} - \mu) )^2 = (X_i - \bar{X})^2 + 2(X_i-\bar{X})(\bar{X}-\mu) + (\bar{X} - \mu)^2$. What happens if you sum the middle term from $i =1$ to $i=n$? – Presage Jul 25 '20 at 12:35
-
Try a smaller problem, e.g. n=2 or 3 – Matthew Towers Jul 25 '20 at 13:03
1 Answers
1
$$\sum_{i=1}^{n}\left(X_{i}-\bar{X}\right)^{2}$$
Expand the sum
$$=\sum_{i=1}^n X_i^2-2\sum_{i=1}^n X_i\bar X+\sum_{i=1}^ n \bar X^2$$
Notice that $\bar{X}$ is a constant and can be taken out of the sum terms
$$= \sum X_i^2 -2\bar X \sum X_i+n\bar X ^2$$
Notice that $\sum_iX_i = n\bar{X}$ by definition, and so you can replace that term too, and then simplify
$$=\sum X_i^2 -2n\bar X^2+n\bar X^2=\sum X_i^2 -n\bar X^2$$
Now setting $X_i=Y_i-\mu$ (and sure $\bar X=\bar Y -\mu$) you have thesis.
Alessandro Cigna
- 2,496
-
I don’t see how this answers OP’s question. Did you stop too early? Am I missing something? – Randall Jul 25 '20 at 13:00
-
-
-
This sounds very stupid a question, but how is Xbar different from ? – Varun Gawande Jul 25 '20 at 16:33
-
1@VarunGawande Xbar is a random variable and $\mu$ is a constant! In particular can assume also values different from $\mu$, since it is only an “estimator” of $\mu$. Is it clear? – Alessandro Cigna Jul 25 '20 at 17:05