In calculating the standard deviation of the number on a fair die we need to find $E(X^2)$ which I want to calculate using the formula for expectation where

$E(X)$ = $\sum\limits_{x=1}^{6} xP(x)$

and substitute $X^2$ instead of $X$.

I expect to then have to sum up $x^2P(x^2)$ for 1,2,3,4,5,6

However the solution shows


which means it only squares the $x$ while $P(x)$ remains $\frac{1}{6}$ .

I want to be able to solve $E(X^2)$ strctly using the summation formula (unless it is completely wrong to do so). How can this summation formula be used for this specific case? How is it possible that the $x$ is only getting squared in one place?

  • 1
    $\begingroup$ $P (x^2)$ remains $\frac {1}{6} $. Why wouldn't it? If $x $ can be 1, 2, 3, 4, 5 or 6 with equal probability $\frac {1}{6} $, then $x^2$ will be $1^2$, $2^2$,..., $6^2$ with equal probability $\frac {1}{6} $. $\endgroup$ – user491874 Nov 26 '17 at 16:37
  • $\begingroup$ Relevant: en.wikipedia.org/wiki/Law_of_the_unconscious_statistician $\endgroup$ – Clement C. Nov 26 '17 at 16:58
  • $\begingroup$ @user8734617 has the right perspective here. In particular, the subtle confusion from the OP is that we square the $x$ in $P(x)$, but we don't square the entire term $[P(x)]$. $\endgroup$ – Aaron Montgomery Nov 26 '17 at 18:46

Your (correct) formula for $E(X)$ is a special case of a more general formula: $E(g(X))=\sum_{x=1}^6 g(x) \,P(x)$. Use that formula with the function $g(x)=x^2$.


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.