How to interpret summation signs I'm taking a course in statistics, and I really need to brush up my math to be able to follow the book at times. 
I'm looking at formulas for sum of squares, and I am slightly confused about the capital sigma letter and how to interpret an equation with several signs like this:
$$SS_a = \sum^a_{i=1} \sum^b_{j=1} \sum^n_{k=1} (\bar{X}_i - \bar{X})^2 $$
I mean, it's only i which is used  the summation signs, but when I try it out (ignoring b and n) it seems like I get it wrong, and that it should be something like this:
$ b * n * \sum^a_{i=1}(\bar{X}_i -\bar{X})^2 $
Is this correct, and what is the rule behind it? 
PS. I wasn't sure what tags really fits into this question, might it be basic algebra? DS
 A: You are correct.  The summation signs are nested.  First you sum over $k$ from $1$ to $n$.  As you say, the quantity does not depend on $k$, so you can just multiply by $n$.  Then you sum that result over $j$ from $1$ to $b$, and it does not depend on $j$, so you can multiply by $b$, and you have your result.
A: Note that $$ \sum^n_{k=1} (\bar{X}_i - \bar{X})^2\\=\underbrace{(\bar{X}_i - \bar{X})^2+(\bar{X}_i - \bar{X})^2+\dots+(\bar{X}_i - \bar{X})^2}_{\displaystyle n \,\text{times}}\\=n\cdot(\bar{X}_i - \bar{X})^2$$ Similarly $$\sum^b_{j=1}\sum^n_{k=1} (\bar{X}_i - \bar{X})^2\\=\sum^b_{j=1}n\cdot(\bar{X}_i - \bar{X})^2\\=n\cdot b\cdot (\bar{X}_i - \bar{X})^2$$Here the fact is $$\sum^n_{k=1} X_i=n\cdot X_i.$$That's all from me.
A: Yes, as $(\bar X_i-\bar X)^2$ does not depend on $k$, the innermost sum is simply $n\cdot(\bar X_i-\bar X)^2$. AS this expresion does not depend on $j$, we get $b\cdot n\cdot(\bar X_i-\bar X)^2$ next and then can use distributivity to obtain $b\cdot n\cdot \sum_{i=1}^a(\bar X_i-\bar X)^2$.
