# Partitioning sum of squares

I am working through the proof for partitioning sum of squares.
Could someone please explicitly explain how one goes from line 14 to 15 in the following PDF:

That is, how one moves between these lines -

\begin{align} \rm{SSTO} &= \sum_{i=1}^r \sum_{j=1}^{n_i} (Y_{ij}-\overline{Y}_{..})^2 \\ &= \sum_{i=1}^r \sum_{j=1}^{n_i} [(Y_{ij}-\overline{Y}_{i.})+(\overline{Y}_{i.}-\overline{Y}_{..})]^2 \end{align}

I'm actually reading through Casella and Berger's "Statistical Inference" (pg 536), but the same jump occurs in both. Sorry, I was never the best at algebra... would someone please explain this.

• Do you mean the bit in brackets where it says $\sum_{j=1}^{n_i} (Y_{ij}-\overline{Y}_i) =0$ ? If so, this is because the definition of $\overline{Y}_i$ is $\frac{1}{n_i} \sum_{j=1}^{n_i} Y_{ij}$ and so you are adding up $n_i$ copies of $\overline{Y}_i$ and then subtracting $n_i$ copies of $\overline{Y}_i$, so you end up with zero. We can elaborate further if this is what you want. But there are no line numbers in the pdf, so I'm not sure! Mar 18 '13 at 0:30
• Thanks for your edit of the tags. I have edited your question to add the mathematics of the two lines you're concerned about. Please double check it's right. Mar 18 '13 at 1:22

It just involves adding and subtracting a term:

$(a-b)^2 = (a -m+m -b)^2 = [(a-m)+ (m-b)]^2$

Since everything is squared, it's really just doing this:

$(a-b) = (a -m+m -b) = [(a-m)+ (m-b)]$

but where $a = Y_{ij}$, $b=\overline{Y}_{..}$ and $m = \overline{Y}_{i.}$

This "add and subtract the same thing inside a sum of squares" is a standard trick, you see it all over.

• Thank you. I mean the 1st and second line that you graciously added here. Mar 18 '13 at 1:08
• See my edit above Mar 18 '13 at 1:12
• OK Glen; I greatly appreciate it. I love math now, but historically have never been good at it. Cheers! Mar 18 '13 at 1:34
• Is there some further explanation or discussion needed in the answer at all, or do you think it's been covered now? Mar 18 '13 at 1:42