Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|cite|improve this question
Your second calculation is incorrect as it should read $(-3)^2$ which is $9$ and not $-9$ as your calculation suggests. Thus your answer for $E(X^2)$ is lower than the true answer. Also this is a discrete distribution since the number of outcomes is countable. I'm guessing this was thrown in the continuous distribution section of your textbook to test how you retained previous knowledge. – Patrick Sep 19 '13 at 1:42
up vote 0 down vote accepted

Yes, they snuck in a simple discrete problem. You found $E(X)$ correctly.

Please note that the calculation of $E(X^2)$ is not quite right. For the first summand you needed $(-3)^2 \cdot\dfrac{1}{6}$.

share|cite|improve this answer
Thanks for catching that, it was certainly intended. $E[X^2] = 46.5 $ – Ryde91s Sep 19 '13 at 1:42

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.