How is the sum of differences squared related to common statistics - MathOverflow [closed] most recent 30 from http://mathoverflow.net 2013-05-23T16:00:59Z http://mathoverflow.net/feeds/question/83377 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/83377/how-is-the-sum-of-differences-squared-related-to-common-statistics How is the sum of differences squared related to common statistics lemire 2011-12-13T23:56:35Z 2011-12-14T03:17:14Z <p>I have a sequence of numbers $x_1, x_2, \ldots, x_n$. I have computed the sum of the differences squared as $\sum_{i, j\in{1,2,\ldots,n}} (x_i-x_j)^2$. Intuitively $\sum_{i, j\in{1,2,\ldots,n}} (x_i-x_j)^2$ is a measure of <em>variance</em> (taken informally). I am looking into making this statement more precise.</p> <p><strong>Answer</strong>: Thanks to a comment by BR, I have worked out the answer.</p> <p>Clearly, we can rewrite $(x_i-x_j)$ as $ (x_i-\bar x + \bar x - x_j)$ which leads to $\sum_{i, j\in{1,2,\ldots,n}} (x_i-x_j)^2 = \sum_{i, j\in{1,2,\ldots,n}} (x_i-\bar x)^2 + (x_j-\bar x)^2 + (x_i-\bar x)(x_j-\bar x)$ $=2 n \sum_i (x_i- \bar x)^2 + \sum_{i, j\in{1,2,\ldots,n}} (x_i-\bar x)(x_j-\bar x) =2 n \sum_i (x_i- \bar x)^2 . $</p>