# Thread: Maximising a sum of squared differences.

1. ## 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...

2. 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.

3. Thank you Mr fantastic

Do I set derivative of C equal to zero?

4. 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.