# Maximising a sum of squared differences.

• Mar 11th 2010, 06: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...
• Mar 11th 2010, 06: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.
• Mar 11th 2010, 08:19 PM
questionboy
Thank you Mr fantastic

Do I set derivative of C equal to zero?
• Mar 12th 2010, 12:16 AM
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.