6
$\begingroup$

I am reading a paper "A Compendium of Conjugate Priors" by Daniel Fink (Published May 1997).

It has a mathematical step shown as

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

Here the $\mu$ is unknown parameter and $\overline x$ is the known mean of $\mathbf x=(x_1, x_2, x_3, \dots,x_n)$

How do I demonstrate this identity?

$\endgroup$
2
  • 2
    $\begingroup$ Your formula contains an error. $\endgroup$
    – Glen_b
    Feb 1, 2017 at 12:20
  • 3
    $\begingroup$ The exact formula is called Pythagoras's theorem... $\endgroup$
    – Xi'an
    Feb 1, 2017 at 22:05

2 Answers 2

11
$\begingroup$

I am afraid that the statement you show is wrong. Adding and subtracting $\bar{x}$:

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

Powering $(a-b)^2=a^2-2ab+b^2$: $$=\sum_{i=1}^{n}\left((x_i-\bar{x})^2-2(x_i-\bar{x})(\mu-\bar{x})+(\mu-\bar{x})^2\right)$$ Rearagning the sums $$=\sum_{i=1}^{n}(x_i-\bar{x})^2-\sum_{i=1}^{n}2(x_i-\bar{x})(\mu-\bar{x})+\sum_{i=1}^{n}(\mu-\bar{x})^2$$ Last sum does not depend on index $i$ $$=\sum_{i=1}^{n}(x_i-\bar{x})^2-\sum_{i=1}^{n}2(x_i-\bar{x})(\mu-\bar{x})+n(\mu-\bar{x})^2$$ Putting out things from the second sum that are independent on $i$ $$=\sum_{i=1}^{n}(x_i-\bar{x})^2-2(\mu-\bar{x})\sum_{i=1}^{n}(x_i-\bar{x})+n(\mu-\bar{x})^2$$

Let us focus on $\sum_{i=1}^n(x_i-\bar{x})=\sum_{i=1}^n x_i-n\bar{x}=\frac{n}{n}\sum_{i=1}^n x_i-n\bar{x}=n\bar{x}-n\bar{x}=0$

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

Your formula is wrong as it misses the power in the second term.

$\endgroup$
3
$\begingroup$

I see while I was writing this @KarelMacek (+1) gave a identical proof.


\begin{align} &\sum_{i=1}^{n}(x_i-\mu)^2= \\ &\sum_{i=1}^{n}x_i^2-2\sum_{i=1}^{n}x_i\mu+\sum_{i=1}^{n}\mu^2=\\ &\sum_{i=1}^{n}x_i^2-2\mu\left(\sum_{i=1}^{n}x_i\right)+n\mu^2=\\ &\sum_{i=1}^{n}x_i^2-2\mu n\overline x+n\mu^2=\\ &\sum_{i=1}^{n}(x_i-\overline x)^2+2\overline x\sum_{i=1}^{n}x_i+\sum_{i=1}^{n}\overline x^2-2\mu n\overline x+n\mu^2=\\ &\sum_{i=1}^{n}(x_i-\overline x)^2+2 n \overline x ^2-n\overline x^2-2\mu n\overline x+n\mu^2=\\ &\sum_{i=1}^{n}(x_i-\overline x)^2+ n \left(\overline x ^2-2\mu \overline x+\mu^2\right)\\ &\therefore \sum_{i=1}^{n}(x_i-\mu)^2=\sum_{i=1}^{n}(x_i-\overline x)^2+ n \left(\overline x -\mu\right)^2 \end{align}

Which is clearly not what Fink stated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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