2
$\begingroup$

Let X by a uniformly distributed random variable on the interval [0,1]. Find $E[e^Y]$

I am trying to make use of the formula $$E[g(X)] = \int_{-\infty}^{\infty}g(x)xdx$$

so then $$E[e^X] = \int e^xxdx$$

What I am unsure of are the bounds of integration. Would they be from 0 to 1, which is the interval of Y, or would they be from $e^0$ to $e^1$?

Additionally, we are also given that Y is a uniformly distributed variable on the interval [0,1] as well. Find $E[e^{Y-X}]$. Since they are independent, would it be the correct approach to first find $E[e^Y]$, then $E[e^{-X}]$, and multiply the two together?

Furthermore, apparently there is a much easier way to solve this problem without needing to do any integration, but I am having difficulty conceptualizing this method. Thoughts?

$\endgroup$

2 Answers 2

3
$\begingroup$

Your formula above is not quite correct. Suppose that $Z$ is any continuous random variable with density $f_Z(z)$. Then for a "nice enough" function $g$, we have $$ E[g(Z)] = \int_{-\infty}^{\infty} g(z) f_Z(z) dz. $$ In the uniform case, the density of $X$ is $$ f_X(x) = \begin{cases} 1 & 0 \leq x \leq 1 \\ 0 & \text{ otherwise} \end{cases} $$ Letting $g(x) = e^x$, you get $$ E[g(x)] = \int_{-\infty}^{\infty} g(x)f_X(x)dy = \int_{0}^1 e^x \cdot 1\, dx + \int_{-\infty}^{0} e^x \cdot 0\, dx + \int_1^{\infty} e^x \cdot 0\, dx\\ = \int_{0}^1 e^x \,dx. $$

For your second question, $E[e^Ye^{-X}] = E[e^Y]E[e^{-X}]$ if $X$ and $Y$ are independent. Otherwise you will need to know their joint density.

$\endgroup$
5
  • $\begingroup$ X and Y are indeed independent. Given this, how do I find their joint density anyway? $\endgroup$
    – Luchia
    Nov 10, 2013 at 14:48
  • $\begingroup$ @Luchia Since the two are independent, the joint density is just the product of the two individual densities. $\endgroup$
    – dreamer
    Nov 10, 2013 at 14:49
  • $\begingroup$ If $X$ and $Y$ are independent, then the joint density $f_{X,Y}(x,y)$ is just $$f_{X,Y}(x,y) = f_X(x) f_Y(y).$$ This is why, when $X$ and $Y$ are independent, you can write $E[g(X)h(Y)] = E[g(X)]E[h(Y)]$, like you suggested. $\endgroup$
    – Tom
    Nov 10, 2013 at 14:51
  • $\begingroup$ Why do you integrate from -1 to 1? Should it not be from 0 to 1 because that is where Y takes on its values? $\endgroup$
    – Luchia
    Nov 10, 2013 at 14:54
  • $\begingroup$ Sorry for the typo @Luchia! You are absolutely correct! Good catch.. it is integrated from 0 to 1. I've edited it for the fix. $\endgroup$
    – Tom
    Nov 10, 2013 at 14:55
1
$\begingroup$

First of all, the correct formula for $E[g(x)]=\int g(x) f(x) dx$, where $f(x)$ denotes the pdf of the distribution (so you expression is currently incorrect). The pdf for a uniform distribution is $f(x)=\frac{1}{b-a}$ for $a \leq x \leq b$.

Therefore, the intergral would then become:

$\int_{0}^{1} e^y \frac{1}{b-a} dy=\frac{1}{1-0} \int_{0}^{1}e^ydy=e^y]^{1}_{0}=e-1$

As for your second question, yes, that is correct.

$\endgroup$
4
  • $\begingroup$ Where are you getting the integration limits of -1 and 1 from? $\endgroup$
    – Luchia
    Nov 10, 2013 at 14:51
  • $\begingroup$ @Luchia The pdf of the uniform distribution is only defined for $a \leq x \leq b$, in our case, this means it is only defined between $0 \leq x \leq 1$. To find the expected value, we have to integrate over all the values for which the function is defined. Hence this means integrating between $0$ and $1$. $\endgroup$
    – dreamer
    Nov 10, 2013 at 14:53
  • $\begingroup$ However, the function is defined from 0 to 1 and not -1 to 1, so that is where I am confused. $\endgroup$
    – Luchia
    Nov 10, 2013 at 14:55
  • $\begingroup$ @Luchia My bad. I misread. I edited my answer. $\endgroup$
    – dreamer
    Nov 10, 2013 at 14:55

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.