Show that these two sums are equal

158 Views Asked by At

Let $C_{ij}$ be observations with indices where $i=1, \cdots, M_j$, $j=1, \cdots, J$. That is, there are $J$ groups and each group $j$ has $M_j$ observations so that in total there are $N=\sum_{j=1}^{J} M_j$ observations. Show that $$\sum_{j=1}^{J} (w_j (\overline{C}_j - \overline{C}))^2 = \sum_{j=1}^{J} (w_j \overline{C}_j - \overline{C})^2 $$ where $w_j = \frac{JM_j}{N}$, $\overline{C}_j = \frac{1}{M_j} \sum_{i=1}^{M_j} C_{ij}$ (i.e., group means), and $\overline{C} = \frac{1}{N} \sum_{j=1}^{J} \sum_{i=1}^{M_j} C_{ij} = \frac{1}{J} \sum_{j=1}^{J} w_j\overline{C}_j$ (i.e., grand mean).

A hint was given to write the LHS as: $$\sum_{j=1}^{J} (w_j \overline{C}_j - \overline{C} + \overline{C} -w_j\overline{C})^2$$

I've tried to the expand this sum but could not quite get it, what I've done so far is:

$LHS = \sum_{j=1}^{J} (w_j \overline{C}_j - \overline{C})^2 + 2\sum_{j=1}^{J}(w_j\overline{C}_j - \overline{C})(\overline{C}-w_j\overline{C}) + \sum_{j=1}^{J}(\overline{C} - w_j\overline{C})^2$

After some algebra, I can simplify:

$2\sum_{j=1}^{J}(w_j\overline{C}_j - \overline{C})(\overline{C}-w_j\overline{C}) = 2[\overline{C}^2J - \overline{C}\sum_{j=1}^{J}w_j^2\overline{C}_j]$ and $\sum_{j=1}^{J}(\overline{C} - w_j\overline{C})^2=-\overline{C}^2J + \overline{C}^2\sum_{j=1}^{J}w_j^2$ and this is as far as I got.

1

There are 1 best solutions below

0
On BEST ANSWER

Hint: There seems to be a typo or mistake in OP's identity.

We check the identity \begin{align*} \sum_{j=1}^J\left(\omega_j\left(\overline{C}_j-\overline{C}\right)\right)^2=\sum_{j=1}^J\left(\left(\omega_j\overline{C}_j-\overline{C}\right)\right)^2\tag{1} \end{align*} with the special values $J=2, M_1=2, M_2=1$.

We obtain \begin{align*} N&=M_1+M_2=3\\ \omega_1&=\frac{2M_1}{M_1+M_2}=\frac{4}{3},\quad\omega_2=\frac{2M_2}{M_1+M_2}=\frac{2}{3}\\ \overline{C}_1&=\frac{1}{M_1}\left(C_{1,1}+C_{21}\right)=\frac{1}{2}\left(C_{11}+C_{21}\right),\quad \overline{C}_2=\frac{1}{M_2}C_{12}=C_{12}\\ \overline{C}&=\frac{1}{2}\left(\omega_1\overline{C}_1+\omega_2\overline{C}_2\right) =\frac{1}{2}\left(\frac{4}{3}\cdot\frac{1}{2}\left(C_{11}+C_{21}\right)+\frac{2}{3}C_{12}\right)\\ &=\frac{1}{3}\left(C_{11}+C_{21}+C_{12}\right) \end{align*}

Calculating the left-hand side of (1) gives \begin{align*} \color{blue}{\sum_{j=1}^2}&\color{blue}{\left(\omega_j\left(\overline{C}_j-\overline{C}\right)\right)^2}\\ &=\omega_1^2\left(\overline{C}_1-\overline{C}\right)^2+\omega_2^2\left(\overline{C}_2-\overline{C}\right)^2\\ &=\frac{16}{9}\left(\frac{1}{2}\left(C_{11}+C_{21}\right)-\frac{1}{3}\left(C_{11}+C_{21}+C_{12}\right)\right)^2\\ &\qquad+\frac{4}{9}\left(C_{12}-\frac{1}{3}\left(C_{11}+C_{21}+C_{12}\right)\right)^2\\ &=\frac{16}{9}\left(\frac{1}{6}\right)^2\left(C_{11}+C_{21}-2C_{12}\right)^2+\frac{4}{9}\left(\frac{1}{3}\right)^2\left(-C_{11}-C_{21}+2C_{12}\right)^2\\ &\,\,\color{blue}{=\frac{8}{81}\left(C_{11}+C_{21}-2C_{12}\right)^2}\tag{2} \end{align*} whereas the right-hand side of (1) gives \begin{align*} \color{blue}{\sum_{j=1}^2}&\color{blue}{\left(\omega_j\overline{C}_j-\overline{C}\right)^2}\\ &=\left(\omega_1\overline{C}_1-\overline{C}\right)^2+\left(\omega_2\overline{C}_2-\overline{C}\right)^2\\ &=\left(\frac{4}{3}\left(C_{11}+C_{21}\right)-\frac{1}{3}\left(C_{11}+C_{21}+C_{12}\right)\right)^2\\ &\qquad+\left(\frac{2}{3}C_{12}-\frac{1}{3}\left(C_{11}+C_{21}+C_{12}\right)\right)^2\\ &=\frac{1}{9}\left(3C_{11}+3C_{21}-C_{12}\right)^2+\frac{1}{9}\left(-C_{11}-C_{21}+C_{12}\right)^2\\ &\,\,\color{blue}{=\frac{1}{9}\left(\left(3C_{11}+3C_{21}-C_{12}\right)^2+\left(C_{11}+C_{21}-C_{12}\right)^2\right)}\tag{3} \end{align*}

So, if this calculation is correct, we see that (2) and (3) generally differ invalidating the claim (1).