I have this random variable $X$. I know that $P(X=c)=1$ for some real number $c$. I want to calculate $EX^2$, but I have no idea how to do this. I know that $EX=c$ and I tried to do it with integrating:
$\int_c^c x^2dx$, but this is just 0. So how should I do this?
Answer
Since $\{X=c\}\subseteq\{X^2=c^2\}$ we have that
$$
1=P(X=c)\leq P(X^2=c^2)\leq 1
$$
and hence also $P(X^2=c^2)=1$. Can you calculate the expectation now?
Another approach is to note that $\mathrm{Var}(X)=E[(X-c)^2]=0$ but on the other hand we have the formula
$$
\mathrm{Var}(X)=E[X^2]-E[X]^2,
$$
which enables us to calculate $E[X^2]$.
No comments:
Post a Comment