1
$\begingroup$

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$

$\endgroup$
3
  • $\begingroup$ $\sum p_i{x_i}^{2}=E[X^2]$ $\endgroup$ Aug 27, 2015 at 0:00
  • 2
    $\begingroup$ remind that $\sum p_i = 1$ $\endgroup$
    – PSPACEhard
    Aug 27, 2015 at 1:45
  • $\begingroup$ @NP-hard Thank you. That is what I was forgetting. $\endgroup$
    – Amaziah
    Aug 27, 2015 at 21:59

2 Answers 2

1
$\begingroup$

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. $

$\endgroup$
0
$\begingroup$

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 $$

$\endgroup$
1
  • $\begingroup$ Thank you but how does this help me simplify to Step 4? $\endgroup$
    – Amaziah
    Aug 27, 2015 at 0:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .