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!

  • 8
    $X$ apparently is a continuous random variable, not a discrete one. You need to calculate $\int_1^3 x^2f(x)\,dx$.2012-12-15
  • 0
    To emphasise David Mitra's point, if $f(2)= \frac12$ and $f(3)=1$, then these are not probabilities. However $\int_1^3 \frac{x-1}{2}dx =1$ , so you should interpret $f(x)$ as the probability density function of a continuous random variable2012-12-15
  • 1
    Also if $1 \le X \le 3$ then as a basic check you should have $1 \le E[X^2] \le 9$2012-12-15
  • 0
    Or, note the sum of your "probabilities" exceeds $1$. So whatever $f$ is, it certainly is not the the probability mass function of an rv taking the values $1$, $2$, and $3$.2012-12-15
  • 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!