1
$\begingroup$

I have found two separate definitions for variance, listed below. Could you please explain why they are equivalent?

i) Variance of y $= \displaystyle \sum_{i=1}^n p_i(y_i - \mu)^2 $

ii) Variance of y $= \displaystyle \left(\sum_{i=1}^n p_i y_i^2\right) - \mu^2$

$\endgroup$
  • $\begingroup$ sum_{i=1}^{n} is supposed to be sigma notation with i=1,2....n $\endgroup$ – user95087 Sep 16 '13 at 3:16
  • 2
    $\begingroup$ MathJax basic tutorial and reference. $\endgroup$ – user61527 Sep 16 '13 at 3:17
  • 1
    $\begingroup$ Hint: $(a-b)^2 = a^2 + b^2 - 2ab$ and $\mu_y = \sum_i p_iy_i$. $\endgroup$ – Dilip Sarwate Sep 16 '13 at 3:24
  • $\begingroup$ I expanded the first equation but I cannot get it to look like the second one. $\endgroup$ – user95087 Sep 16 '13 at 3:35
  • $\begingroup$ We must have seen this question a few times before. $\endgroup$ – Michael Hardy Sep 16 '13 at 4:03
3
$\begingroup$

$$ \begin{align} \sum_{i=1}^n p_i(y_i - \mu)^2 & = \sum_i p_i(y_i^2 - 2 \mu y_i + \mu^2) \\[12pt] & = \left(\sum_i p_i y_i^2\right) -2\mu\left(\sum_i p_i y_i\right) + n\mu^2 \\[12pt] & = \left(\sum_i p_i y_i^2\right) -2\mu(n\mu) + n \mu^2 \end{align} $$ Now do some routine algebraic simplifications.

$\endgroup$
  • $\begingroup$ How come $p_i$ did not distribute to 2$uy_i$? $\endgroup$ – user95087 Sep 16 '13 at 13:21
  • $\begingroup$ Typo. Fixed. ${{{}}}$ $\endgroup$ – Michael Hardy Sep 16 '13 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.