1Thanks
• 1 Post By GJA

# Thread:

1. ## An equality with summations

I don't understand how the following is equivalent.

$n\Sigma(X_{i}-\overline{X})^2 = n\Sigma X_{i}^2 - (\Sigma X_{i})^2$

$\overline{X}$ is the average of all $X_{i}$ So, $\overline{X} = \Sigma X_{i}/n$

Could someone walk me through this. I've been staring at it for a long while now. I'll try to show my confusion below:

So, expanding the left side I get
$n\Sigma(X_{i}^2 - 2X_{i}\overline{X} + \overline{X}^2)$

Then substituting for $\overline{X}$, I get

$n\Sigma(X_{i}^2 - 2X_{i}\Sigma X_{i}/n + (\Sigma X_{i}/n)^2$

Then multiplying it out, I get

$n\Sigma X_{i}^2 -\Sigma(2X_{i}\Sigma X_{i}) + \Sigma((\Sigma X_{i})^2/n)$

And I'll stop there, because I really don't know what taking the summation of a summation means???

But, I do think I'm not too far off track because I now see the first term from the right hand side of the initial equality.

2. ## Re: An equality with summations

Hi, datanewb.

You're definitely on the right track, nice work!

There is some confusion, because you've used the same index to represent both the original summation and the summation needed for $\overline{X}.$ Since the i index is used in the orginal summation, we would want to use a new dummy index, e.g. write

$\overline{X}=\frac{1}{n}\sum_{j}X_{j}$.

Then the double summation is a summation over the indices i and j.

Does this help? I can write up more details if it's still confusing.

Good luck!

3. ## Re: An equality with summations

Thank you, GJA, that definitely does help.

Rewriting the last line
$n \sum_{i}X_{i}^2 - \sum_{j}^n(2X_{j}\sum_{i}X_{i}) + \sum_{j}^n((\sum_{i}X_{i})^2/n^2)$

is equivalent to

$n \sum_{i}X_{i}^2 - \sum_{j}^n(2X_{j}\sum_{i}X_{i}) + ((\sum_{i}X_{i})^2/n)$

I think... okay, I need to think about this a little bit more. Hopefully I will solve it later tonight!

4. ## Re: An equality with summations

Glad it helped! I think expanding $\overline{X}$ a line or two later might simplify things. Good luck and nice job sticking with a tricky little problem like this.

5. ## Re: An equality with summations

Okay, I finally solved it! Thank you for the advice and for giving me the space and time to figure it out!

I was simply too unfamiliar with algebraic manipulations of sigma notation to figure this out.

I had to realize the following:

$\sum_{i}^{n-1}(X_{i} + C) = \sum_{i}^{n-1}X_{i} + (n-i)C$

Secondly,
$\sum_{i}\frac{1}{n}X_{i} = \frac{1}{n}\sum_{i}X_{i}$

Finally, I had to realize that

$\sum_{i}(X_{i}\sum_{i}X_{i}) = \sum_{i}X_{i}\sum_{i}X_{i} = (\sum_{i}X_{i})^2$

Please, if any of this is wrong, correct me.

Using the above logic, I was able to see that

$n\sum_{i}X_{i}^2 - n\sum_{i}(2X_{i}\overline{X}) + n^2\overline{X}^2 =$

and substituting $\overline{X}$ with $\sum_{j}\frac{1}{n}X_{j}$

$n\sum_{i}X_{i}^2 - n\sum_{i}(2X_{i}\sum_{j}\frac{1}{n}X_{j}) + n^2(\sum_{j}\frac{1}{n}X_{j})^2 =$

$n\sum_{i}X_{i}^2 - 2\sum_{i}(X_{i}\sum_{j}X_{j}) + (\sum_{j}X_{j})^2 =$

and since $i\equiv{j}$

$n\sum_{i}X_{i} - (\sum_{i}X_{i})^2$

Which is exactly the right hand side of the equality I was trying to understand initially! Woohoo!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 23, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9566380381584167, "perplexity_flag": "middle"}