0
$\begingroup$

The question is Suppose that X is a discrete random variable with probability mass function $p(x) = cx^2, x = 1, 2, 3, 4$

I found c and I got $1\over30$. I found E(X) and got $10\over3$. Part c of the question asks me to find $E(X(X-1)$ which I know is $E(X^2)-E(X)$. I just can't seem to understand how to really get $E(X^2)$. I figured out that it has to be $1\over30$$(1+2^4+3^4+4^4)$ based on the answer for $E(X(X-1)$ but I honestly don't know how it is to the fourth power instead of the sixth power when the equation for $E(X)$ is $\sum_{x=1}^4xp(x)$ where $p(x)=cx^2$ so don't we have $1\over30$($\sum_{x=1}^4x^3)^2?$ Wouldn't this make it $1\over30$$\sum_{x=1}^4x^6$?

1 Answers 1

2

You can think of the expectation as the weighted sum of realized values, weighted by their probabilities. So you have to square each value of $X$ inside the sum, not the whole sum. Then you get $$ \mathbb E[X^2] = \sum^4_{i=1} x^2\mathbb P(X = x) = \sum^4_{i=1} x^2 \frac{x^2}{30} $$ In general, for any function $g(x)$, you have $$ \mathbb E[g(X)] = \sum_{x} g(x)\mathbb P(X = x) $$ (this is called Law of the unconscious statistician)

Also note that $(\sum^4_{i=1}x^3)^2$ is not equal to $\sum^4_{i=1}x^6$

  • 0
    So $E(X^2)$ is $\sum_{x=1}^4x^2p(x)$? Is this true for all $E(X^2)$?2017-02-25
  • 0
    @Heavenly96 exactly2017-02-25