Exanding the a summation squared

79 Views Asked by At

I am reviewing a proof as part of a courser course on regression, but I am getting hung up on some intermediate steps.

The proof we are working is a proof that Y-bar (the average of the individual Y values) is the minimizer for the following formula which is a function of mu:

$$ \sum_{i=1}^{n} (Y_i - \mu)^2 $$

The professor's proof begins as follows:

$$ \sum_{i=1}^{n} (Y_i - \mu)^2 = \sum_{i=1}^{n}(Y_i - \overline{Y} + \overline{Y} - \mu)^2 $$

The next line of the proof is:

$$ = \sum_{i=1}^{n} (Y_i - \overline{Y})^2 + 2\sum_{i=1}^{n} (Y_i - \overline{Y})(\overline{Y} - \mu) + \sum_{i=1}^{n}(\overline{Y} - \mu)^2 $$

My issue is the steps between those lines. I have tried to foil the squared term in my second line above, but was unable to get to the third line. Perhaps I need to work on my algebra related to summations. If anyone can give me any insight into the steps that are occurring here I would greatly appreciate it!

2

There are 2 best solutions below

2
On BEST ANSWER

Note that $$\sum_{i=1}^{n}(\color{red}{Y_i - \overline{Y}} + \color{blue}{\overline{Y} - \mu})^2=\sum_{i=1}^n\left[(\color{red}{Y_i-\overline Y})^2+2(\color{red}{Y_i-\overline Y})(\color{blue}{\overline Y-\mu})+(\color{blue}{\overline Y-\mu})^2\right]$$

1
On

Group this way: $(Y_i-\bar Y) + (\bar Y - \mu)= a+b$ where $a:=Y_i-\bar Y$ and $b:=\bar Y - \mu$. FOIL gives $$(a+b)^2=a^2+2ab+b^2;$$ substitute back and then use rules of summation.