Simplifying with Summation

67 Views Asked by At

This is a problem out of my statistics book but my issue is simplifying from Step 3 to Step 4 below:

Step 1: var X=$\sum\:p_i\:(x_i-E[X])^2$

Step 2: var X=$\sum\:p_i[x_i^2+E[X]^2-2x_iE[X]]$

Step 3: var X=$\sum\:p_ix_i^2+(E[X])^2\sum\:p_i-2E[X]\sum\:p_ix_i$

Step 4: var X=$\sum\:p_ix_i^2-(E[X])^2$

Additional Information

  • $p_i$ is the probability that X takes the value $x_i$
  • E[X] is the expected value of X, defined as $\sum\:p_ix_i$

My attempt to Step 4 is provided below but that is where I am stuck:

var X=$\sum\:p_ix_i^2+(E[X])^2\sum\:p_i-2E[X]^2$

2

There are 2 best solutions below

0
On BEST ANSWER

Step 3 is given by

$ \mathrm{Var}[X] = \sum p_i x_i^2 + (\mathrm{E}[X])^2 \cdot \color{red}{\sum p_i} - 2 \cdot \mathrm{E}[X] \cdot \color{blue}{\sum p_i x_i}. $

This is equivalent to

$ \mathrm{Var}[X] = \sum p_i x_i^2 + (\mathrm{E}[X])^2 \cdot \color{red}{1} - 2 \cdot \mathrm{E}[X] \cdot \color{blue}{\mathrm{E}[X]}. $

This, in turn, is equivalent to step 5, given by

$ \mathrm{Var}[X] = \sum p_i x_i^2 + (\mathrm{E}[X])^2 - 2 \cdot (\mathrm{E}[X])^2 = \sum p_i x_i^2 - (\mathrm{E}[X])^2. $

1
On

Note that:

$$ \sum f(x_i)p_i=E[f(X)] $$

So for your case:

$$ \sum {x_i}p_i= E[X] $$

And

$$ \sigma{(x)}=\sum {x_i}^{2}p_i +{E[X]}^{2}-2E[X]\sum {x_i}p_i\\ \sigma{(x)}=\sum {x_i}^{2}p_i +{(E[X])}^{2}-2E[X]\times E[X]\\ \sigma{(x)}=\sum {x_i}^{2}p_i +{(E[X])}^{2}-2{(E[X])}^{2}\\ \sigma{(x)}=\sum {x_i}^{2}p_i -{(E[X])}^2 $$