2
$\begingroup$

The question is:

$X$ is a random variable, and $f(x) = (x-1)/2$ for $1 \le x \le 3$

Find $\Bbb E (X^2)$

Here's my solution: \begin{align} \Bbb P(1)&= 0/2= 0 \\ \Bbb P(2)&= 1/2 \\ \Bbb P(3)&= 2/2= 1 \\ \end{align} \begin{align} \Bbb E(X^2) = & 1^2 \Bbb P(1) + 2^2 \Bbb P(2) + 3^2 \Bbb P(3) \\ = & 1 \cdot 0 + 4 \cdot 1/2 + 9 \cdot 1 \\ = & 11 \end{align} This is my solution, but it is wrong. I need help in understanding where my mistake is.

Thanks for your help!

  • 0
    The point is the distribution of this ramdom variable is continuous but not discrete. What you have done is assumed$X$is discrete only taking on the integers between$1$and 3.2012-12-15

1 Answers 1

2

My mistake was mistaking f for a probability mass function, rather than a (continuous) probability distribution function.

To find the expected value of a continuous function, we use integration.

Therefore, to find $E(X^2)$ we take the integral $∫_1^3x^2f(x)dx$ which I calculated to be 17/3

Thanks to everyone that commented!