# Maximising a sum of squared differences.

• March 11th 2010, 05:12 PM
questionboy
Maximising a sum of squared differences.
for what value of c is the quantity sigma(Xi-c)^2 minimized?
[Hint: Take the derivative with respect to c , set equal to 0 and solve]

I don't know where to start...
• March 11th 2010, 05:54 PM
mr fantastic
Quote:

Originally Posted by questionboy
for what value of c is the quantity sigma(Xi-c)^2 minimized?
[Hint: Take the derivative with respect to c , set equal to 0 and solve]

I don't know where to start...

Start by noting that

$\sum_{i = 1}^n (X_i - c)^2 = \sum_{i = 1}^n (X_i^2 - 2 c X_i - c^2) = \sum_{i = 1}^n X_i^2 - 2 c \sum_{i = 1}^nX_i - \sum_{i = 1}^n c^2$

$= \sum_{i = 1}^n X_i^2 - 2 c \sum_{i = 1}^nX_i - n c^2$

and then use the hint.
• March 11th 2010, 07:19 PM
questionboy
Thank you Mr fantastic

Do I set derivative of C equal to zero?
• March 11th 2010, 11:16 PM
matheagle
why don't you use the hint.........
Take the derivative with respect to c , set equal to 0 and solve

${d\over dc} \sum_{i=1}^n(X_i-c)^2=-2 \sum_{i=1}^n(X_i-c)=-2(n\bar X-nc)$

set this equal to zero, shows that $c=\bar X$

And it is a min, that's why you should obtain the second derivative.