How to open square brackets of the sum?

950 Views Asked by At

For example Σ(y[i]-mean(y[i]))^2 = ? Please describe the way how it opens.

1

There are 1 best solutions below

2
On BEST ANSWER

Hint

Denote $\bar y=\frac{\sum_{i=1}^ny_i}{n}.$ Then

$$\sum_{i=1}^n (y_i-\bar{y})^2=\sum_{i=1}^n(y_i^2-2\bar{y}y_i+\bar y^2)=\sum_{i=1}^ny_i^2-2\bar{y}\sum_{i=1}^ny_i+\sum_{i=1}^n\bar y^2.$$

What is the relation between $\sum_{i=1}^ny_i$ and $\bar y?$ How can you simplify the whole expression?