Mean of probability distribution function. The current chapter I am working on is continuous random variables. I know that the mean value of a continuous random variable is:
$$ E[X] =\int_{-\infty}^{\infty} xf(x) dx   $$
That being said, my question is to find $E[X]$ of the following table:
$$
X |\hspace{4 mm} -3 \hspace{4 mm}|\hspace{4 mm}   6 \hspace{4 mm}  |\hspace{4 mm} 9 \\
f(x) |\hspace{4 mm} 1/6 \hspace{4 mm}|\hspace{2 mm} 1/2\hspace{1 mm} | 1/3
$$
I want to confirm that this is in fact a DISCRETE question simply included in my continuous problem set and thus $E[X]$ will equal the following:
$$E[X] = (-3 * 1/6) + (6 * 1/2) + (9 * 1/3) = 5.5$$
Additionally, I have solved $E[X^2]$ to equal the following:
$$E[X^2] = (-3^2 * 1/6) + (6^2 * 1/2) + (9^2 * 1/3) = 43.5$$
In summary, my concern is that this seemingly discrete variable has been placed in my continuous problem set and I would like to confirm both that conclusion and my methodology for calculating my means. Thanks to all!

Yes, it is right. However, and just for fun, there is an alternative definition of $E[X]$:
$$\mu_X=E[X]=\int\limits_{0}^{+\infty}{1-F_x(x)dx} -\int\limits_{-\infty}^{0}{F_x(x)dx}$$
and one can prove that is equivalent to other definition (good exercise). This definition is general for any random variable, discrete or continuous or neither. All what you need is calculate $F(x)$ with $f(x)$ and all done.
