For example Σ(y[i]-mean(y[i]))^2 = ? Please describe the way how it opens.
Asked
Active
Viewed 945 times
1 Answers
0
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?
mfl
- 29,399