4
$\begingroup$

I am trying to find the expected value of $Y=e^{X}$ where the density of $X$ is $f(x) = 2x$ for $0<x<1$ (zero elsewhere). According to my textbook, the answer should be $2$.

I get the correct answer but I am a bit uncertain whether I am doing it the right way? So

$$E(Y) = \int_{0}^{1}g(x)f(x)dx = \int_{0}^{1}e^{x}\cdot2x\ dx = 2\int_{0}^{1} xe^{x}dx$$

and then I continue with selecting

$$u = x \quad \text{and} \quad dv = e^{x}$$

which results in $$du = dx \quad \text{and} \quad v = e^{x}.$$

Hence, one gets $$2\Big(\Big(xe^{x}\Big)_{0}^{1} - \int_{0}^{1}e^{x}dx\Big) = 2\Big(e - (e-1)\Big) = 2.$$

Is this the easiest solution? Am I doing it correctly?

$\endgroup$
3
  • $\begingroup$ This should be the easiest way to do it analytically. Alternatively, if you know that $E(X) = 1$ for $X \sim \exp(1)$, then you may link this integration with $E(X)$. $\endgroup$
    – Zhanxiong
    Dec 8, 2015 at 16:16
  • 2
    $\begingroup$ @Solitary Huh? How is knowledge that the expectation of a standard exponential random variable has value $1$ related to the calculation that the OP needs to do (and has done correctly)? $\endgroup$ Dec 8, 2015 at 16:22
  • $\begingroup$ Oh, sorry, I overlooked, it's $e^x$, not $e^{-x}$... Anyway, I confirmed he is right. $\endgroup$
    – Zhanxiong
    Dec 8, 2015 at 16:24

1 Answer 1

7
$\begingroup$

So that this does not remain an unanswered question, your calculations are correct, and there is no easier way of doing the calculations.

$\endgroup$
6
  • $\begingroup$ This is a comment, not an answer. $\endgroup$
    – Alexis
    Dec 9, 2015 at 0:04
  • 4
    $\begingroup$ Thank you for your downvote, In case you had not noticed, the questions asked were "Is there an easier way of doing this? Am I doing this correctly?" What other answer were you expecting? $\endgroup$ Dec 9, 2015 at 0:12
  • $\begingroup$ @Alexis that's the difficulty with this sort of question (I brought this up on meta in September) -- we're forced either to give an answer that's overly brief by the usual SE standard or to leave the question unanswered. Responses on whether a very short answer was okay were somewhat mixed.. Where an actual complete answer is really only one sentence and there's not much else that can be said, it's probably better to answer it with one sentence than not at all, ...ctd $\endgroup$
    – Glen_b
    Dec 9, 2015 at 3:07
  • $\begingroup$ ctd... but I think it's clear that if more can usefully be said it probably should. Finding something more to say is sometimes tricky. $\endgroup$
    – Glen_b
    Dec 9, 2015 at 3:14
  • $\begingroup$ @Glen_b, There really is nothing to be answered here except to say that what's been shown is right. Leaving the question unanswered means it will be thrown up repeatedly by Community as an unanswered question that deserves another look. So I answered it and marked my answer as community wiki so that I don't get reputation points for the answer. I notice that Moderator @Scortchi has expressed an opposite viewpoint in his answer to your question on meta and I am pinging him so that he can delete the answer above and convert it into a comment if he so wishes. $\endgroup$ Dec 9, 2015 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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